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