Package edu.jas.ps
Class ExpVectorIterator
- java.lang.Object
-
- edu.jas.ps.ExpVectorIterator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ExpVectorcurrentdata structure.protected booleanempty(package private) booleaninfinite(package private) java.util.Iterator<java.util.List<java.lang.Long>>liter(package private) intnvarprotected inttotalDegree(package private) longupperBound
-
Constructor Summary
Constructors Modifier Constructor Description ExpVectorIterator(int nv)ExpVector iterator constructor.protectedExpVectorIterator(int nv, boolean inf, long ub)ExpVector iterator constructor.ExpVectorIterator(int nv, long ub)ExpVector iterator constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Test for availability of a next long.ExpVectornext()Get next ExpVector.voidremove()Remove a tuple if allowed.
-
-
-
Field Detail
-
current
ExpVector current
data structure.
-
liter
java.util.Iterator<java.util.List<java.lang.Long>> liter
-
totalDegree
protected int totalDegree
-
empty
protected boolean empty
-
upperBound
final long upperBound
-
infinite
final boolean infinite
-
nvar
final int nvar
-
-
Constructor Detail
-
ExpVectorIterator
public ExpVectorIterator(int nv)
ExpVector iterator constructor.- Parameters:
nv- number of variables.
-
ExpVectorIterator
public ExpVectorIterator(int nv, long ub)ExpVector iterator constructor.- Parameters:
nv- number of variables.ub- upper bound for the components.
-
ExpVectorIterator
protected ExpVectorIterator(int nv, boolean inf, long ub)ExpVector iterator constructor.- Parameters:
nv- number of variables.inf- true, if all elements between 0 and upper bound are enumerated, false, if only elements of exact upper bund are to be processed.ub- an upper bound for the entries.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Test for availability of a next long.- Specified by:
hasNextin interfacejava.util.Iterator<ExpVector>- Returns:
- true if the iteration has more ExpVectors, else false.
-
next
public ExpVector next()
Get next ExpVector.- Specified by:
nextin interfacejava.util.Iterator<ExpVector>- Returns:
- next ExpVector.
-
remove
public void remove()
Remove a tuple if allowed.- Specified by:
removein interfacejava.util.Iterator<ExpVector>
-
-