Search in sources :

Example 1 with RealInterval

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);
}
Also used : RealInterval(net.sourceforge.interval.ia_math.RealInterval)

Example 2 with RealInterval

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);
}
Also used : RealInterval(net.sourceforge.interval.ia_math.RealInterval)

Example 3 with RealInterval

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);
}
Also used : RealInterval(net.sourceforge.interval.ia_math.RealInterval)

Example 4 with RealInterval

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);
}
Also used : RealInterval(net.sourceforge.interval.ia_math.RealInterval)

Example 5 with RealInterval

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);
}
Also used : RealInterval(net.sourceforge.interval.ia_math.RealInterval)

Aggregations

RealInterval (net.sourceforge.interval.ia_math.RealInterval)25 Expression (cbit.vcell.parser.Expression)7 ExpressionException (cbit.vcell.parser.ExpressionException)4 Issue (org.vcell.util.Issue)4 AbstractConstraint (cbit.vcell.constraints.AbstractConstraint)3 ConstraintContainerImpl (cbit.vcell.constraints.ConstraintContainerImpl)3 GeneralConstraint (cbit.vcell.constraints.GeneralConstraint)3 SimpleBounds (cbit.vcell.constraints.SimpleBounds)3 SimpleBoundsIssue (cbit.vcell.model.SimpleBoundsIssue)3 SpeciesContextSpecParameter (cbit.vcell.mapping.SpeciesContextSpec.SpeciesContextSpecParameter)2 Kinetics (cbit.vcell.model.Kinetics)2 KineticsParameter (cbit.vcell.model.Kinetics.KineticsParameter)2 MassActionKinetics (cbit.vcell.model.MassActionKinetics)2 SymbolTableEntry (cbit.vcell.parser.SymbolTableEntry)2 VCUnitEvaluator (cbit.vcell.parser.VCUnitEvaluator)2 VCUnitDefinition (cbit.vcell.units.VCUnitDefinition)2 VCUnitException (cbit.vcell.units.VCUnitException)2 ConstraintSolver (cbit.vcell.constraints.ConstraintSolver)1 SubVolume (cbit.vcell.geometry.SubVolume)1 SurfaceClass (cbit.vcell.geometry.SurfaceClass)1