public final class Functions extends Object
Modifier and Type | Field and Description |
---|---|
static IgniteDoubleFunction<Double> |
ABS
Function that returns
Math.abs(a) . |
static IgniteBiFunction<Double,Double,Double> |
COMPARE
Function that returns {@code a < b ?
|
static IgniteDoubleFunction<Double> |
IDENTITY
Function that returns its argument.
|
static IgniteDoubleFunction<Double> |
INV
Function that returns
1 / a |
static IgniteBiFunction<Double,Double,Double> |
LG
Function that returns
Math.log(a) / Math.log(b) . |
static IgniteDoubleFunction<Double> |
LOG2
Function that returns
Math.log(a) / Math.log(2) . |
static IgniteBiFunction<Double,Double,Double> |
MAX_ABS
Function that returns
max(abs(a), abs(b)) . |
static IgniteBiFunction<Double,Double,Double> |
MIN
Function that returns
min(a, b) . |
static IgniteBiFunction<Double,Double,Double> |
MIN_ABS
Function that returns
min(abs(a), abs(b)) . |
static IgniteBiFunction<Double,Double,Double> |
MINUS
Function that returns
a - b . |
static IgniteBiFunction<Double,Double,Double> |
MINUS_ABS
Function that returns
abs(a - b) . |
static IgniteBiFunction<Double,Double,Double> |
MINUS_SQUARED
Function that returns
(a - b) * (a - b) |
static IgniteBiFunction<Double,Double,Double> |
MOD
Function that returns
a % b . |
static IgniteBiFunction<Double,Double,Double> |
MULT
Function that returns
a * b . |
static IgniteDoubleFunction<Double> |
NEGATE
Function that returns
-a . |
static IgniteBiFunction<Double,Double,Double> |
PLUS
Function that returns
a + b . |
static IgniteBiFunction<Double,Double,Double> |
PLUS_ABS
Function that returns
Math.abs(a) + Math.abs(b) . |
static IgniteDoubleFunction<Double> |
SIGMOID
Function that returns
1 / (1 + exp(-a) |
static IgniteDoubleFunction<Double> |
SIGMOIDGRADIENT
Function that returns
a * (1-a) |
static IgniteDoubleFunction<Double> |
SIGN
Function that returns {@code a < 0 ?
|
static IgniteDoubleFunction<Double> |
SQUARE
Function that returns
a * a . |
Constructor and Description |
---|
Functions() |
Modifier and Type | Method and Description |
---|---|
static <A,B extends Comparable<B>> |
argmin(List<A> args,
IgniteFunction<A,B> f) |
static IgniteDoubleFunction<Double> |
constant(Double c)
Function that returns passed constant.
|
static <A,B,C> IgniteCurriedBiFunction<A,B,C> |
curry(BiFunction<A,B,C> f)
Curry bi-function.
|
static <A,B,C> IgniteCurriedBiFunction<A,B,C> |
curry(IgniteBiFunction<A,B,C> f)
Transform bi-function of the form (a, b) -> c into a function of form a -> (b -> c).
|
static <A,B,C,D> IgniteCurriedTriFunction<A,B,C,D> |
curry(IgniteTriFunction<A,B,C,D> f)
Transform tri-function of the form (a, b, c) -> d into a function of form a -> (b -> (c -> d)).
|
static IgniteDoubleFunction<Double> |
div(double b)
Function that returns
a / b . |
static <T> T |
MAX_GENERIC(T a,
T b,
Comparator<T> f)
Generic 'max' function.
|
static <T> T |
MIN_GENERIC(T a,
T b,
Comparator<T> f)
Generic 'min' function.
|
static IgniteBiFunction<Double,Double,Double> |
minusMult(double constant)
Function that returns
a - b*constant . |
static IgniteDoubleFunction<Double> |
mult(double b)
Function that returns
a * b . |
static <A,B,C> IgniteBiFunction<A,B,IgniteSupplier<C>> |
outputSupplier(IgniteBiFunction<A,B,C> f)
Transform function of form (a, b) -> c into (a, b) - () -> c.
|
static <A,B> IgniteFunction<A,IgniteSupplier<B>> |
outputSupplier(IgniteFunction<A,B> f)
Transform function of form a -> b into a -> (() -> b).
|
static IgniteDoubleFunction<Double> |
plus(double b)
Function that returns
a + b . |
static IgniteBiFunction<Double,Double,Double> |
plusMult(double constant)
Function that returns
a + b*constant . |
static IgniteDoubleFunction<Double> |
pow(double b)
Function that returns
Math.pow(a, b) . |
public static final IgniteDoubleFunction<Double> ABS
Math.abs(a)
.public static final IgniteDoubleFunction<Double> IDENTITY
public static final IgniteDoubleFunction<Double> LOG2
Math.log(a) / Math.log(2)
.public static final IgniteDoubleFunction<Double> NEGATE
-a
.public static final IgniteDoubleFunction<Double> SIGN
a < 0 ? -1 : a > 0 ? 1 : 0
.public static final IgniteDoubleFunction<Double> SQUARE
a * a
.public static final IgniteDoubleFunction<Double> SIGMOID
1 / (1 + exp(-a)
public static final IgniteDoubleFunction<Double> INV
1 / a
public static final IgniteDoubleFunction<Double> SIGMOIDGRADIENT
a * (1-a)
public static final IgniteBiFunction<Double,Double,Double> MOD
a % b
.public static final IgniteBiFunction<Double,Double,Double> MULT
a * b
.public static final IgniteBiFunction<Double,Double,Double> LG
Math.log(a) / Math.log(b)
.public static final IgniteBiFunction<Double,Double,Double> PLUS
a + b
.public static final IgniteBiFunction<Double,Double,Double> MINUS
a - b
.public static final IgniteBiFunction<Double,Double,Double> MIN
min(a, b)
.public static final IgniteBiFunction<Double,Double,Double> MINUS_ABS
abs(a - b)
.public static final IgniteBiFunction<Double,Double,Double> MAX_ABS
max(abs(a), abs(b))
.public static final IgniteBiFunction<Double,Double,Double> MIN_ABS
min(abs(a), abs(b))
.public static final IgniteBiFunction<Double,Double,Double> PLUS_ABS
Math.abs(a) + Math.abs(b)
.public static final IgniteBiFunction<Double,Double,Double> MINUS_SQUARED
(a - b) * (a - b)
public static final IgniteBiFunction<Double,Double,Double> COMPARE
a < b ? -1 : a > b ? 1 : 0
.public static <T> T MAX_GENERIC(T a, T b, Comparator<T> f)
T
- Type of objects to compare.a
- First object to compare.b
- Second object to compare.f
- Comparator.a
and b
in terms of comparator f
.public static <T> T MIN_GENERIC(T a, T b, Comparator<T> f)
T
- Type of objects to compare.a
- First object to compare.b
- Second object to compare.f
- Comparator.a
and b
in terms of comparator f
.public static <A,B extends Comparable<B>> IgniteBiTuple<Integer,A> argmin(List<A> args, IgniteFunction<A,B> f)
public static IgniteDoubleFunction<Double> plus(double b)
a + b
. a
is a variable, b
is fixed.b
- Value to add.public static IgniteDoubleFunction<Double> mult(double b)
a * b
. a
is a variable, b
is fixed.b
- Value to multiply to.public static IgniteDoubleFunction<Double> div(double b)
a / b
. a
is a variable, b
is fixed.b
- Value to divide to.public static IgniteBiFunction<Double,Double,Double> plusMult(double constant)
a + b*constant
. a
and b
are variables,
constant
is fixed.constant
- Value to use in multiply.public static IgniteBiFunction<Double,Double,Double> minusMult(double constant)
a - b*constant
. a
and b
are variables,
constant
is fixed.constant
- Value to use in multiply.public static IgniteDoubleFunction<Double> constant(Double c)
public static IgniteDoubleFunction<Double> pow(double b)
Math.pow(a, b)
.b
- Power value.public static <A,B,C> IgniteCurriedBiFunction<A,B,C> curry(BiFunction<A,B,C> f)
A
- Type of first argument of f
.B
- Type of second argument of f
.C
- Return type of f
.f
- Bi-function to curry.public static <A,B,C> IgniteCurriedBiFunction<A,B,C> curry(IgniteBiFunction<A,B,C> f)
A
- Type of first argument of function to be transformed.B
- Type of second argument of function to be transformed.C
- Type of third argument of function to be transformed.f
- Function to be curried.public static <A,B,C,D> IgniteCurriedTriFunction<A,B,C,D> curry(IgniteTriFunction<A,B,C,D> f)
A
- Type of first argument of function to be transformed.B
- Type of second argument of function to be transformed.C
- Type of third argument of function to be transformed.D
- Type output of function to be transformed.f
- Function to be curried.public static <A,B> IgniteFunction<A,IgniteSupplier<B>> outputSupplier(IgniteFunction<A,B> f)
A
- Type of input of function to be transformed.B
- Type of output of function to be transformed.f
- Function to be transformed.public static <A,B,C> IgniteBiFunction<A,B,IgniteSupplier<C>> outputSupplier(IgniteBiFunction<A,B,C> f)
A
- Type of first argument of function to be transformed.B
- Type of second argument of function to be transformed.C
- Type of output of function to be transformed.f
- Function to be transformed.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024