-
- All Superinterfaces:
Constraint
- All Known Implementing Classes:
BoundConstraint
,NegativityConstraint
,PositivityConstraint
,Unconstrained
public interface ScalarConstraint extends Constraint
Base interface for scalar parameter constraints.- Author:
- Alessandro Gnoatto
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
apply(double parameterToTest)
Forces the parameter to respect a certain condition.double
getLowerBound()
Returns the lower bound, possibly given by Double.NEGATIVE_INFINITY.double
getUpperBound()
Returns the upper bound, possibly given by Double.POSITIVE_INFINITY.
-
-
-
Method Detail
-
apply
double apply(double parameterToTest)
Forces the parameter to respect a certain condition.- Parameters:
parameterToTest
- The value to which the constraint should be applied.- Returns:
- the parameter after application of the constraint.
-
getLowerBound
double getLowerBound()
Returns the lower bound, possibly given by Double.NEGATIVE_INFINITY.- Returns:
- the lower bound.
-
getUpperBound
double getUpperBound()
Returns the upper bound, possibly given by Double.POSITIVE_INFINITY.- Returns:
- the upper bound.
-
-