Package org.ojalgo.function
Interface BinaryFunction<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
BasicFunction
,java.util.function.BiFunction<N,N,N>
,java.util.function.BinaryOperator<N>
,java.util.function.DoubleBinaryOperator
- All Known Subinterfaces:
BigFunction.Binary
,ComplexFunction.Binary
,PrimitiveFunction.Binary
,QuadrupleFunction.Binary
,QuaternionFunction.Binary
,RationalFunction.Binary
- All Known Implementing Classes:
ArtificialNeuralNetwork.Error
public interface BinaryFunction<N extends java.lang.Comparable<N>> extends BasicFunction, java.util.function.BinaryOperator<N>, java.util.function.DoubleBinaryOperator
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BinaryFunction.FixedFirst<N extends java.lang.Comparable<N>>
A BinaryFunction with a set/fixed first argument.static class
BinaryFunction.FixedSecond<N extends java.lang.Comparable<N>>
A BinaryFunction with a set/fixed second argument.-
Nested classes/interfaces inherited from interface org.ojalgo.function.BasicFunction
BasicFunction.Differentiable<N extends java.lang.Comparable<N>,F extends BasicFunction>, BasicFunction.Integratable<N extends java.lang.Comparable<N>,F extends BasicFunction>, BasicFunction.PlainUnary<T,R>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BinaryFunction<N>
andThen(UnaryFunction<N> after)
default N
apply(N arg1, N arg2)
default double
applyAsDouble(double arg1, double arg2)
default UnaryFunction<N>
by(double arg2)
To allow syntax likearray.modifyAll(DIVIDE.by(3.0));
default UnaryFunction<N>
by(N arg2)
To allow syntax likearray.modifyAll(DIVIDE.by(3.0));
default UnaryFunction<N>
first(double arg1)
default UnaryFunction<N>
first(N arg1)
Turns this binary function into a unary function with the first argument fixed/locked to the specified value.default byte
invoke(byte arg1, byte arg2)
double
invoke(double arg1, double arg2)
default float
invoke(float arg1, float arg2)
default int
invoke(int arg1, int arg2)
default long
invoke(long arg1, long arg2)
default short
invoke(short arg1, short arg2)
N
invoke(N arg1, double arg2)
N
invoke(N arg1, N arg2)
default UnaryFunction<N>
second(double arg2)
default UnaryFunction<N>
second(N arg2)
Turns this binary function into a unary function with the second argument fixed/locked to the specified value.
-
-
-
Method Detail
-
andThen
default BinaryFunction<N> andThen(UnaryFunction<N> after)
-
applyAsDouble
default double applyAsDouble(double arg1, double arg2)
- Specified by:
applyAsDouble
in interfacejava.util.function.DoubleBinaryOperator
- See Also:
DoubleBinaryOperator.applyAsDouble(double, double)
-
by
default UnaryFunction<N> by(double arg2)
To allow syntax likearray.modifyAll(DIVIDE.by(3.0));
- See Also:
second(double)
-
by
default UnaryFunction<N> by(N arg2)
To allow syntax likearray.modifyAll(DIVIDE.by(3.0));
- See Also:
second(double)
-
first
default UnaryFunction<N> first(double arg1)
- See Also:
first(Comparable)
-
first
default UnaryFunction<N> first(N arg1)
Turns this binary function into a unary function with the first argument fixed/locked to the specified value.- Parameters:
arg1
- The first argument of the binary function.- Returns:
- The resulting unary function.
-
invoke
default byte invoke(byte arg1, byte arg2)
-
invoke
double invoke(double arg1, double arg2)
-
invoke
default float invoke(float arg1, float arg2)
-
invoke
default int invoke(int arg1, int arg2)
-
invoke
default long invoke(long arg1, long arg2)
-
invoke
default short invoke(short arg1, short arg2)
-
second
default UnaryFunction<N> second(double arg2)
- See Also:
second(Comparable)
-
second
default UnaryFunction<N> second(N arg2)
Turns this binary function into a unary function with the second argument fixed/locked to the specified value.- Parameters:
arg2
- The second argument of the binary function.- Returns:
- The resulting unary function.
-
-