|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.context.RealtimeObject
org.jscience.mathematics.functions.Term
public final class Term
This class represents the term of a polynomial
such as x·y².
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javolution.context.RealtimeObject |
|---|
RealtimeObject.Factory<T extends RealtimeObject> |
| Nested classes/interfaces inherited from interface javolution.context.Realtime |
|---|
Realtime.ObjectSpace |
| Field Summary | |
|---|---|
static Term |
ONE
Holds the multiplicative identity. |
| Method Summary | |
|---|---|
int |
compareTo(Term that)
Compares this term with the one specified for order. |
Term |
divide(Term that)
Return the division of this term with the one specified. |
boolean |
equals(java.lang.Object obj)
Indicates if this term is equal to the object specified. |
int |
getPower(Variable var)
Returns the power of the specified variable. |
java.util.List<Variable> |
getVariables()
Returns the variables for this term (lexically ordered). |
int |
hashCode()
Returns a hash code for this term. |
Term |
times(Term that)
Return the product of this term with the one specified. |
Text |
toText()
Returns the text representation of this term. |
static Term |
valueOf(Variable v,
int n)
Return the term corresponding to the specified variable raised to the specified power. |
| Methods inherited from class javolution.context.RealtimeObject |
|---|
export, isLocal, move, moveHeap, preserve, toString, unpreserve |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Term ONE
| Method Detail |
|---|
public static Term valueOf(Variable v,
int n)
v - the variable.n - the power.
vn
java.lang.IllegalArgumentException - if n < 0public java.util.List<Variable> getVariables()
public int getPower(Variable var)
var - the variable for which the power is returned.
0 if
this term does not hold the specified variable.
java.lang.IllegalArgumentException - if (i < 0) || (i >= length())public Term times(Term that)
that - the term multiplier.
this · that
java.lang.IllegalArgumentException - if the specified term holds a
variable having the same symbol as one of the variable of
this term; but both variables are distinct.public Term divide(Term that)
that - the term divisor.
this / that
java.lang.UnsupportedOperationException - if this division would
result in negative power.
java.lang.IllegalArgumentException - if the specified term holds a
variable having the same symbol as one of the variable of
this term; but both variables are distinct.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare for equality.
true if this term and the specified object are
considered equal; false otherwise.public final int hashCode()
hashCode in class java.lang.Objectpublic Text toText()
toText in interface RealtimetoText in class RealtimeObjectpublic int compareTo(Term that)
compareTo in interface java.lang.Comparable<Term>that - the term to be compared to.
|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||