SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.constrained.constraint
Class ConstraintsUtils

java.lang.Object
  extended by com.numericalmethod.suanshu.optimization.constrained.constraint.ConstraintsUtils

public class ConstraintsUtils
extends java.lang.Object

These are the utility functions for manipulating Constraints.


Constructor Summary
ConstraintsUtils()
           
 
Method Summary
static Vector evaluate(Constraints constraints, Vector x)
          Evaluate the constraints.
static boolean isSatisfied(Constraints constraints, Vector x)
          Check if the constraints are satisfied.
static boolean isSatisfied(Constraints constraints, Vector x, double epsilon)
          Check if the constraints are satisfied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintsUtils

public ConstraintsUtils()
Method Detail

isSatisfied

public static boolean isSatisfied(Constraints constraints,
                                  Vector x,
                                  double epsilon)
Check if the constraints are satisfied.

Parameters:
constraints - the constraints
x - the value to evaluate the constraints at
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
Returns:
true if the constraints are satisfied

isSatisfied

public static boolean isSatisfied(Constraints constraints,
                                  Vector x)
Check if the constraints are satisfied.

Parameters:
constraints - the constraints
x - the value to evaluate the constraints at
Returns:
true if the constraints are satisfied

evaluate

public static Vector evaluate(Constraints constraints,
                              Vector x)
Evaluate the constraints.

Parameters:
constraints - the constraints
x - the value to evaluate the constraints at
Returns:
the constraint values

SuanShu, a Java numerical and statistical library

Copyright © 2012 Numerical Method Inc. Ltd. All Rights Reserved.