All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.datavec.dataframe.columns.DoubleColumnUtils Maven / Gradle / Ivy

Go to download

High-performance Java Dataframe with integrated columnar storage (fork of tablesaw)

There is a newer version: 0.9.1
Show newest version
package org.datavec.dataframe.columns;

import it.unimi.dsi.fastutil.ints.IntIterable;
import org.datavec.dataframe.filtering.doubles.DoubleBiPredicate;
import org.datavec.dataframe.filtering.doubles.DoublePredicate;

/**
 *
 */
public interface DoubleColumnUtils extends Column, IntIterable {

  DoublePredicate isZero = i -> i == 0.0;

  DoublePredicate isNegative = i -> i < 0;

  DoublePredicate isPositive = i -> i > 0;

  DoublePredicate isNonNegative = i -> i >= 0;

  DoubleBiPredicate isGreaterThan = (valueToTest, valueToCompareAgainst) -> valueToTest > valueToCompareAgainst;

  DoubleBiPredicate isGreaterThanOrEqualTo = (valueToTest, valueToCompareAgainst) -> valueToTest >=
      valueToCompareAgainst;

  DoubleBiPredicate isLessThan = (valueToTest, valueToCompareAgainst) -> valueToTest < valueToCompareAgainst;

  DoubleBiPredicate isLessThanOrEqualTo = (valueToTest, valueToCompareAgainst) -> valueToTest <= valueToCompareAgainst;

  DoubleBiPredicate isEqualTo = (valueToTest, valueToCompareAgainst) -> valueToTest == valueToCompareAgainst;

  DoubleBiPredicate notIsEqualTo = (valueToTest, valueToCompareAgainst) -> valueToTest != valueToCompareAgainst;


  DoublePredicate isMissing = i -> i != i;

  DoublePredicate isNotMissing = i -> i == i;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy