org.lsmp.djep.sjep
Class PFunction

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

public class PFunction
extends AbstractPNode

Represents a function.

Author:
Rich Morris Created on 15-Dec-2004

Field Summary
 
Fields inherited from class org.lsmp.djep.sjep.AbstractPNode
pc
 
Constructor Summary
PFunction(PolynomialCreator pc, java.lang.String name, PostfixMathCommandI pfmc, PNodeI[] args)
           
 
Method Summary
 int compareTo(PFunction fun)
          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

PFunction

public PFunction(PolynomialCreator pc,
                 java.lang.String name,
                 PostfixMathCommandI pfmc,
                 PNodeI[] args)
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(PFunction fun)
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()
              throws ParseException
Description copied from interface: PNodeI
complete expansion. (1+x)^2 --> 1+2*x+x^2

Throws:
ParseException


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