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[]smoothCandidatesintusedSize -
Constructor Summary
Constructors Constructor Description SieveResult(int initalCapacity) -
Method Summary
Modifier and Type Method Description voidcommitNextSmoothCandidate()booleanhasNext()java.util.Iterator<SmoothCandidate>iterator()SmoothCandidatenext()SmoothCandidatepeekNextSmoothCandidate()voidreset()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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:
iteratorin interfacejava.lang.Iterable<SmoothCandidate>
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfacejava.util.Iterator<SmoothCandidate>
-
next
- Specified by:
nextin interfacejava.util.Iterator<SmoothCandidate>
-