Changeset 68ecd82


Ignore:
Timestamp:
Dec 12, 2015 2:55:08 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4fe2479
Parents:
2c1b9c2
Message:

minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/SybilRenderer.java

    r2c1b9c2 r68ecd82  
    4545
    4646    private final RouterContext _context;
     47    private final DecimalFormat fmt = new DecimalFormat("#0.00");
    4748
    4849    private static final int PAIRMAX = 20;
     
    119120    }
    120121
    121     private static void addPoints(Map<Hash, Points> points, Hash h, double d, String reason) {
    122         DecimalFormat fmt = new DecimalFormat("#0.00");
     122    private void addPoints(Map<Hash, Points> points, Hash h, double d, String reason) {
    123123        Points dd = points.get(h);
    124124        if (dd != null) {
     
    168168            tot += d;
    169169        }
    170         DecimalFormat fmt = new DecimalFormat("#0.00");
    171170        double avgMinDist = tot / count;
    172171        buf.append("<p>Average closest floodfill distance: " + fmt.format(avgMinDist) + "</p>");
     
    285284        }
    286285
    287         DecimalFormat fmt = new DecimalFormat("#0.00");
    288286        double avg = total / (sz * sz / 2);
    289287        buf.append("<h3>Average Floodfill Distance is ").append(fmt.format(avg)).append("</h3>");
     
    416414        Collections.sort(foo, new FooComparator(oc));
    417415        boolean found = false;
    418         DecimalFormat fmt = new DecimalFormat("#0.00");
    419416        for (Integer ii : foo) {
    420417            int count = oc.count(ii);
     
    470467        Collections.sort(foo, new FooComparator(oc));
    471468        boolean found = false;
    472         DecimalFormat fmt = new DecimalFormat("#0.00");
    473469        for (Integer ii : foo) {
    474470            int count = oc.count(ii);
     
    520516        Collections.sort(foo, new FooComparator(oc));
    521517        boolean found = false;
    522         DecimalFormat fmt = new DecimalFormat("#0.00");
    523518        for (Integer ii : foo) {
    524519            int count = oc.count(ii);
     
    562557        Collections.sort(foo, new FoofComparator(oc));
    563558        boolean found = false;
    564         DecimalFormat fmt = new DecimalFormat("#0.00");
    565559        for (String s : foo) {
    566560            int count = oc.count(s);
     
    622616        boolean isEven = (count % 2) == 0;
    623617        int medIdx = isEven ? (count / 2) - 1 : (count / 2);
    624         DecimalFormat fmt = new DecimalFormat("#0.00");
    625618        for (int i = 0; i < count; i++) {
    626619            RouterInfo ri = ris.get(i);
     
    702695            buf.append("</th></tr><tr><td>\n");
    703696            if (us != null) {
    704                 DecimalFormat fmt = new DecimalFormat("#0.00");
    705697                BigInteger dist = HashDistance.getDistance(us, info.getHash());
    706698                distance = biLog2(dist);
Note: See TracChangeset for help on using the changeset viewer.