org.lsmp.djep.sjep
Class PVariable

java.lang.Object
  extended by org.lsmp.djep.sjep.AbstractPNode
      extended by org.lsmp.djep.sjep.PVariable
All Implemented Interfaces:
PNodeI

public class PVariable
extends AbstractPNode

Represents a variable.

Author:
Rich Morris Created on 14-Dec-2004

Field Summary
 
Fields inherited from class org.lsmp.djep.sjep.AbstractPNode
pc
 
Constructor Summary
PVariable(PolynomialCreator pc, XVariable var)
           
 
Method Summary
 int compareTo(PVariable vf)
          this < arg ---> -1 this > arg ---> 1
 boolean equals(PNodeI node)
          True is nodes represent the same parse trees
 PNodeI expand()
          complete expansion. (1+x)^2 --> 1+2*x+x^2
 Node toNode()
          Converts the node to standard JEP format.
 java.lang.String toString()
          Produces a string representation of the argument.
 
Methods inherited from class org.lsmp.djep.sjep.AbstractPNode
add, compareTo, div, invert, isOne, isZero, mul, negate, pow, sub
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.lsmp.djep.sjep.PNodeI
equals
 

Constructor Detail

PVariable

public PVariable(PolynomialCreator pc,
                 XVariable var)
Method Detail

equals

public boolean equals(PNodeI node)
Description copied from interface: PNodeI
True is nodes represent the same parse trees

Specified by:
equals in interface PNodeI
Overrides:
equals in class AbstractPNode

compareTo

public int compareTo(PVariable vf)
this < arg ---> -1 this > arg ---> 1


toString

public java.lang.String toString()
Description copied from interface: PNodeI
Produces a string representation of the argument.

Specified by:
toString in interface PNodeI
Overrides:
toString in class java.lang.Object

toNode

public Node toNode()
            throws ParseException
Description copied from interface: PNodeI
Converts the node to standard JEP format.

Throws:
ParseException

expand

public PNodeI expand()
Description copied from interface: PNodeI
complete expansion. (1+x)^2 --> 1+2*x+x^2



http://www.singularsys.com/jep Copyright © 2007 Singular Systems