- All Superinterfaces:
Constraint
- All Known Implementing Classes:
BoundConstraint
,NegativityConstraint
,PositivityConstraint
,Unconstrained
Base interface for scalar parameter constraints.
- Author:
- Alessandro Gnoatto
-
Method Summary
Modifier and TypeMethodDescriptiondouble
apply(double parameterToTest)
Forces the parameter to respect a certain condition.double
Returns the lower bound, possibly given by Double.NEGATIVE_INFINITY.double
Returns the upper bound, possibly given by Double.POSITIVE_INFINITY.
-
Method Details
-
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.
-