|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nfunk.jep.JEP
org.lsmp.djep.groupJep.GroupJep
An extension of JEP which allows calculations over arbitary groups, such as the integers(exact answers) and rationals.
Field Summary | |
protected GroupI |
group
|
Fields inherited from class org.nfunk.jep.JEP |
allowAssignment, allowUndeclared, errorList, ev, funTab, implicitMul, numberFactory, opSet, parser, symTab |
Constructor Summary | |
GroupJep(GroupI group)
Create a new GroupJep instance with calculations over the given group. |
|
GroupJep(JEP j)
|
Method Summary | |
void |
addStandardConstants()
Adds the constants pi and e to the parser. |
void |
addStandardFunctions()
Adds the standard functions to the parser. |
Complex |
getComplexValue()
Calcuates the value of the expression and returns the result as a complex number. |
static Complex |
getComplexValue(java.lang.Object num)
A utility function which returns the complex aproximation of a number. |
GroupI |
getGroup()
|
Methods inherited from class org.nfunk.jep.JEP |
addComplex, addConstant, addFunction, addVariable, addVariable, addVariable, evaluate, getAllowAssignment, getAllowUndeclared, getErrorInfo, getFunctionTable, getImplicitMul, getNumberFactory, getOperatorSet, getParser, getSymbolTable, getTopNode, getTraverse, getValue, getValueAsObject, getVar, getVarValue, hasError, initFunTab, initSymTab, parse, parseExpression, removeFunction, removeVariable, setAllowAssignment, setAllowUndeclared, setImplicitMul, setTraverse, setVarValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GroupI group
Constructor Detail |
public GroupJep(GroupI group)
group
- The group to calculate over.public GroupJep(JEP j)
Method Detail |
public void addStandardFunctions()
JEP
addStandardFunctions
in class JEP
public void addStandardConstants()
JEP
addStandardConstants
in class JEP
public GroupI getGroup()
public Complex getComplexValue()
getComplexValue
in class JEP
public static Complex getComplexValue(java.lang.Object num)
num
- the object to be converted
HasComplexValueI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |