Class ZeroPenalty
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.ZeroPenalty
-
- All Implemented Interfaces:
Function<Vector,Double>
,RealScalarFunction
public class ZeroPenalty extends PenaltyFunction
This is a dummy zero cost (no cost) penalty function.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Constructor Summary
Constructors Constructor Description ZeroPenalty(int dimension)
Construct a no-cost penalty function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dimensionOfDomain()
Get the number of variables the function has.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.PenaltyFunction
dimensionOfRange
-
-
-
-
Method Detail
-
evaluate
public Double evaluate(Vector x)
Description copied from interface:Function
Evaluate the function f at x, where x is from the domain.- Parameters:
x
- x- Returns:
- f(x)
-
dimensionOfDomain
public int dimensionOfDomain()
Description copied from interface:Function
Get the number of variables the function has. For example, for a univariate function, the domain dimension is 1; for a bivariate function, the domain dimension is 2.- Returns:
- the number of variables
-
-