/** * Return true if all keys of some other container exist in this container. */ protected boolean equalElements(IntDoubleHashMap other) { if (other.size() != size()) { return false; } for (IntDoubleCursor c : other) { int key = c.key; if (!containsKey(key) || !(Double.doubleToLongBits(get(key)) == Double.doubleToLongBits(c.value))) { return false; } } return true; }
public double get(int key) { return g_map.get(key); }
@VisibleForTesting public double getDoubleStat(MetricDef metric) { return doubleMetrics.get(metric.metricId()); }
/** * Return true if all keys of some other container exist in this container. */ protected boolean equalElements(IntDoubleHashMap other) { if (other.size() != size()) { return false; } for (IntDoubleCursor c : other) { int key = c.key; if (!containsKey(key) || !(Double.doubleToLongBits(get(key)) == Double.doubleToLongBits(c.value))) { return false; } } return true; }
/** * If <code>key</code> exists, <code>putValue</code> is inserted into the map, * otherwise any existing value is incremented by <code>additionValue</code>. * * @param key * The key of the value to adjust. * @param putValue * The value to put if <code>key</code> does not exist. * @param incrementValue * The value to add to the existing value if <code>key</code> exists. * @return Returns the current value associated with <code>key</code> (after * changes). */ @Override public double putOrAdd(int key, double putValue, double incrementValue) { assert assigned < mask + 1; if (containsKey(key)) { putValue = get(key); putValue = (double) (((putValue) + (incrementValue))); } put(key, putValue); return putValue; }
double value = doubleMetrics.get(i); if(value != 0){ outputTable.addRow(names[i], NumberFormat.getInstance().format(value));