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 $

Constructor Index

 o Term(NCseries)
Creates a new term for a NCseries of given type.

Method Index

 o appendFactor(Factor)
Appends a Factor f to the monomial for this term.
 o compare(Term, Term)
Compares two terms $t1$, $t2$: returns $-1$ if $t1 < t2$, 0 if they're equal, and 1 if $t1 > t2$.
 o compare_to(Term)
Compares this term with term t: returns $-1$ if this $< t$, 0 if they're equal, and 1 if this $> t$.
 o getCoeff()
Gets the coefficient of this term.
 o getMonomial()
Returns the monomial of this term.
 o getTotalDegree()
Gets the total degree of this term.
 o insertFactor(Factor, int)
Inserts a Factor f into the monomial for this term at the given position.
 o reduce(Term)
Reduces the given term, so that adjacent similar variables are coalesced.
 o setCoeff(int)
Sets the coefficient of this term.
 o setMonomial(Vector)
Sets the monomial of this term to the given monomial.
 o times(Term)
Returns the product (non-commutative!) of this term with the given term.
 o toString()
Formats this term as a string and returns the result.

Constructors

 o Term
 public Term(NCseries parent)
Creates a new term for a NCseries of given type.

Methods

 o insertFactor
 public void insertFactor(Factor f,
                          int posn)
Inserts a Factor f into the monomial for this term at the given position.

 o getMonomial
 public Vector getMonomial()
Returns the monomial of this term.

 o setMonomial
 public void setMonomial(Vector new_monomial)
Sets the monomial of this term to the given monomial.

 o appendFactor
 public void appendFactor(Factor f)
Appends a Factor f to the monomial for this term.

 o getTotalDegree
 public int getTotalDegree()
Gets the total degree of this term.

 o getCoeff
 public int getCoeff()
Gets the coefficient of this term.

 o setCoeff
 public void setCoeff(int value)
Sets the coefficient of this term.

 o 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$.

 o reduce
 public void reduce(Term t)
Reduces the given term, so that adjacent similar variables are coalesced.

 o times
 public Term times(Term t2)
Returns the product (non-commutative!) of this term with the given term.

 o 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
 o 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