|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nfunk.jep.function.PostfixMathCommand org.lsmp.djep.xjep.function.SumType org.lsmp.djep.xjep.function.Sum
public class Sum
A sum function Sum(x^2,x,1,10) finds the sum of x^2 with x running from 1 to 10. Sum(x^2,x,1,10,2) calculates the 1^2+3^2+5^2+7^2+9^2 i.e. in steps of 2.
Field Summary |
---|
Fields inherited from class org.lsmp.djep.xjep.function.SumType |
---|
name |
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand |
---|
curNumberOfParameters, numberOfParameters |
Constructor Summary | |
---|---|
Sum(JEP j)
|
Method Summary | |
---|---|
java.lang.Object |
evaluate(java.lang.Object[] elements)
Evaluates the function given the set of y values. |
Methods inherited from class org.lsmp.djep.xjep.function.SumType |
---|
checkNumberOfParameters, evaluate, evaluate, run |
Methods inherited from class org.nfunk.jep.function.PostfixMathCommand |
---|
checkStack, getNumberOfParameters, setCurNumberOfParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sum(JEP j)
Method Detail |
---|
public java.lang.Object evaluate(java.lang.Object[] elements) throws ParseException
SumType
evaluate
in class SumType
elements
- the y values
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |