public class RelSet extends EvalSet
EvalSet.SubsetIterator<E>INFINITE_SIZE, UNKNOWN_SIZE| Constructor and Description |
|---|
RelSet(net.sourceforge.czt.z.ast.Expr from,
net.sourceforge.czt.z.ast.Expr to,
boolean function,
boolean total,
boolean onto,
boolean injective)
Creates a new power set of the given base set.
|
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(net.sourceforge.czt.util.Visitor<R> visitor) |
boolean |
contains(Object obj) |
double |
estSize()
Estimate the size of the set.
|
String |
funcName()
This returns the function operator, in email markup.
|
static String |
funcName(boolean func,
boolean inj,
boolean tot,
boolean onto)
This returns the function operator that has the given
properties.
|
String |
funcNameUnicode()
This returns the function operator, in Unicode markup.
|
static String |
funcNameUnicode(boolean func,
boolean inj,
boolean tot,
boolean onto) |
net.sourceforge.czt.z.ast.Expr |
getDom() |
net.sourceforge.czt.z.ast.Expr |
getRan() |
boolean |
isEmpty() |
boolean |
isFunction() |
boolean |
isInjective() |
boolean |
isOnto() |
boolean |
isTotal() |
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.
|
int |
size()
TODO: calculate this correctly for functions with small/finite dom&ran.
|
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 otherSet)
Iterate through the intersection of this set
and the 'other' set.
|
String |
toString()
Each subclass should implement a nice toString.
|
add, addAll, clear, containsAll, equals, estSubsetSize, getAnn, getAnns, getLower, getUpper, hashCode, matchIterator, remove, removeAll, retainAll, toArray, toArraycreate, getChildrenannsSize, getFactory, hasAnn, hasAnn, removeAnn, removeAnnclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic RelSet(net.sourceforge.czt.z.ast.Expr from,
net.sourceforge.czt.z.ast.Expr to,
boolean function,
boolean total,
boolean onto,
boolean injective)
public net.sourceforge.czt.z.ast.Expr getDom()
public net.sourceforge.czt.z.ast.Expr getRan()
public boolean isFunction()
public boolean isTotal()
public boolean isOnto()
public boolean isInjective()
public boolean isEmpty()
public int size()
public BigInteger maxSize()
EvalSetEvalSet provides a default implementation that always returns null.
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 boolean contains(Object obj)
EvalException - if the given object is not an EvalSet.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 EvalSetUnsupportedOperationException - whenever this method is called.public ListIterator<net.sourceforge.czt.z.ast.Expr> listIterator()
EvalSetlistIterator in class EvalSetUnsupportedOperationException - whenever this method is called.public Iterator<net.sourceforge.czt.z.ast.Expr> sortedIterator()
EvalSetsortedIterator in class EvalSetUnsupportedOperationException - whenever this method is called.public Iterator<net.sourceforge.czt.z.ast.Expr> subsetIterator(EvalSet otherSet)
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 EvalSetUnsupportedOperationException - whenever this method is called.public static String funcName(boolean func, boolean inj, boolean tot, boolean onto)
public static String funcNameUnicode(boolean func, boolean inj, boolean tot, boolean onto)
public String funcName()
public String funcNameUnicode()
public String toString()
EvalSetCopyright © 2003–2016 Community Z Tools Project. All rights reserved.