Class SieveResult
java.lang.Object
de.tilman_neumann.jml.factor.siqs.sieve.SieveResult
- All Implemented Interfaces:
java.lang.Iterable<SmoothCandidate>
,java.util.Iterator<SmoothCandidate>
public class SieveResult extends java.lang.Object implements java.lang.Iterable<SmoothCandidate>, java.util.Iterator<SmoothCandidate>
The result of a sieve run. Reusable, does not require to allocate new SmoothCandidates all the time.
-
Field Summary
Fields Modifier and Type Field Description SmoothCandidate[]
smoothCandidates
int
usedSize
-
Constructor Summary
Constructors Constructor Description SieveResult(int initalCapacity)
-
Method Summary
Modifier and Type Method Description void
commitNextSmoothCandidate()
boolean
hasNext()
java.util.Iterator<SmoothCandidate>
iterator()
SmoothCandidate
next()
SmoothCandidate
peekNextSmoothCandidate()
void
reset()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
smoothCandidates
-
usedSize
public int usedSize
-
-
Constructor Details
-
SieveResult
public SieveResult(int initalCapacity)
-
-
Method Details
-
reset
public void reset() -
peekNextSmoothCandidate
-
commitNextSmoothCandidate
public void commitNextSmoothCandidate() -
iterator
- Specified by:
iterator
in interfacejava.lang.Iterable<SmoothCandidate>
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfacejava.util.Iterator<SmoothCandidate>
-
next
- Specified by:
next
in interfacejava.util.Iterator<SmoothCandidate>
-