Examples of DoubleProcedure


Examples of cern.colt.function.DoubleProcedure

*
* @return <tt>true</tt> if the receiver contains the specified key.
*/
public boolean containsKey(final double key) {
  return ! forEachKey(
    new DoubleProcedure() {
      public boolean apply(double iterKey) {
        return (key != iterKey);
      }
    }
  );
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

* @param procedure    the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues.
* @return <tt>false</tt> if the procedure stopped before all keys where iterated over, <tt>true</tt> otherwise.
*/
public boolean forEachPair(final DoubleIntProcedure procedure) {
  return forEachKey(
    new DoubleProcedure() {
      public boolean apply(double key) {
        return procedure.apply(key,get(key));
      }
    }
  );
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

* @param list the list to be filled, can have any size.
*/
public void keys(final DoubleArrayList list) {
  list.clear();
  forEachKey(
    new DoubleProcedure() {
      public boolean apply(double key) {
        list.add(key);
        return true;
      }
    }
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

* @param list the list to be filled, can have any size.
*/
public void values(final IntArrayList list) {
  list.clear();
  forEachKey(
    new DoubleProcedure() {
      public boolean apply(double key) {
        list.add(get(key));
        return true;
      }
    }
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>from<=a && a<=to</tt>.
* <tt>a</tt> is a variable, <tt>from</tt> and <tt>to</tt> are fixed.
*/
public static DoubleProcedure isBetween(final double from, final double to) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return from<=a && a<=to; }
  };
}
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>a == b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static DoubleProcedure isEqual(final double b) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return a==b; }
  };
}
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>a > b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static DoubleProcedure isGreater(final double b) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return a > b; }
  };
}
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>a < b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static DoubleProcedure isLess(final double b) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return a < b; }
  };
}
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>from<=a && a<=to</tt>.
* <tt>a</tt> is a variable, <tt>from</tt> and <tt>to</tt> are fixed.
*/
public static DoubleProcedure isBetween(final double from, final double to) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return from<=a && a<=to; }
  };
}
View Full Code Here

Examples of cern.colt.function.DoubleProcedure

/**
* Constructs a function that returns <tt>a == b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static DoubleProcedure isEqual(final double b) {
  return new DoubleProcedure() {
    public final boolean apply(double a) { return a==b; }
  };
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.