|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.analysis.expressions.OperatorExpression
org.jscience.mathematics.analysis.expressions.BinaryOperator
org.jscience.mathematics.analysis.expressions.symbolic.Rand
public class Rand
Class representing a uniformly distributed random number between two Expression objects.
The two Expresssion objects will typically be numbers but may be arbitrary
Expressions.
Example of use:
Constant c1 = new Constant( -7 ); Constant c2 = new Constant( 11 ); Expression c3 = new Rand( c1, c2 ); // uniformly distributed random number between -7 and 11. Expression e1 = ...; Expression e2 = ...; Expression e3 = new Rand( e1, e2 );
Expression,
BinaryOperator,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.jscience.mathematics.analysis.expressions.BinaryOperator |
|---|
deriv, evalValid, evalValue, secondOperand, valid |
| Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression |
|---|
firstOperand |
| Constructor Summary | |
|---|---|
Rand(Expression op1,
Expression op2)
Creates a Rand object that represent a random number between the two expressions. |
|
Rand(Expression op1,
Expression op2,
long seed)
Creates a Rand object that represent a random number between the two expressions. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object e)
DOCUMENT ME! |
double |
eval()
DOCUMENT ME! |
boolean |
isDifferentiable()
DOCUMENT ME! |
boolean |
isExpandable()
DOCUMENT ME! |
Expression |
optimize()
DOCUMENT ME! |
Expression |
replace(Expression a,
Expression b)
DOCUMENT ME! |
java.lang.String |
toJava()
DOCUMENT ME! |
java.lang.String |
toString()
DOCUMENT ME! |
java.lang.String |
toXML()
DOCUMENT ME! |
| Methods inherited from class org.jscience.mathematics.analysis.expressions.BinaryOperator |
|---|
diff, getElements, getSecondOperand, resetNumDiff, resetNumEval, setIndex, setNumberOfIndependents, setSecondOperand, toTaylorMap |
| Methods inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression |
|---|
contains, factor, getFirstOperand, isolate, isolate, setFirstOperand |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rand(Expression op1,
Expression op2,
long seed)
op1 - First Expression object.op2 - Second Expression object.seed - a seed for the random number generator.
public Rand(Expression op1,
Expression op2)
op1 - First Expression object.op2 - Second Expression object.| Method Detail |
|---|
public double eval()
public boolean isDifferentiable()
isDifferentiable in interface ExpressionisDifferentiable in class BinaryOperatorExpression.isDifferentiable()public boolean isExpandable()
isExpandable in interface ExpressionisExpandable in class BinaryOperatorExpression.isExpandable()
public Expression replace(Expression a,
Expression b)
a - DOCUMENT ME!b - DOCUMENT ME!
public boolean equals(java.lang.Object e)
equals in class java.lang.Objecte - DOCUMENT ME!
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toJava()
public Expression optimize()
public java.lang.String toXML()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||