Package org.apache.mahout.math.function

Examples of org.apache.mahout.math.function.FloatFloatProcedure


   *
   * @return <tt>true</tt> if the receiver contains the specified value.
   */
  public boolean containsValue(final float value) {
    return !forEachPair(
        new FloatFloatProcedure() {
          @Override
          public boolean apply(float iterKey, float iterValue) {
            return (value != iterValue);
          }
        }
View Full Code Here


      return false;
    }

    return
        forEachPair(
            new FloatFloatProcedure() {
              @Override
              public boolean apply(float key, float value) {
                return other.containsKey(key) && other.get(key) == value;
              }
            }
        )
            &&
            other.forEachPair(
                new FloatFloatProcedure() {
                  @Override
                  public boolean apply(float key, float value) {
                    return containsKey(key) && get(key) == value;
                  }
                }
View Full Code Here

                           final FloatArrayList valueList) {
    keyList.clear();
    valueList.clear();

    forEachPair(
        new FloatFloatProcedure() {
          @Override
          public boolean apply(float key, float value) {
            if (condition.apply(key, value)) {
              keyList.add(key);
              valueList.add(value);
View Full Code Here

   *
   * @param function a function object taking as argument the current association's value.
   */
  public void assign(final FloatFunction function) {
    copy().forEachPair(
        new FloatFloatProcedure() {
          @Override
          public boolean apply(float key, float value) {
            put(key, function.apply(value));
            return true;
          }
View Full Code Here

   * @param other the other map to be copied into the receiver.
   */
  public void assign(AbstractFloatFloatMap other) {
    clear();
    other.forEachPair(
        new FloatFloatProcedure() {
          @Override
          public boolean apply(float key, float value) {
            put(key, value);
            return true;
          }
View Full Code Here

TOP

Related Classes of org.apache.mahout.math.function.FloatFloatProcedure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.