@NotThreadSafe public abstract class SVD_DGESVD extends SVD
Wrapper for LAPACK DGESVD.
Copyright (C) 2008 Marsette A. Vona, III
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_WORK
initial
work length |
double[] |
work
dynamically allocated work vector
|
Constructor and Description |
---|
SVD_DGESVD() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkStatus(int status)
Check if a status code indicates success.
|
int |
dgesvd(java.lang.String jobu,
java.lang.String jobvt,
int m,
int n,
double[] a,
double[] s,
double[] u,
double[] vt)
Covers
dgesvd(String, String, int, int, double[], double[],
double[], double[], double[], int) , uses work , reallocating as
necessary. |
abstract int |
dgesvd(java.lang.String jobu,
java.lang.String jobvt,
int m,
int n,
double[] a,
double[] s,
double[] u,
double[] vt,
double[] work,
int lwork)
Wrapper for generic LAPACK DGESVD call.
|
java.lang.String |
getStatusMessage(int status)
Translate a return status code into a human-readable message.
|
int |
thinSVD(int m,
int n,
double[] a,
double[] s,
double[] u,
double[] vt)
Compute the thin SVD of m x n matrix a.
|
cons, getDescription, toString
public static final int INITIAL_WORK
work
lengthpublic double[] work
public int thinSVD(int m, int n, double[] a, double[] s, double[] u, double[] vt)
Compute the thin SVD of m x n matrix a.
a = u*s*vt
[m x n] = [m x n] * [maxRank x maxRank] * [maxRank x n]
maxRank = min(m, n)
All matrices are packed column major as in Fortran.
thinSVD
in class SVD
m
- the number of rows in the input matrixn
- the number of columns in the input matrixa
- the input m x n matrix, may be trashed on returns
- maxRank singular values are output here, in decreasing
orderu
- maxRank left singular column vectors, each of
length m, are output herevt
- the right singular row vectors, each of length n, are
output here, filling in an maxRank x n matrixpublic abstract int dgesvd(java.lang.String jobu, java.lang.String jobvt, int m, int n, double[] a, double[] s, double[] u, double[] vt, double[] work, int lwork)
Wrapper for generic LAPACK DGESVD call.
See e.g. the JLAPACK Dgesvd doc.
public int dgesvd(java.lang.String jobu, java.lang.String jobvt, int m, int n, double[] a, double[] s, double[] u, double[] vt)
Covers dgesvd(String, String, int, int, double[], double[],
double[], double[], double[], int)
, uses work
, reallocating as
necessary.
public java.lang.String getStatusMessage(int status)
Translate a return status code into a human-readable message.
getStatusMessage
in class SVD
public boolean checkStatus(int status)
Check if a status code indicates success.
checkStatus
in class SVD