Class CourantPenalty
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.CourantPenalty
-
- All Implemented Interfaces:
Function<Vector,Double>
,RealScalarFunction
public class CourantPenalty extends MultiplierPenalty
This penalty function sums up the squared error penalties. It applies to equality constrained problems.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Field Summary
-
Fields inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
constraints, weights
-
-
Constructor Summary
Constructors Constructor Description CourantPenalty(EqualityConstraints constraints)
Construct a CourantPenalty penalty function from a collection of equality constraints.CourantPenalty(EqualityConstraints constraints, double weight)
Construct a CourantPenalty penalty function from a collection of equality constraints.CourantPenalty(EqualityConstraints constraints, double[] weights)
Construct a CourantPenalty penalty function from a collection of equality constraints.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Double
evaluate(Vector x)
Evaluate the function f at x, where x is from the domain.-
Methods inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
dimensionOfDomain
-
Methods inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
dimensionOfRange
-
-
-
-
Constructor Detail
-
CourantPenalty
public CourantPenalty(EqualityConstraints constraints, double[] weights)
Construct a CourantPenalty penalty function from a collection of equality constraints.- Parameters:
constraints
- a collection of equality constraintsweights
- the weights assigned to the constraints
-
CourantPenalty
public CourantPenalty(EqualityConstraints constraints, double weight)
Construct a CourantPenalty penalty function from a collection of equality constraints. We assign the same weight to all constraints.- Parameters:
constraints
- a collection of equality constraintsweight
- the same weight assigned to the constraints
-
CourantPenalty
public CourantPenalty(EqualityConstraints constraints)
Construct a CourantPenalty penalty function from a collection of equality constraints. We assign the same default weight to all constraints.- Parameters:
constraints
- a collection of equality constraints
-
-