Package jdistlib.accelerator
Class PivotedQrFactor
java.lang.Object
jdistlib.accelerator.PivotedQrFactor
Immutable column-pivoted Householder QR factorization.
-
Constructor Summary
ConstructorsConstructorDescriptionPivotedQrFactor(int rows, int columns, double[] qr, double[] tau, int[] pivot) Creates a factor from packed Householder QR storage and a zero-based pivot. -
Method Summary
Modifier and TypeMethodDescriptionintcolumns()Returns the number of columns in the original matrix.double[]packed()Returns a row-major copy containing R and the packed Householder vectors.int[]pivot()Returns the permutation where factor columnjcame from original columnpivot[j].intrank()Estimates numerical rank usingmax(rows,columns)*ulp(1)*max(abs(diag(R))).intrank(double tolerance) Returns the number of diagonal entries of R larger than an absolute tolerance.introws()Returns the number of rows in the original matrix.double[]solveLeastSquares(double[] right) Solves a full-column-rank least-squares problem and returns coefficients in original order.
-
Constructor Details
-
PivotedQrFactor
public PivotedQrFactor(int rows, int columns, double[] qr, double[] tau, int[] pivot) Creates a factor from packed Householder QR storage and a zero-based pivot.
-
-
Method Details
-
rows
public int rows()Returns the number of rows in the original matrix. -
columns
public int columns()Returns the number of columns in the original matrix. -
pivot
public int[] pivot()Returns the permutation where factor columnjcame from original columnpivot[j]. -
packed
public double[] packed()Returns a row-major copy containing R and the packed Householder vectors. -
rank
public int rank()Estimates numerical rank usingmax(rows,columns)*ulp(1)*max(abs(diag(R))). -
rank
public int rank(double tolerance) Returns the number of diagonal entries of R larger than an absolute tolerance. -
solveLeastSquares
public double[] solveLeastSquares(double[] right) Solves a full-column-rank least-squares problem and returns coefficients in original order.
-