/**
  * Transform the values in this map using <tt>function</tt>.
  *
  * @param function a <code>TFloatFunction</code> value
  */
 public void transformValues(TFloatFunction function) {
   byte[] states = _states;
   float[] values = _values;
   for (int i = values.length; i-- > 0; ) {
     if (states[i] == FULL) {
       values[i] = function.execute(values[i]);
     }
   }
 }
Exemplo n.º 2
0
 /**
  * Transform each value in the list using the specified function.
  *
  * @param function a <code>TFloatFunction</code> value
  */
 public void transformValues(TFloatFunction function) {
   for (int i = _pos; i-- > 0; ) {
     _data[i] = function.execute(_data[i]);
   }
 }