use of com.sri.ai.expresso.type.RealInterval in project aic-expresso by aic-sri-international.
the class AbstractSingleVariableLinearRealArithmeticConstraintFeasibilityRegionStepSolver method getTypeLowerBoundAndStrictness.
protected Pair<Expression, Boolean> getTypeLowerBoundAndStrictness(Context context) {
if (typeLowerBoundAndStrictness == null) {
RealInterval type = getType(context);
Expression lowerBound = type.getLowerBound();
typeLowerBoundAndStrictness = pair(lowerBound, type.lowerBoundIsOpen());
}
return typeLowerBoundAndStrictness;
}
use of com.sri.ai.expresso.type.RealInterval in project aic-expresso by aic-sri-international.
the class AbstractSingleVariableLinearRealArithmeticConstraintFeasibilityRegionStepSolver method getTypeUpperBoundAndStrictness.
protected Pair<Expression, Boolean> getTypeUpperBoundAndStrictness(Context context) {
if (typeUpperBoundAndStrictess == null) {
RealInterval type = getType(context);
Expression upperBound = type.getUpperBound();
typeUpperBoundAndStrictess = pair(upperBound, type.upperBoundIsOpen());
}
return typeUpperBoundAndStrictess;
}
use of com.sri.ai.expresso.type.RealInterval in project aic-expresso by aic-sri-international.
the class AbstractSingleVariableLinearRealArithmeticConstraintFeasibilityRegionStepSolver method getTypeUpperBoundAndStrictness.
protected Pair<Expression, Boolean> getTypeUpperBoundAndStrictness(Context context) {
if (typeUpperBoundAndStrictess == null) {
RealInterval type = getType(context);
Expression upperBound = type.getUpperBound();
typeUpperBoundAndStrictess = pair(upperBound, type.upperBoundIsOpen());
}
return typeUpperBoundAndStrictess;
}
use of com.sri.ai.expresso.type.RealInterval in project aic-expresso by aic-sri-international.
the class AbstractSingleVariableLinearRealArithmeticConstraintFeasibilityRegionStepSolver method getTypeLowerBoundAndStrictness.
protected Pair<Expression, Boolean> getTypeLowerBoundAndStrictness(Context context) {
if (typeLowerBoundAndStrictness == null) {
RealInterval type = getType(context);
Expression lowerBound = type.getLowerBound();
typeLowerBoundAndStrictness = pair(lowerBound, type.lowerBoundIsOpen());
}
return typeLowerBoundAndStrictness;
}
use of com.sri.ai.expresso.type.RealInterval in project aic-expresso by aic-sri-international.
the class SingleVariableLinearRealArithmeticConstraint method getType.
/**
* Returns the {@link RealInterval} type of the constraint's variable.
* @param context
* @return
*/
public RealInterval getType(Context context) {
if (cachedType == null) {
Expression variableTypeExpression = getVariableTypeExpression(context);
Type type = context.getTypeFromTypeExpression(variableTypeExpression);
if (type instanceof RealExpressoType) {
cachedType = new RealInterval("]-infinity;infinity[");
// represents Real as real interval for uniformity
} else {
cachedType = (RealInterval) type;
}
}
return cachedType;
}
Aggregations