com.lagodiuk.gp.symbolic.interpreter
Class Expression
- java.lang.Object
-
- com.lagodiuk.gp.symbolic.interpreter.Expression
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class Expression extends java.lang.Object implements java.lang.Cloneable
-
-
Constructor Summary
Constructors Constructor and Description Expression(Function function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddChild(Expression child)voidaddCoefficient(double coefficient)Expressionclone()doubleeval(Context context)java.util.List<Expression>getAllNodesAsList()java.util.List<Expression>getChilds()java.util.List<java.lang.Double>getCoefficientsOfNode()java.util.List<java.lang.Double>getCoefficientsOfTree()FunctiongetFunction()java.lang.StringgetVariable()java.lang.Stringprint()voidremoveChilds()voidremoveCoefficients()ExpressionsetChilds(java.util.List<Expression> childs)ExpressionsetCoefficientsOfNode(java.util.List<java.lang.Double> coefficients)voidsetCoefficientsOfTree(java.util.List<java.lang.Double> coefficients)voidsetFunction(Function function)ExpressionsetVariable(java.lang.String variable)
-
-
-
Constructor Detail
-
Expression
public Expression(Function function)
-
-
Method Detail
-
eval
public double eval(Context context)
-
print
public java.lang.String print()
-
getChilds
public java.util.List<Expression> getChilds()
-
setChilds
public Expression setChilds(java.util.List<Expression> childs)
-
addChild
public void addChild(Expression child)
-
removeChilds
public void removeChilds()
-
getCoefficientsOfNode
public java.util.List<java.lang.Double> getCoefficientsOfNode()
-
setCoefficientsOfNode
public Expression setCoefficientsOfNode(java.util.List<java.lang.Double> coefficients)
-
addCoefficient
public void addCoefficient(double coefficient)
-
removeCoefficients
public void removeCoefficients()
-
getVariable
public java.lang.String getVariable()
-
setVariable
public Expression setVariable(java.lang.String variable)
-
getFunction
public Function getFunction()
-
setFunction
public void setFunction(Function function)
-
clone
public Expression clone()
- Overrides:
clonein classjava.lang.Object
-
getCoefficientsOfTree
public java.util.List<java.lang.Double> getCoefficientsOfTree()
-
setCoefficientsOfTree
public void setCoefficientsOfTree(java.util.List<java.lang.Double> coefficients)
-
getAllNodesAsList
public java.util.List<Expression> getAllNodesAsList()
-
-
DMelt 3.0 © DataMelt by jWork.ORG