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 void
add(int factor)
Add a factor.void
add(int factor, short power)
Add a factor to the given power.short[]
copyExponents()
int[]
copyFactors()
int
get(int i)
int
getExponent(int i)
void
reset()
reset() must be called before using for a new Q.int
size()
String
toString()
-
-
-
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()
-
-