|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dautelle.realtime.RealtimeObject
com.dautelle.math.functions.Polynomial.Term
This class represents the term of a polynomial
such as x·y²
.
Nested Class Summary |
Nested classes inherited from class com.dautelle.realtime.RealtimeObject |
RealtimeObject.Factory |
Field Summary | |
static Polynomial.Term |
CONSTANT
Holds the term representing no variables. |
Method Summary | |
java.lang.StringBuffer |
appendTo(java.lang.StringBuffer sb)
Appends the text representation of this term to the StringBuffer argument. |
int |
compareTo(java.lang.Object o)
Compares this term with the specified term for order. |
Polynomial.Term |
divide(Polynomial.Term that)
Return the division of this term with the one specified. |
boolean |
equals(java.lang.Object o)
Indicates if this term is equal to the object specified. |
Operable |
evaluate()
Evaluates this term by replacing its variables by their current (context-local) values. |
java.lang.Object |
export()
Exports this object out of the current pool context. |
int |
getPower(Function.Variable v)
Return the power of the specified variable within this term. |
int |
hashCode()
Returns a hash code for this term. |
Polynomial.Term |
multiply(Polynomial.Term that)
Return the product of this term with the one specified. |
java.lang.Object |
toHeap()
Moves this object to the heap. |
java.lang.String |
toString()
Returns the string representation of this term. |
static Polynomial.Term |
valueOf(Function.Variable v,
int n)
Return the term corresponding to the specified variable raised to the specified power. |
Methods inherited from class com.dautelle.realtime.RealtimeObject |
clone, isLocalObject, isPoolObject, recycle |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Polynomial.Term CONSTANT
Method Detail |
public static Polynomial.Term valueOf(Function.Variable v, int n)
v
- the variable.n
- the power.
vn
java.lang.IllegalArgumentException
- if n <= 0
public int getPower(Function.Variable v)
v
- the variable.
0
if v is not part of
this term.public Polynomial.Term multiply(Polynomial.Term that)
that
- the term multiplier.
this·that
public Polynomial.Term divide(Polynomial.Term that)
that
- the term divisor.
this/that
java.lang.UnsupportedOperationException
- if this division would
result in negative power.public Operable evaluate()
variables
by their current (context-local) values.
null
if constant
term.
FunctionException
- if any of this term's variable is not set.public boolean equals(java.lang.Object o)
o
- the object to compare for equality.
true
if this term and the specified object are
considered equal; false
otherwise.public final int hashCode()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the term to compare with.
java.lang.ClassCastException
- if the specified object is not a term.public java.lang.StringBuffer appendTo(java.lang.StringBuffer sb)
StringBuffer
argument.
sb
- the StringBuffer
to append.
sb
public java.lang.String toString()
public java.lang.Object export()
Realtime
Realtime
members are exported as well (recursion).
This method affects only objects belonging to the current pool context.
To avoid pool depletion, a "free" object from the outer pool
is moved to replace the object being exported.
export
in interface Realtime
export
in class RealtimeObject
public java.lang.Object toHeap()
Realtime
Realtime
members are moved to the heap as well (recursion).
This method affects only objects belonging to a pool context
(current or not).
toHeap
in interface Realtime
toHeap
in class RealtimeObject
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |