public class FuzzySet extends EvalSet
EvalSet.SubsetIterator<E>
Modifier and Type | Field and Description |
---|---|
protected double |
estSize_ |
protected BigInteger |
lower_ |
protected BigInteger |
maxSize_ |
protected String |
name_ |
protected BigInteger |
upper_ |
INFINITE_SIZE, UNKNOWN_SIZE
Constructor and Description |
---|
FuzzySet(String name,
double estSize,
BigInteger maxSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object obj) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object s2)
Tests for the equality of any two sets.
|
double |
estSize()
Estimate the size of the set.
|
BigInteger |
getLower()
The lower bound on numeric elements, if any, else null.
|
BigInteger |
getUpper()
The upper bound on numeric elements, if any, else null.
|
boolean |
isEmpty() |
Iterator<net.sourceforge.czt.z.ast.Expr> |
iterator()
Iterate through all members of the set.
|
ListIterator<net.sourceforge.czt.z.ast.Expr> |
listIterator()
Iterate forwards/backwards through all members of the set.
|
BigInteger |
maxSize()
The maximum size of the set in the default environment.
|
void |
setLower(BigInteger lower)
Set the optional lower bound.
|
void |
setUpper(BigInteger upper)
Set the optional upper bound.
|
int |
size() |
Iterator<net.sourceforge.czt.z.ast.Expr> |
sortedIterator()
Iterate through all members of the set in sorted order.
|
Iterator<net.sourceforge.czt.z.ast.Expr> |
subsetIterator(EvalSet other)
Iterate through the intersection of this set
and the 'other' set.
|
String |
toString()
Outputs "set(estSize,maxSize)", or
"set(estSize,maxSize,Range)" if integer bounds information is known.
|
accept, add, addAll, clear, estSubsetSize, getAnn, getAnns, hashCode, matchIterator, remove, removeAll, retainAll, toArray, toArray
create, getChildren
annsSize, getFactory, hasAnn, hasAnn, removeAnn, removeAnn
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
protected String name_
protected double estSize_
protected BigInteger maxSize_
protected BigInteger lower_
protected BigInteger upper_
public FuzzySet(String name, double estSize, BigInteger maxSize)
public BigInteger maxSize()
EvalSet
EvalSet provides a default implementation that always returns null.
public int size()
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 Iterator<net.sourceforge.czt.z.ast.Expr> iterator()
EvalSet
iterator
in interface Iterable<net.sourceforge.czt.z.ast.Expr>
iterator
in interface Collection<net.sourceforge.czt.z.ast.Expr>
iterator
in interface Set<net.sourceforge.czt.z.ast.Expr>
iterator
in class EvalSet
public ListIterator<net.sourceforge.czt.z.ast.Expr> listIterator()
EvalSet
listIterator
in class EvalSet
public Iterator<net.sourceforge.czt.z.ast.Expr> sortedIterator()
EvalSet
sortedIterator
in class EvalSet
public Iterator<net.sourceforge.czt.z.ast.Expr> subsetIterator(EvalSet other)
EvalSet
EvalSet provides a default implementation that it iterates through the smaller of the two sets and checks membership in the other. TODO: add unit tests for this.
subsetIterator
in class EvalSet
public boolean contains(Object obj)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<net.sourceforge.czt.z.ast.Expr>
containsAll
in interface Set<net.sourceforge.czt.z.ast.Expr>
containsAll
in class EvalSet
public boolean isEmpty()
public boolean equals(Object s2)
EvalSet
public BigInteger getLower()
EvalSet
FlatEvalSet provides a default implementation that always returns null.
public void setLower(BigInteger lower)
lower
- Null means no known lower bound.public BigInteger getUpper()
EvalSet
EvalSet provides a default implementation that always returns null.
public void setUpper(BigInteger upper)
upper
- Null means no known upper bound.Copyright © 2003–2016 Community Z Tools Project. All rights reserved.