@Override public boolean execute(String activityName, double executionTime) { spikeData.put(activityName, executionTime * DECAY_RATE); return true; } }
@Override public boolean execute(String activityName, long total) { if (total > 0) { activityToMeanMap.put(activityName, total * factor); } return true; } }
public double put( K key, double value ) { synchronized( mutex ) { return m.put( key, value ); } } public double remove( Object 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; } }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
if (uWeight < uWeightOld) { postBoardingWeights.put(u, uWeight); } else {
vertices.put(v, (int) s.getWeight()); // FIXME time or weight? is RR using right mode?
@Override public double put( K key, double value ) { synchronized( mutex ) { return m.put( key, value ); } } @Override
public double put( K key, double value ) { synchronized( mutex ) { return m.put( key, value ); } } public double remove( Object key ) {
public double put( K key, double value ) { synchronized( mutex ) { return m.put( key, value ); } } public double remove( Object key ) {
public double put( K key, double value ) { synchronized( mutex ) { return m.put( key, value ); } } public double remove( Object key ) {
public void setEpsilonFactor(String actType, double factor) { this.epsilonFactors.put(actType, factor); }
/** * 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; }
/** * 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 void add(String string1, String string2, double value) { TObjectDoubleMap<String> row = matrix.get(string1); if (row == null) { row = new TObjectDoubleHashMap<String>(); matrix.put(string1, row); } row.put(string2, value); }
/** * Counts the object, increasing its total count by the specified positive amount. * * @param count a positive value for the number of times the object occurred * * @throws IllegalArgumentException if {@code count} is not a positive value. */ public double count(T obj, double count) { if (count <= 0) throw new IllegalArgumentException("Count must be positive: " + count); double oldCount = counts.get(obj); double newCount = count + oldCount; counts.put(obj, newCount); sum += count; return newCount; }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ @Override public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }