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, toArraycreate, getChildrenannsSize, getFactory, hasAnn, hasAnn, removeAnn, removeAnnclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streamprotected 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()
EvalSetEvalSet provides a default implementation that always returns null.
public int size()
public 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 Iterator<net.sourceforge.czt.z.ast.Expr> iterator()
EvalSetiterator 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 EvalSetpublic ListIterator<net.sourceforge.czt.z.ast.Expr> listIterator()
EvalSetlistIterator in class EvalSetpublic Iterator<net.sourceforge.czt.z.ast.Expr> sortedIterator()
EvalSetsortedIterator in class EvalSetpublic Iterator<net.sourceforge.czt.z.ast.Expr> subsetIterator(EvalSet other)
EvalSetEvalSet 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 EvalSetpublic 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 EvalSetpublic boolean isEmpty()
public boolean equals(Object s2)
EvalSetpublic BigInteger getLower()
EvalSetFlatEvalSet provides a default implementation that always returns null.
public void setLower(BigInteger lower)
lower - Null means no known lower bound.public BigInteger getUpper()
EvalSetEvalSet 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.