Class Projections

java.lang.Object
de.labathome.trustconstr.Projections

public class Projections extends Object
Linear operators that project onto the null space, range, and least-squares solution set of a constraint Jacobian. Counterpart to scipy's _trustregion_constr.projections. Pick the underlying factorisation (QR / SVD / Cholesky / augmented system) via ProjectionMethod.
  • Constructor Details

    • Projections

      public Projections()
  • Method Details

    • orthogonality

      public static double orthogonality(Matrix A, Matrix g)
      Measure orthogonality between a vector and the null space of a matrix. Compute a measure of orthogonality between the null space of the (possibly sparse) matrix A and a given vector g. The formula is a simplified (and cheaper) version of formula (3.13) from [1]: orth = norm(A g, ord=2)/(norm(A, ord='fro')*norm(g, ord=2)) [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal. "On the solution of equality constrained quadratic programming problems arising in optimization." SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395.
      Parameters:
      A - [n][m] matrix
      g - [m] vector
      Returns:
      how orthogonal g is to the nullspace of A
    • projections

      public static LinearOperator[] projections(Matrix A)
      Convenience overload: auto-select factorisation method, defaults for orthogonality / refinement / numerical-zero tolerances.
      Parameters:
      A - constraint Jacobian
      Returns:
      three-element array {nullSpace, leastSquares, rowSpace}
    • projections

      public static LinearOperator[] projections(Matrix A, ProjectionMethod method)
      Convenience overload with an explicit factorisation method.
      Parameters:
      A - constraint Jacobian
      method - projection-Jacobian factorisation method (or null to auto-select)
      Returns:
      three-element array {nullSpace, leastSquares, rowSpace}
    • projections

      public static LinearOperator[] projections(Matrix A, ProjectionMethod method, double orthTol)
      Convenience overload exposing the orthogonality tolerance.
      Parameters:
      A - constraint Jacobian
      method - projection-Jacobian factorisation method
      orthTol - tolerance for orthogonality refinement
      Returns:
      three-element array {nullSpace, leastSquares, rowSpace}
    • projections

      public static LinearOperator[] projections(Matrix A, ProjectionMethod method, double orthTol, int maxRefine)
      Convenience overload exposing the maximum number of refinement iterations.
      Parameters:
      A - constraint Jacobian
      method - projection-Jacobian factorisation method
      orthTol - tolerance for orthogonality refinement
      maxRefine - maximum number of iterative-refinement passes
      Returns:
      three-element array {nullSpace, leastSquares, rowSpace}
    • projections

      public static LinearOperator[] projections(Matrix A, ProjectionMethod method, double orthTol, int maxRefine, double tolerance)
      Return three linear operators related with a given matrix A. Uses iterative refinements described in [1] during the computation of Z in order to cope with the possibility of large roundoff errors. [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal. "On the solution of equality constrained quadratic programming problems arising in optimization." SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395.
      Parameters:
      A - [m][n] Matrix A used in the projection.
      method - Method used for compute the given linear operators.
      orthTol - Tolerance for iterative refinements.
      maxRefine - Maximum number of iterative refinements.
      tolerance - Tolerance for singular values.
      Returns:
      [3]: {Z, LS, Y} with Z : LinearOperator, shape (n, n) Null-space operator. For a given vector x, the null space operator is equivalent to apply a projection matrix P = I - A.T inv(A A.T) A to the vector. It can be shown that this is equivalent to project x into the null space of A. LS : LinearOperator, shape (m, n) Least-squares operator. For a given vector x, the least-squares operator is equivalent to apply a pseudoinverse matrix pinv(A.T) = inv(A A.T) A to the vector. It can be shown that this vector pinv(A.T) x is the least_square solution to A.T y = x. Y : LinearOperator, shape (n, m) Row-space operator. For a given vector x, the row-space operator is equivalent to apply a projection matrix Q = A.T inv(A A.T) to the vector. It can be shown that this vector y = Q x the minimum norm solution of A y = x.