All Packages Class Hierarchy This Package Previous Next Index
Class math.alg.PowerSeries.Term
java.lang.Object
|
+----math.alg.PowerSeries.Term
- public class Term
- extends Object
Represents terms of a Non-commutative power series. Terms consist
of an integer coefficient and a monomial.
- Version:
- $Id: Term.java,v 1.5 1999/02/12 20:39:52 djun Exp djun $
-
Term(NCseries)
- Creates a new term for a NCseries of given type.
-
appendFactor(Factor)
- Appends a Factor f to the monomial for this term.
-
compare(Term, Term)
- Compares two terms $t1$, $t2$: returns $-1$ if $t1 < t2$,
0 if they're equal, and 1 if $t1 > t2$.
-
compare_to(Term)
- Compares this term with term t: returns $-1$ if this $< t$, 0 if
they're equal, and 1 if this $> t$.
-
getCoeff()
- Gets the coefficient of this term.
-
getMonomial()
- Returns the monomial of this term.
-
getTotalDegree()
- Gets the total degree of this term.
-
insertFactor(Factor, int)
- Inserts a Factor f into the monomial for this term at
the given position.
-
reduce(Term)
- Reduces the given term, so that adjacent similar variables
are coalesced.
-
setCoeff(int)
- Sets the coefficient of this term.
-
setMonomial(Vector)
- Sets the monomial of this term to the given monomial.
-
times(Term)
- Returns the product (non-commutative!) of this term with the
given term.
-
toString()
- Formats this term as a string and returns the result.
Term
public Term(NCseries parent)
- Creates a new term for a NCseries of given type.
insertFactor
public void insertFactor(Factor f,
int posn)
- Inserts a Factor f into the monomial for this term at
the given position.
getMonomial
public Vector getMonomial()
- Returns the monomial of this term.
setMonomial
public void setMonomial(Vector new_monomial)
- Sets the monomial of this term to the given monomial.
appendFactor
public void appendFactor(Factor f)
- Appends a Factor f to the monomial for this term.
getTotalDegree
public int getTotalDegree()
- Gets the total degree of this term.
getCoeff
public int getCoeff()
- Gets the coefficient of this term.
setCoeff
public void setCoeff(int value)
- Sets the coefficient of this term.
compare_to
public int compare_to(Term t)
- Compares this term with term t: returns $-1$ if this $< t$, 0 if
they're equal, and 1 if this $> t$.
reduce
public void reduce(Term t)
- Reduces the given term, so that adjacent similar variables
are coalesced.
times
public Term times(Term t2)
- Returns the product (non-commutative!) of this term with the
given term.
toString
public String toString()
- Formats this term as a string and returns the result. Note: This
prints the coefficient, but not the sign of the coefficient, to
make things easier for higher text formating routines.
- Overrides:
- toString in class Object
compare
public static int compare(Term t1,
Term t2)
- Compares two terms $t1$, $t2$: returns $-1$ if $t1 < t2$,
0 if they're equal, and 1 if $t1 > t2$.
All Packages Class Hierarchy This Package Previous Next Index