public class SetComp extends DefaultEvalSet
DefaultEvalSet.SubsetIterator<E>
Modifier and Type | Field and Description |
---|---|
protected Bounds |
bounds_
This stores general information about the bounds of the variables
in this set comprehension.
|
protected Envir |
env0_
This is the environment that defines all the free variables
of this set comprehension.
|
protected double |
estSize_ |
protected Envir |
outputEnvir_
The generated environment that contains the output values.
|
protected FlatPredList |
preds_
This FlatPredList is used to evaluate ALL members of the set.
|
protected net.sourceforge.czt.z.ast.ZName |
resultName_
The fresh ZName which will be bound to a member of the set.
|
memberList_
INFINITE_SIZE, UNKNOWN_SIZE
Constructor and Description |
---|
SetComp(FlatPredList preds,
net.sourceforge.czt.z.ast.ZName resultName,
Envir env0,
Bounds bnds)
The resultName must be for predsAll.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object e)
Tests for membership of the set.
|
double |
estSize()
Estimate the size of the set.
|
Iterator<net.sourceforge.czt.z.ast.Expr> |
matchIterator(Map<Object,net.sourceforge.czt.z.ast.Expr> argValues)
Iterate through the subset of this set that unifies with
the given substructures in args.
|
BigInteger |
maxSize()
The maximum size of the set in the default environment.
|
net.sourceforge.czt.z.ast.Expr |
nextMember()
Returns the next expression in the set.
|
String |
toString()
Each subclass should implement a nice toString.
|
equals, estSubsetSize, evaluateFully, getLower, getUpper, hashCode, isEmpty, iterator, listIterator, resetResult, size, sortedIterator, subsetIterator, toArray, toArray
accept, add, addAll, clear, containsAll, getAnn, getAnns, remove, removeAll, retainAll
create, getChildren
annsSize, getFactory, hasAnn, hasAnn, removeAnn, removeAnn
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
protected FlatPredList preds_
protected Envir env0_
protected Bounds bounds_
protected Envir outputEnvir_
protected double estSize_
protected net.sourceforge.czt.z.ast.ZName resultName_
public SetComp(FlatPredList preds, net.sourceforge.czt.z.ast.ZName resultName, Envir env0, Bounds bnds)
public BigInteger maxSize()
DefaultEvalSet
EvalSet provides a default implementation that always returns null.
maxSize
in class DefaultEvalSet
public double estSize()
EvalSet
EvalSet provides a default implementation that is the same as maxSize(), but converted to a double. So maxSize()==null gives EvalSet.INFINITE_SIZE here.
public boolean contains(Object e)
DefaultEvalSet
contains
in interface Collection<net.sourceforge.czt.z.ast.Expr>
contains
in interface Set<net.sourceforge.czt.z.ast.Expr>
contains
in class DefaultEvalSet
e
- The fully evaluated expression.public net.sourceforge.czt.z.ast.Expr nextMember()
DefaultEvalSet
memberSet_
.nextMember
in class DefaultEvalSet
public Iterator<net.sourceforge.czt.z.ast.Expr> matchIterator(Map<Object,net.sourceforge.czt.z.ast.Expr> argValues)
EvalSet
This method is intended purely to reduce the number of elements visited, so implementations are free to ignore otherSet if they wish. The result will contain no duplicates.
EvalSet provides a default implementation that calls iterator().
matchIterator
in class EvalSet
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.