- java.lang.Object
-
- net.finmath.fouriermethod.calibration.BoundConstraint
-
- All Implemented Interfaces:
Constraint
,ScalarConstraint
- Direct Known Subclasses:
NegativityConstraint
,PositivityConstraint
,Unconstrained
public class BoundConstraint extends Object implements ScalarConstraint
A class applying a bound constraint to a parameter.- Author:
- Alessandro Gnoatto
-
-
Constructor Summary
Constructors Constructor Description BoundConstraint(double lowerBound, double upperBound)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
apply(double parameterToTest)
Forces the parameter to respect a certain condition.double
getLowerBound()
Return the lower bound.double
getUpperBound()
Return the upper bound.
-
-
-
Method Detail
-
getLowerBound
public double getLowerBound()
Return the lower bound.- Specified by:
getLowerBound
in interfaceScalarConstraint
- Returns:
- the lower bound.
-
getUpperBound
public double getUpperBound()
Return the upper bound.- Specified by:
getUpperBound
in interfaceScalarConstraint
- Returns:
- the upper bound.
-
apply
public double apply(double parameterToTest)
Description copied from interface:ScalarConstraint
Forces the parameter to respect a certain condition.- Specified by:
apply
in interfaceScalarConstraint
- Parameters:
parameterToTest
- The value to which the constraint should be applied.- Returns:
- the parameter after application of the constraint.
-
-