public class FlatUnion extends FlatEvalSet
Modifier and Type | Field and Description |
---|---|
protected Bounds |
bounds_
The most recent variable bounds information.
|
Constructor and Description |
---|
FlatUnion(net.sourceforge.czt.z.ast.ZName a,
net.sourceforge.czt.z.ast.ZName b,
net.sourceforge.czt.z.ast.ZName s)
Creates a new instance of FlatUnion
|
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(net.sourceforge.czt.util.Visitor<R> visitor)
Calls visitor.visitPred (preferably) or visitor.visitTerm.
|
Mode |
chooseMode(Envir env)
Choose the mode that this predicate could use in this environment.
|
double |
estSize(Envir env)
Estimate the size of the set in a given environment.
|
double |
estSubsetSize(Envir env,
net.sourceforge.czt.z.ast.ZName elem)
Estimate the size of {x:this | x=elem} in a given environment.
|
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 |
inferBounds(Bounds bnds)
Numeric bounds information can flow both ways.
|
boolean |
nextEvaluation()
Generates the next solution that satisfies this predicate.
|
String |
toString()
Iterate through all members of this set that might
equal element (which must be fully evaluated).
|
freeVars, getArgs, getEnvir, getLastArg, getMode, indent, modeAllDefined, modeCollection, modeFunction, modeOneOutput, printArg, printBinOp, printLastArg, printName, printQuant, setMode, startEvaluation
protected Bounds bounds_
public FlatUnion(net.sourceforge.czt.z.ast.ZName a, net.sourceforge.czt.z.ast.ZName b, net.sourceforge.czt.z.ast.ZName s)
public boolean inferBounds(Bounds bnds)
inferBounds
in class FlatPred
bnds
- The database of lower and upper bounds for integer variables.The default implementation infers nothing and returns false.
public Mode chooseMode(Envir env)
FlatPred
chooseMode
in class FlatPred
public boolean nextEvaluation()
FlatPred
nextEvaluation
in class FlatPred
public BigInteger getLower()
public BigInteger getUpper()
public double estSize(Envir env)
public double estSubsetSize(Envir env, net.sourceforge.czt.z.ast.ZName elem)
public String toString()
toString
in class FlatPred
public <R> R accept(net.sourceforge.czt.util.Visitor<R> visitor)
FlatPred
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.