de.erichseifert.gral.util
Class HaltonSequence
- java.lang.Object
-
- de.erichseifert.gral.util.HaltonSequence
-
- All Implemented Interfaces:
- java.io.Serializable, java.util.Iterator<java.lang.Double>
public class HaltonSequence extends java.lang.Object implements java.util.Iterator<java.lang.Double>, java.io.SerializableClass that calculates the values of the Halton sequence.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description HaltonSequence()Creates a new HaltonSequence object to the base of two.HaltonSequence(int base)Creates a new instance with the specified base.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanhasNext()Returns whether the iteration has more elements.java.lang.Doublenext()Returns the next element in the iteration.voidremove()Stub method to fulfillIteratorinterface.
-
-
-
Constructor Detail
-
HaltonSequence
public HaltonSequence()
Creates a new HaltonSequence object to the base of two.
-
HaltonSequence
public HaltonSequence(int base)
Creates a new instance with the specified base.- Parameters:
base- Base value.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns whether the iteration has more elements. This means it returnstrueifnextwould return an element rather than throwing an exception.- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.Double>- Returns:
trueif the iterator has more elements.
-
next
public java.lang.Double next()
Returns the next element in the iteration.- Specified by:
nextin interfacejava.util.Iterator<java.lang.Double>- Returns:
- the next element in the iteration.
-
remove
public void remove()
Stub method to fulfillIteratorinterface.- Specified by:
removein interfacejava.util.Iterator<java.lang.Double>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG