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
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
ConstructorsConstructorDescriptionCourantPenalty
(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
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 Details
-
CourantPenalty
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
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
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
-
-
Method Details
-
evaluate
Description copied from interface:Function
Evaluate the function f at x, where x is from the domain.- Parameters:
x
- x- Returns:
- f(x)
-