Click or drag to resize

Constraint Class

Class Constraint represents a constraint in a constrained optimization problem.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public abstract class Constraint : ICloneable

The Constraint type exposes the following members.

Constructors
  NameDescription
Public methodConstraint
Constructs an empty constraint object. Behavior of the constructed object is undefined.
Public methodConstraint(Constraint)
Creates a copy of the given other constraint object.
Public methodConstraint(ConstraintType)
Constructs a constraint object with the given constraint type.
Public methodConstraint(ConstraintType, Double)
Constructs a constraint object with the given constraint type and tolerance.
Top
Properties
  NameDescription
Public propertyTolerance
Gets and sets the tolerance for determining whether or not this constraint is satisfied at a particular point. For example the equality constraint c(x) = 0 will be considered to be satisfied at a point x0 if |c(x0)| < Tolerance, and a inequality constraint c(x) >= 0 will be considered to be satisfied at a point x0 if c(x0) >= -tolerance_.
Public propertyType
Gets and sets the type of the constraint, either equality or inequality.
Top
Methods
  NameDescription
Public methodClone
Returns a copy of self.
Public methodEvaluateConstraintFunction(Double)
Evaluates the constraint function at the given point.
Public methodEvaluateConstraintFunction(DoubleVector)
Evaluates the constraint function at the given point.
Public methodGradient(DoubleVector)
Evaluates the gradient of the constraint function and returns this value.
Public methodGradient(DoubleVector, DoubleVector)
Evaluates the gradient of the constraint function and places in the given vector.
Public methodIsSatisfied(DoubleVector)
Determines if the constraint represented by this instance is satisfied at the given point.
Public methodIsSatisfied(DoubleVector, Double)
Determines if the constraint represented by this instance is satisfied at the given point withing the given tolerance. The tolerance associated with this object, accessed with the Tolerance property, is ignored.
Top
Fields
  NameDescription
Protected fieldconstraintType_
The constraint type.
Public fieldStatic memberDEFAULT_TOLERANCE
Default value for the tolerance used when determining whether or not a constraint is satified. This tolerance value will be used if no tolerance value is supplied when constructing a Constraint object, or set via the Tolerance property.
Top
Remarks
Upper bound constraints are represented as negations of lower bound constraints.
See Also