Package org.apache.mahout.math.function

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


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


      return false;
    }

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

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

    forEachPair(
        new IntFloatProcedure() {
          @Override
          public boolean apply(int 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 IntFloatProcedure() {
          @Override
          public boolean apply(int 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(AbstractIntFloatMap other) {
    clear();
    other.forEachPair(
        new IntFloatProcedure() {
          @Override
          public boolean apply(int key, float value) {
            put(key, value);
            return true;
          }
View Full Code Here

TOP

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

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.