类 LinalgUtil
- java.lang.Object
-
- org.meteoinfo.math.linalg.LinalgUtil
-
public class LinalgUtil extends java.lang.Object- 作者:
- Yaqiang Wang
-
-
构造器概要
构造器 构造器 说明 LinalgUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static ucar.ma2.Arraycholesky(ucar.ma2.Array a)Calculates the Cholesky decomposition of a matrix.static ucar.ma2.Array[]eigen(ucar.ma2.Array a)Calculates the eigen decomposition of a real matrix.static ucar.ma2.Array[]eigen_bak(ucar.ma2.Array a)Calculates the eigen decomposition of a real matrix.static ucar.ma2.Array[]eigen_EJML(ucar.ma2.Array a)Calculates the eigen decomposition of a real matrix.static ucar.ma2.Arrayinv(ucar.ma2.Array a)Calculate inverse matrixstatic ucar.ma2.Arraylstsq(ucar.ma2.Array a, ucar.ma2.Array b)Not correct at present !!!static ucar.ma2.Array[]lu(ucar.ma2.Array a)Calculates the LUP-decomposition of a square matrix.static ucar.ma2.Array[]qr(ucar.ma2.Array a)Calculates the QR-decomposition of a matrix.static ucar.ma2.Arraysolve(ucar.ma2.Array a, ucar.ma2.Array b)Solve a linear matrix equation, or system of linear scalar equations.static ucar.ma2.Array[]svd(ucar.ma2.Array a)Calculates the compact Singular Value Decomposition of a matrix.static ucar.ma2.Array[]svd_EJML(ucar.ma2.Array a)Calculates the compact Singular Value Decomposition of a matrix.
-
-
-
方法详细资料
-
solve
public static ucar.ma2.Array solve(ucar.ma2.Array a, ucar.ma2.Array b)Solve a linear matrix equation, or system of linear scalar equations.- 参数:
a- Coefficient matrix.b- Ordinate or “dependent variable” values.- 返回:
- Solution to the system a x = b. Returned shape is identical to b.
-
cholesky
public static ucar.ma2.Array cholesky(ucar.ma2.Array a)
Calculates the Cholesky decomposition of a matrix. The Cholesky decomposition of a real symmetric positive-definite matrix A consists of a lower triangular matrix L with same size such that: A = LLT. In a sense, this is the square root of A.- 参数:
a- The given matrix.- 返回:
- Result array.
-
lu
public static ucar.ma2.Array[] lu(ucar.ma2.Array a)
Calculates the LUP-decomposition of a square matrix. The LUP-decomposition of a matrix A consists of three matrices L, U and P that satisfy: P×A = L×U. L is lower triangular (with unit diagonal terms), U is upper triangular and P is a permutation matrix. All matrices are m×m.- 参数:
a- Given matrix.- 返回:
- Result P/L/U arrays.
-
qr
public static ucar.ma2.Array[] qr(ucar.ma2.Array a)
Calculates the QR-decomposition of a matrix. The QR-decomposition of a matrix A consists of two matrices Q and R that satisfy: A = QR, Q is orthogonal (QTQ = I), and R is upper triangular. If A is m×n, Q is m×m and R m×n.- 参数:
a- Given matrix.- 返回:
- Result Q/R arrays.
-
svd
public static ucar.ma2.Array[] svd(ucar.ma2.Array a)
Calculates the compact Singular Value Decomposition of a matrix. The Singular Value Decomposition of matrix A is a set of three matrices: U, Σ and V such that A = U × Σ × VT. Let A be a m × n matrix, then U is a m × p orthogonal matrix, Σ is a p × p diagonal matrix with positive or null elements, V is a p × n orthogonal matrix (hence VT is also orthogonal) where p=min(m,n).- 参数:
a- Given matrix.- 返回:
- Result U/S/V arrays.
-
svd_EJML
public static ucar.ma2.Array[] svd_EJML(ucar.ma2.Array a)
Calculates the compact Singular Value Decomposition of a matrix. The Singular Value Decomposition of matrix A is a set of three matrices: U, Σ and V such that A = U × Σ × VT. Let A be a m × n matrix, then U is a m × p orthogonal matrix, Σ is a p × p diagonal matrix with positive or null elements, V is a p × n orthogonal matrix (hence VT is also orthogonal) where p=min(m,n).- 参数:
a- Given matrix.- 返回:
- Result U/S/V arrays.
-
eigen_bak
public static ucar.ma2.Array[] eigen_bak(ucar.ma2.Array a)
Calculates the eigen decomposition of a real matrix. The eigen decomposition of matrix A is a set of two matrices: V and D such that A = V × D × VT. A, V and D are all m × m matrices.- 参数:
a- Given matrix.- 返回:
- Result W/V arrays.
-
eigen
public static ucar.ma2.Array[] eigen(ucar.ma2.Array a)
Calculates the eigen decomposition of a real matrix. The eigen decomposition of matrix A is a set of two matrices: V and D such that A = V × D × VT. A, V and D are all m × m matrices.- 参数:
a- Given matrix.- 返回:
- Result W/V arrays.
-
eigen_EJML
public static ucar.ma2.Array[] eigen_EJML(ucar.ma2.Array a)
Calculates the eigen decomposition of a real matrix. The eigen decomposition of matrix A is a set of two matrices: V and D such that A = V × D × VT. A, V and D are all m × m matrices.- 参数:
a- Given matrix.- 返回:
- Result W/V arrays.
-
inv
public static ucar.ma2.Array inv(ucar.ma2.Array a)
Calculate inverse matrix- 参数:
a- The matrix- 返回:
- Inverse matrix array
-
lstsq
public static ucar.ma2.Array lstsq(ucar.ma2.Array a, ucar.ma2.Array b)Not correct at present !!!- 参数:
a-b-- 返回:
-
-