Package de.labathome.trustconstr
Class Projections
java.lang.Object
de.labathome.trustconstr.Projections
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleorthogonality(Matrix A, Matrix g) Measure orthogonality between a vector and the null space of a matrix.static LinearOperator[]Convenience overload: auto-select factorisation method, defaults for orthogonality / refinement / numerical-zero tolerances.static LinearOperator[]projections(Matrix A, ProjectionMethod method) Convenience overload with an explicit factorisation method.static LinearOperator[]projections(Matrix A, ProjectionMethod method, double orthTol) Convenience overload exposing the orthogonality tolerance.static LinearOperator[]projections(Matrix A, ProjectionMethod method, double orthTol, int maxRefine) Convenience overload exposing the maximum number of refinement iterations.static LinearOperator[]projections(Matrix A, ProjectionMethod method, double orthTol, int maxRefine, double tolerance) Return three linear operators related with a given matrix A.
-
Constructor Details
-
Projections
public Projections()
-
-
Method Details
-
orthogonality
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) matrixAand a given vectorg. 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] matrixg- [m] vector- Returns:
- how orthogonal g is to the nullspace of A
-
projections
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
Convenience overload with an explicit factorisation method.- Parameters:
A- constraint Jacobianmethod- projection-Jacobian factorisation method (ornullto auto-select)- Returns:
- three-element array
{nullSpace, leastSquares, rowSpace}
-
projections
Convenience overload exposing the orthogonality tolerance.- Parameters:
A- constraint Jacobianmethod- projection-Jacobian factorisation methodorthTol- 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 Jacobianmethod- projection-Jacobian factorisation methodorthTol- tolerance for orthogonality refinementmaxRefine- 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 ofZin 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] MatrixAused 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 matrixP = I - A.T inv(A A.T) Ato the vector. It can be shown that this is equivalent to projectxinto the null space ofA. LS : LinearOperator, shape (m, n) Least-squares operator. For a given vectorx, the least-squares operator is equivalent to apply a pseudoinverse matrixpinv(A.T) = inv(A A.T) Ato the vector. It can be shown that this vectorpinv(A.T) xis the least_square solution toA.T y = x. Y : LinearOperator, shape (n, m) Row-space operator. For a given vectorx, the row-space operator is equivalent to apply a projection matrixQ = A.T inv(A A.T)to the vector. It can be shown that this vectory = Q xthe minimum norm solution ofA y = x.
-