lima.mathematical.factorisation.trialdivision
Class TrialDivider

java.lang.Object
  |
  +--lima.mathematical.factorisation.FactorisationAlgorithm
        |
        +--lima.mathematical.factorisation.trialdivision.TrialDivider

public final class TrialDivider
extends FactorisationAlgorithm

A class to implement the Trial Division factorisation algorithm.

See Also:
FactorisationAlgorithm

Constructor Summary
TrialDivider()
           
 
Method Summary
 void factorise(lima.mathematical.factorisation.Factorisation f)
          Attempt to factorise the composite part of the specified factorisation object.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class lima.mathematical.factorisation.FactorisationAlgorithm
factorise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrialDivider

public TrialDivider()
Method Detail

factorise

public void factorise(lima.mathematical.factorisation.Factorisation f)
Description copied from class: FactorisationAlgorithm
Attempt to factorise the composite part of the specified factorisation object. This method will examine a specified factorisation object and attempt to find prime factors of the composite factor contained therein. Whenever a new prime factor is found it will be supplied to the factorisation object by calling its "expand" method with the prime factor as an argument. Thus prime factors found by this method are automatically recorded in the supplied factorisation object and nothing is explicitly returned by this method call.

Specified by:
factorise in class FactorisationAlgorithm
Parameters:
f - - The factorisation object to examine.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

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