SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.constrained.general
Class Constraints

java.lang.Object
  extended by com.numericalmethod.suanshu.optimization.constrained.general.Constraints
Direct Known Subclasses:
EqualityConstraints, InequalityConstraints

public abstract class Constraints
extends java.lang.Object

This class defines a set of constraints for a constrained optimization problem. The constraints define a feasible regions for the domain values of the objective function.

Here, the constraints are represented as a set of real valued functions that can take different signs: =, ≤, ≥.

E.g., hi(x) = 0 gj(x) ≤ 0

The conditions are further specified in the sub-classes.


Constructor Summary
Constraints(RealScalarFunction... constraints)
          Construct a constraint set for a constrained optimization problem.
 
Method Summary
 void addConstraint(RealScalarFunction c)
          Add a constraint to the set.
 RealScalarFunction[] constraints()
          Get the set of constraints.
 int nConstraints()
          Get the number of constraints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraints

public Constraints(RealScalarFunction... constraints)
Construct a constraint set for a constrained optimization problem.

Parameters:
constraints - the constraints
Method Detail

nConstraints

public int nConstraints()
Get the number of constraints.

Returns:
the number of constraints

constraints

public RealScalarFunction[] constraints()
Get the set of constraints.

Returns:
the set of constraints

addConstraint

public void addConstraint(RealScalarFunction c)
Add a constraint to the set.

Parameters:
c - an constraint

SuanShu, a Java numerical and statistical library

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