Package cern.colt.function

Examples of cern.colt.function.DoubleIntProcedure


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


  final AbstractDoubleIntMap other = (AbstractDoubleIntMap) obj;
  if (other.size() != size()) return false;

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

*       returns <tt>Double.NaN</tt> if no such key exists.
*/
public double keyOf(final int value) {
  final double[] foundKey = new double[1];
  boolean notFound = forEachPair(
    new DoubleIntProcedure() {
      public boolean apply(double iterKey, int iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

public void pairsMatching(final DoubleIntProcedure condition, final DoubleArrayList keyList, final IntArrayList valueList) {
  keyList.clear();
  valueList.clear();
 
  forEachPair(
    new DoubleIntProcedure() {
      public boolean apply(double key, int value) {
        if (condition.apply(key,value)) {
          keyList.add(key);
          valueList.add(value);
        }
View Full Code Here

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

  final AbstractDoubleIntMap other = (AbstractDoubleIntMap) obj;
  if (other.size() != size()) return false;

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

*       returns <tt>Double.NaN</tt> if no such key exists.
*/
public double keyOf(final int value) {
  final double[] foundKey = new double[1];
  boolean notFound = forEachPair(
    new DoubleIntProcedure() {
      public boolean apply(double iterKey, int iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

public void pairsMatching(final DoubleIntProcedure condition, final DoubleArrayList keyList, final IntArrayList valueList) {
  keyList.clear();
  valueList.clear();

  forEachPair(
    new DoubleIntProcedure() {
      public boolean apply(double key, int value) {
        if (condition.apply(key,value)) {
          keyList.add(key);
          valueList.add(value);
        }
View Full Code Here

TOP

Related Classes of cern.colt.function.DoubleIntProcedure

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.