@NotThreadSafe public abstract class SVD_DGESDD extends SVD
Wrapper for LAPACK DGESDD.
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 |
---|---|
double[] |
dwork
dynamically allocated work vector
|
static int |
INITIAL_DWORK
initial
dwork length |
static int |
INITIAL_IWORK
initial
iwork length |
int[] |
iwork
dynamically allocated work vector
|
Constructor and Description |
---|
SVD_DGESDD() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkStatus(int status)
Check if a status code indicates success.
|
int |
dgesdd(java.lang.String jobz,
int m,
int n,
double[] a,
double[] s,
double[] u,
double[] vt)
Covers
dgesdd(String, int, int, double[], double[], double[],
double[], double[], int, int[]) , uses dwork and iwork ,
reallocating as necessary. |
abstract int |
dgesdd(java.lang.String jobz,
int m,
int n,
double[] a,
double[] s,
double[] u,
double[] vt,
double[] dwork,
int ldwork,
int[] iwork)
Wrapper for generic LAPACK DGESDD 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_DWORK
dwork
lengthpublic static final int INITIAL_IWORK
iwork
lengthpublic double[] dwork
public int[] iwork
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 dgesdd(java.lang.String jobz, int m, int n, double[] a, double[] s, double[] u, double[] vt, double[] dwork, int ldwork, int[] iwork)
Wrapper for generic LAPACK DGESDD call.
See e.g. the JLAPACK Dgesdd doc.
public int dgesdd(java.lang.String jobz, int m, int n, double[] a, double[] s, double[] u, double[] vt)
Covers dgesdd(String, int, int, double[], double[], double[],
double[], double[], int, int[])
, uses dwork
and iwork
,
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