Class ChainedBinaryFunctionSwapped

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.extensions.chained.ChainedBinaryFunctionSwapped
All Implemented Interfaces:
ChainedFunctionI, DirtyFunction, JepComponent, PostfixMathCommandI, Serializable

public class ChainedBinaryFunctionSwapped extends PostfixMathCommand implements ChainedFunctionI, JepComponent, DirtyFunction
Converts a BinaryFunction so it can be used in a chain. A binary function f(x,y) will be converted to a unary function F(x) can be used in the middle of a chain as
[1..10] . F(5) . fold([x,y]=>x+y) 
The apply(Evaluator, Node, Object) method will first evaluate the child of the node then call the binary function f(x,y) with the first argument from the child and the second argument from the chain.
See Also:
  • Constructor Details

    • ChainedBinaryFunctionSwapped

      public ChainedBinaryFunctionSwapped(BinaryFunction inner)
  • Method Details