Class SortedIntegerArray
- java.lang.Object
-
- de.tilman_neumann.jml.factor.base.SortedIntegerArray
-
public class SortedIntegerArray extends Object
A reused buffer to store small factors temporarily during trial division.- Author:
- Tilman Neumann
-
-
Constructor Summary
Constructors Constructor Description SortedIntegerArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int factor)Add a factor.voidadd(int factor, short power)Add a factor to the given power.short[]copyExponents()int[]copyFactors()intget(int i)intgetExponent(int i)voidreset()reset() must be called before using for a new Q.intsize()StringtoString()
-
-
-
Method Detail
-
reset
public void reset()
reset() must be called before using for a new Q.
-
add
public void add(int factor)
Add a factor.- Parameters:
factor-
-
add
public void add(int factor, short power)Add a factor to the given power.- Parameters:
factor-power-
-
get
public int get(int i)
- Parameters:
i-- Returns:
- the i.th entry
-
getExponent
public int getExponent(int i)
- Parameters:
i-- Returns:
- the i.th exponent
-
size
public int size()
-
copyFactors
public int[] copyFactors()
-
copyExponents
public short[] copyExponents()
-
-