linearalgebra.symbolic
Class UnaryOperator

java.lang.Object
  extended by linearalgebra.symbolic.AbstractUnknown
      extended by linearalgebra.symbolic.UnaryOperator
All Implemented Interfaces:
SymbolicValue
Direct Known Subclasses:
Inverse, Negative

public abstract class UnaryOperator
extends AbstractUnknown


Field Summary
private  SymbolicValue m_child
           
 
Fields inherited from interface linearalgebra.symbolic.SymbolicValue
ADDS, LEAF, MULT
 
Constructor Summary
UnaryOperator(SymbolicValue child)
           
 
Method Summary
protected abstract  double doOperation(double child)
           
 SymbolicValue getChild(int index)
          Returns the child node specifed by this index.
 int getChildCount()
          Returns the number of child nodes beneath this tree.
 double getNumericValue()
           
protected  void setChild(SymbolicValue child)
           
 
Methods inherited from class linearalgebra.symbolic.AbstractUnknown
addParent, appendParenthesisString, contains, getParent, getParentCount, isNormal, removeParent, scale, subTreeChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface linearalgebra.symbolic.SymbolicValue
getPrecedence
 

Field Detail

m_child

private SymbolicValue m_child
Constructor Detail

UnaryOperator

public UnaryOperator(SymbolicValue child)
Method Detail

setChild

protected final void setChild(SymbolicValue child)

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 final double getNumericValue()
                             throws UnboundValueError
Throws:
UnboundValueError

doOperation

protected abstract double doOperation(double child)