|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--lima.mathematical.factorisation.Factorisation
An object of this class represents the current state of a factorisation, consisting of a set of prime factors and a single composite factor. The composite factor can be targeted for further factorisation with a factorisation algorithm. When a factorisation algorithm discovers a new prime factor it may submit that prime factor to the factorisation object through the "expand" method, to further expand the factorisation. This method takes the single composite factor and repeatedly divides it with the prime factor specified, until the composite factor can be divided no further. After each successful division attempt a copy of the specified prime factor is automatically added to the set of prime factors. Numbers placed into the prime factor set are almost certainly prime, with certainty that is configurable. The single composite factor is guaranteed to be composite with absolute certainty.
| Constructor Summary | |
Factorisation(java.math.BigInteger n)
Construct a new factorisation object from the specified big integer. |
|
| Method Summary | |
void |
expand(java.math.BigInteger primeFactor)
Expand a factorisation object, with the specified prime factor. |
void |
expand(lima.mathematical.factorisation.Factorisation f)
Expand a factorisation object, by specifying another factorisation object. |
java.math.BigInteger |
getCompositeFactor()
Obtain the single composite factor. |
lima.mathematical.factorisation.Factor[] |
getPrimeFactors()
Obtain the set of prime factors. |
java.math.BigInteger |
getTarget()
Obtain the target integer. |
boolean |
isMaximal()
Determine whether or not a factorisation object represents the maximal factorisation of its target integer. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
Generate a string representation of a factorisation object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Factorisation(java.math.BigInteger n)
n - - the big integer to be factorised.| Method Detail |
public java.math.BigInteger getCompositeFactor()
public lima.mathematical.factorisation.Factor[] getPrimeFactors()
public java.math.BigInteger getTarget()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isMaximal()
public void expand(java.math.BigInteger primeFactor)
primeFactor - - the prime factor with which to expand the factorisation.public void expand(lima.mathematical.factorisation.Factorisation f)
f - - the factorisation object containing prime factors to expand with.public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||