Class QPConstraintMatrix

java.lang.Object
org.hipparchus.linear.AbstractRealMatrix
org.hipparchus.optim.nonlinear.vector.constrained.QPConstraintMatrix
All Implemented Interfaces:
AnyMatrix, RealLinearOperator, RealMatrix, Blendable<RealMatrix>

public final class QPConstraintMatrix extends AbstractRealMatrix
Read-only, zero-copy row-oriented view of all linear constraints of a QP.

The represented matrix has the form:

     A = [ Ae          ]
         [ Ai          ]
         [ Ab          ]
         [ -Ab         ]
 

where each constraint gradient is stored as a row. The class keeps only references to the original equality, inequality and bounded-constraint matrices. In particular, the upper-bound block -Ab is generated on demand and is never stored.

The global row ordering is:

  1. equality constraints,
  2. inequality constraints,
  3. lower bounded constraints,
  4. upper bounded constraints.

The matrix is intentionally read-only. Calling copy() creates a physical independent matrix, but normal solver operations such as getEntry(int, int), getRowVector(int) and operate(RealVector) do not materialize the global matrix.

  • Constructor Details

    • QPConstraintMatrix

      public QPConstraintMatrix(int variableCount, RealMatrix equalityMatrix, RealMatrix inequalityMatrix, RealMatrix boundedMatrix)
      Build a row-oriented virtual QP constraint matrix.
      Parameters:
      variableCount - number of primal variables
      equalityMatrix - equality matrix, or null
      inequalityMatrix - inequality matrix, or null
      boundedMatrix - bounded-expression matrix, or null
  • Method Details