Package cern.colt.function

Examples of cern.colt.function.IntDoubleProcedure


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


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

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

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

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

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

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

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

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

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

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

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

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

TOP

Related Classes of cern.colt.function.IntDoubleProcedure

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.