lima.mathematical.factorisation
Class FactorSet

java.lang.Object
  |
  +--lima.mathematical.factorisation.FactorSet
Direct Known Subclasses:
TestFactorSet

public class FactorSet
extends java.lang.Object

An object of this class represents a set of unique factors, of the form "x to the power of y". The factors contained within a factor set object are kept automatically in order at all times. A new factor may be added to the factor set by calling the "multiply" method, and passing the new factor as an argument. A factor set object of this type, may be used to conveniently accumulate factors produced by any given process.


Constructor Summary
protected FactorSet()
          Construct an empty factor set object.
 
Method Summary
 int length()
          Determine the number of unique factors contained, within a factor set object.
static void main(java.lang.String[] args)
           
protected  void multiply(java.math.BigInteger n)
          Add a new factor to a factor set object.
protected  lima.mathematical.factorisation.Factor[] toArray()
          Convert a factor set object into an array of factor objects.
 java.lang.String toString()
          Generate a textual description of a factor set object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactorSet

protected FactorSet()
Construct an empty factor set object.

Method Detail

toString

public java.lang.String toString()
Generate a textual description of a factor set object.

Overrides:
toString in class java.lang.Object

toArray

protected lima.mathematical.factorisation.Factor[] toArray()
Convert a factor set object into an array of factor objects.


length

public int length()
Determine the number of unique factors contained, within a factor set object.


multiply

protected void multiply(java.math.BigInteger n)
Add a new factor to a factor set object. The operation is equivalent to the operation of multiplying the factor set object with the new factor.


main

public static void main(java.lang.String[] args)