Class ConstraintsUtils
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.constraint.ConstraintsUtils
-
public final class ConstraintsUtils extends Object
These are the utility functions for manipulating Constraints.
-
-
Constructor Summary
Constructors Constructor Description ConstraintsUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Vectorevaluate(Constraints constraints, Vector x)Evaluates the constraints.static booleanisSatisfied(Constraints constraints, Vector x)Checks if the constraints are satisfied.static booleanisSatisfied(Constraints constraints, Vector x, double epsilon)Checks if the constraints are satisfied.
-
-
-
Method Detail
-
isSatisfied
public static boolean isSatisfied(Constraints constraints, Vector x, double epsilon)
Checks if the constraints are satisfied.- Parameters:
constraints- the constraintsx- the value to evaluate the constraints atepsilon- a precision parameter: when a number |x| ≤ ε, it is considered 0- Returns:
trueif the constraints are satisfied
-
isSatisfied
public static boolean isSatisfied(Constraints constraints, Vector x)
Checks if the constraints are satisfied.- Parameters:
constraints- the constraintsx- the value to evaluate the constraints at- Returns:
trueif the constraints are satisfied
-
evaluate
public static Vector evaluate(Constraints constraints, Vector x)
Evaluates the constraints.- Parameters:
constraints- the constraintsx- the value to evaluate the constraints at- Returns:
- the constraint values
-
-