linearalgebra.symbolic
Class PairOperator
java.lang.Object
linearalgebra.symbolic.AbstractUnknown
linearalgebra.symbolic.PairOperator
- All Implemented Interfaces:
- SymbolicValue
- Direct Known Subclasses:
- Addition, Multiplication
public abstract class PairOperator
- extends AbstractUnknown
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_left
private SymbolicValue m_left
m_right
private SymbolicValue m_right
PairOperator
public PairOperator(SymbolicValue left,
SymbolicValue right)
setChild
public final void setChild(int index,
SymbolicValue v)
getChild
public final SymbolicValue getChild(int index)
- Description copied from interface:
SymbolicValue
- Returns the child node specifed by this index.
Throws ArrayOutOfBoundsException if index is invalid.
getChildCount
public final int getChildCount()
- Description copied from interface:
SymbolicValue
- Returns the number of child nodes beneath this tree.
getNumericValue
public double getNumericValue()
throws UnboundValueError
- Throws:
UnboundValueError
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
reorderChildren
protected void reorderChildren(int[] order)
doOperation
protected abstract double doOperation(double left,
double right)
getOperator
protected abstract java.lang.String getOperator()
createNewInstance
protected abstract PairOperator createNewInstance(SymbolicValue left,
SymbolicValue right)