use of net.sourceforge.interval.ia_math.RealInterval in project vcell by virtualcell.
the class ASTAndNode method evaluateInterval.
public RealInterval evaluateInterval(RealInterval[] intervals) throws ExpressionException {
if (jjtGetNumChildren() != 2) {
throw new ExpressionException("Expected two children");
}
RealInterval first = jjtGetChild(0).evaluateInterval(intervals);
RealInterval second = jjtGetChild(1).evaluateInterval(intervals);
setInterval(IAMath.vcell_and(first, second), intervals);
return getInterval(intervals);
}
use of net.sourceforge.interval.ia_math.RealInterval in project vcell by virtualcell.
the class ASTAndNode method bind.
public void bind(SymbolTable symbolTable) throws ExpressionBindingException {
super.bind(symbolTable);
// either true or false
setInterval(new RealInterval(0.0, 1.0), null);
}
use of net.sourceforge.interval.ia_math.RealInterval in project vcell by virtualcell.
the class ASTAddNode method evaluateInterval.
//
// sum of intervals
//
public RealInterval evaluateInterval(RealInterval[] intervals) throws ExpressionException {
RealInterval sum = jjtGetChild(0).evaluateInterval(intervals);
for (int i = 1; i < jjtGetNumChildren(); i++) {
sum = IAMath.add(jjtGetChild(i).evaluateInterval(intervals), sum);
}
setInterval(sum, intervals);
return getInterval(intervals);
}
use of net.sourceforge.interval.ia_math.RealInterval in project vcell by virtualcell.
the class ASTOrNode method evaluateInterval.
public RealInterval evaluateInterval(RealInterval[] intervals) throws ExpressionException {
if (jjtGetNumChildren() != 2) {
throw new ExpressionException("Expected two children");
}
RealInterval first = jjtGetChild(0).evaluateInterval(intervals);
RealInterval second = jjtGetChild(1).evaluateInterval(intervals);
setInterval(IAMath.vcell_or(first, second), intervals);
return getInterval(intervals);
}
use of net.sourceforge.interval.ia_math.RealInterval in project vcell by virtualcell.
the class ASTOrNode method bind.
public void bind(SymbolTable symbolTable) throws ExpressionBindingException {
super.bind(symbolTable);
// either true or false
setInterval(new RealInterval(0.0, 1.0), null);
}
Aggregations