Class LinearEqualityConstraint
java.lang.Object
org.hipparchus.optim.nonlinear.vector.constrained.BoundedConstraint
org.hipparchus.optim.nonlinear.vector.constrained.EqualityConstraint
org.hipparchus.optim.nonlinear.vector.constrained.LinearEqualityConstraint
- All Implemented Interfaces:
MultivariateVectorFunction
,Constraint
,VectorDifferentiableFunction
,OptimizationData
A set of linear equality constraints given as Ax = b.
- Since:
- 3.1
-
Constructor Summary
ConstructorDescriptionLinearEqualityConstraint
(double[][] a, double[] b) Construct a set of linear equality constraints ax = b.Construct a set of linear equality constraints ax = b. -
Method Summary
Modifier and TypeMethodDescriptionint
dim()
Returns the dimensionality of the function domain.getA()
Get the matrix of linear weights.Returns the gradient of this function at (x)value
(RealVector x) Returns the value of this function at (x)Methods inherited from class org.hipparchus.optim.nonlinear.vector.constrained.BoundedConstraint
dimY, getLowerBound, getUpperBound, overshoot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hipparchus.optim.nonlinear.vector.constrained.VectorDifferentiableFunction
gradient, value
-
Constructor Details
-
LinearEqualityConstraint
Construct a set of linear equality constraints ax = b. Represents equations a[i].x = b[i], for each row of a.- Parameters:
a
- the matrix of linear weightsb
- the vector of constants
-
LinearEqualityConstraint
public LinearEqualityConstraint(double[][] a, double[] b) Construct a set of linear equality constraints ax = b. Represents equations a[i].x = b[i], for each row of a.- Parameters:
a
- the matrix of linear weightsb
- the vector of constants
-
-
Method Details
-
getA
Get the matrix of linear weights.- Returns:
- matrix of linear weights
-
dim
public int dim()Description copied from interface:VectorDifferentiableFunction
Returns the dimensionality of the function domain. If dim() returns (n) then this function expects an n-vector as its input.- Specified by:
dim
in interfaceVectorDifferentiableFunction
- Returns:
- the expected dimension of the function's domain
-
value
Description copied from interface:VectorDifferentiableFunction
Returns the value of this function at (x)- Specified by:
value
in interfaceVectorDifferentiableFunction
- Parameters:
x
- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-
jacobian
Description copied from interface:VectorDifferentiableFunction
Returns the gradient of this function at (x)- Specified by:
jacobian
in interfaceVectorDifferentiableFunction
- Parameters:
x
- a point to evaluate this gradient at- Returns:
- the gradient of this function at (x)
-