public double get( Object key ) { synchronized( mutex ) { return m.get( key ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { double v = _map.get( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
public double get( Object key ) { return m.get( key ); }
@Override public boolean execute(String activityName, long latestExecutionTime) { runningExecutionTotals.adjustOrPutValue(activityName, latestExecutionTime, latestExecutionTime); latestSpike = spikeData.get(activityName); if (latestExecutionTime > latestSpike) { spikeData.put(activityName, latestExecutionTime); } return true; } }
/** * Returns the number of times the specified object has been seen by this * counter. */ public double getCount(T obj) { return counts.get(obj); }
@Override public double get( Object key ) { synchronized( mutex ) { return m.get( key ); } }
public double get( Object key ) { synchronized( mutex ) { return m.get( key ); } }
public double getValueOrZero(String string1, String string2) { double value = 0; TObjectDoubleMap<String> row = matrix.get(string1); if (row != null) { value = row.get(string2); } return value; }
/** * Given the normal distribution specified in distributionParams, return * the probability of getting samples > x * This is essentially the Q-function * * @param x * @param named * @return */ public double normalProbability(double x, TObjectDoubleMap<String> named) { return normalProbability(x, new Statistic(named.get(KEY_MEAN), named.get(KEY_VARIANCE), named.get(KEY_STDEV))); }
@Override public double getDoubleProperty(String propertyKey, double fallback) { return this.doubleProperties.containsKey(propertyKey) ? this.doubleProperties.get(propertyKey) : fallback; }
/** * Adds the counts from the provided {@code Counter} to the current counts, * adding new elements as needed. */ public void add(RationalCounter<? extends T> counter) { for (Map.Entry<? extends T,Double> e : counter) { T t = e.getKey(); Double cur = counts.get(t); counts.put(t, (cur == null) ? e.getValue() : cur + e.getValue()); } }
public Double getResult(String string1, String string2) { Double value = null; TObjectDoubleMap<String> row = matrix.get(string1); if (row != null && row.containsKey(string2)) { value = row.get(string2); } return value; }
private double ratio(Node n, double d) { if (wantedRatios.containsKey(n)) { return Math.min(d, wantedRatios.get(n)); } return d; }
/** * Counts the object, increasing its total count by 1. */ public double count(T obj) { double count = counts.get(obj); count++; counts.put(obj, count); sum++; return count; }
private double ratio(Node n, double d) { if (wantedRatios.containsKey(n)) { return Math.min(d, wantedRatios.get(n)); } return d; }
public boolean equals(Object o) { if (o instanceof RationalCounter) { RationalCounter<?> c = (RationalCounter<?>)o; if (counts.size() != c.size() || sum != c.sum()) return false; for (Map.Entry<?,Double> e : c) { double i = counts.get(e.getKey()); if (i != e.getValue()) return false; } return true; } return false; }