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
public class LinearEqualityConstraint extends EqualityConstraint implements OptimizationData
A set of linear equality constraints given as Ax = b.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description LinearEqualityConstraint(double[][] a, double[] b)
Construct a set of linear equality constraints ax = b.LinearEqualityConstraint(RealMatrix a, RealVector b)
Construct a set of linear equality constraints ax = b.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dim()
Returns the dimensionality of the function domain.RealMatrix
getA()
Get the matrix of linear weights.RealMatrix
jacobian(RealVector x)
Returns the gradient of this function at (x)RealVector
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 Detail
-
LinearEqualityConstraint
public LinearEqualityConstraint(RealMatrix a, RealVector 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
-
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 Detail
-
getA
public RealMatrix 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
public RealVector value(RealVector x)
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
public RealMatrix jacobian(RealVector x)
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)
-
-