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, toArrayaccept, add, addAll, clear, containsAll, getAnn, getAnns, remove, removeAll, retainAllcreate, getChildrenannsSize, getFactory, hasAnn, hasAnn, removeAnn, removeAnnclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streamprotected 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()
DefaultEvalSetEvalSet provides a default implementation that always returns null.
maxSize in class DefaultEvalSetpublic double estSize()
EvalSetEvalSet 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)
DefaultEvalSetcontains in interface Collection<net.sourceforge.czt.z.ast.Expr>contains in interface Set<net.sourceforge.czt.z.ast.Expr>contains in class DefaultEvalSete - The fully evaluated expression.public net.sourceforge.czt.z.ast.Expr nextMember()
DefaultEvalSetmemberSet_.nextMember in class DefaultEvalSetpublic Iterator<net.sourceforge.czt.z.ast.Expr> matchIterator(Map<Object,net.sourceforge.czt.z.ast.Expr> argValues)
EvalSetThis 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 EvalSetCopyright © 2003–2016 Community Z Tools Project. All rights reserved.