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 intdim()Returns the dimensionality of the function domain.RealMatrixgetA()Get the matrix of linear weights.RealMatrixjacobian(RealVector x)Returns the gradient of this function at (x)RealVectorvalue(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:VectorDifferentiableFunctionReturns the dimensionality of the function domain. If dim() returns (n) then this function expects an n-vector as its input.- Specified by:
dimin interfaceVectorDifferentiableFunction- Returns:
- the expected dimension of the function's domain
-
value
public RealVector value(RealVector x)
Description copied from interface:VectorDifferentiableFunctionReturns the value of this function at (x)- Specified by:
valuein 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:VectorDifferentiableFunctionReturns the gradient of this function at (x)- Specified by:
jacobianin interfaceVectorDifferentiableFunction- Parameters:
x- a point to evaluate this gradient at- Returns:
- the gradient of this function at (x)
-
-