Class CombinedOperator.Pipe
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.CombinedOperator.OperatorsFunction
org.cyclops.integrateddynamics.core.evaluate.operator.CombinedOperator.Pipe
- All Implemented Interfaces:
OperatorBase.IFunction
- Enclosing class:
- CombinedOperator
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CombinedOperator
asOperator
(IOperator... operators) static CombinedOperator
asOperator
(CombinedOperator.OperatorsFunction function, String symbol, String operatorName, String interactName, IOperator... operators) evaluate
(OperatorBase.SafeVariablesGetter variables) Evaluate this function for the given input.static org.apache.commons.lang3.tuple.Pair<IValueType[],
IValueType> getPipedInputOutputTypes
(IOperator[] operators) Determine the input types and output type for the given operators.static IValue
pipeVariablesToOperators
(IVariable[] allVariables, IOperator[] operators) Pass the first variable to all n-1 first operators.Methods inherited from class org.cyclops.integrateddynamics.core.evaluate.operator.CombinedOperator.OperatorsFunction
getInputOperatorCount, getOperators
-
Constructor Details
-
Pipe
-
-
Method Details
-
evaluate
Description copied from interface:OperatorBase.IFunction
Evaluate this function for the given input.- Parameters:
variables
- The input variables holder.- Returns:
- The output value.
- Throws:
EvaluationException
- If an exception occurs while evaluating
-
pipeVariablesToOperators
public static IValue pipeVariablesToOperators(IVariable[] allVariables, IOperator[] operators) throws EvaluationException Pass the first variable to all n-1 first operators. Prepend the results of these operators to the variables array. Pass the final variables array to the last operator, and return the result.- Parameters:
allVariables
- The input variables.operators
- The operators to apply to. The n-1 first ones are the inputs, and the last one is the target to pipe to.- Returns:
- The final result.
- Throws:
EvaluationException
- If evaluation failed.
-
getPipedInputOutputTypes
public static org.apache.commons.lang3.tuple.Pair<IValueType[],IValueType> getPipedInputOutputTypes(IOperator[] operators) Determine the input types and output type for the given operators.- Parameters:
operators
- The operators to apply to. The n-1 first ones are the inputs, and the last one is the target to pipe to.- Returns:
- The input types and output type.
-
asOperator
-
asOperator
public static CombinedOperator asOperator(CombinedOperator.OperatorsFunction function, String symbol, String operatorName, String interactName, IOperator... operators)
-