Package jgpml.covariancefunctions
Class MatrixOperations
java.lang.Object
jgpml.covariancefunctions.MatrixOperations
Some useful operations defined over Matrices
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Jama.MatrixaddValue(Jama.Matrix A, double val) Adds a value to each elemnts of theMatrixstatic Jama.Matrixasin(Jama.Matrix A) Computes the arcsin of the inputMatrix(element by element)static Jama.Matrixdiag(Jama.Matrix A) If the argument is a row or columnMatrixit returns a new diagonalMatrixwith the input as diagonal elements.static Jama.Matrixexp(Jama.Matrix A) Computes the exponential of the inputMatrixstatic Jama.Matrixmean(Jama.Matrix A) static Jama.Matrixsqrt(Jama.Matrix A) Computes the square root of the inputMatrix(element by element)static Jama.Matrixstd(Jama.Matrix A) static Jama.MatrixsumRows(Jama.Matrix A) Sums across the rows of theMatrixand return the result as a single columnMAtrix
-
Constructor Details
-
MatrixOperations
public MatrixOperations()
-
-
Method Details
-
exp
public static Jama.Matrix exp(Jama.Matrix A) Computes the exponential of the inputMatrix- Parameters:
A- inputMatrix- Returns:
- exp(A) result
-
sumRows
public static Jama.Matrix sumRows(Jama.Matrix A) Sums across the rows of theMatrixand return the result as a single columnMAtrix- Parameters:
A- inputMatrix- Returns:
- result
-
addValue
public static Jama.Matrix addValue(Jama.Matrix A, double val) Adds a value to each elemnts of theMatrix- Parameters:
A-Matrixval- value to be added- Returns:
- result
-
asin
public static Jama.Matrix asin(Jama.Matrix A) Computes the arcsin of the inputMatrix(element by element)- Parameters:
A- inputMatrix- Returns:
- asin(A) result
-
sqrt
public static Jama.Matrix sqrt(Jama.Matrix A) Computes the square root of the inputMatrix(element by element)- Parameters:
A- inputMatrix- Returns:
- sqrt(A) result
-
diag
public static Jama.Matrix diag(Jama.Matrix A) If the argument is a row or columnMatrixit returns a new diagonalMatrixwith the input as diagonal elements. If the argument is aMatrixit returns the diagonal elements as a single columnMatrixIs a clone of the Matlab's function diag(A)- Parameters:
A- inputMatrix- Returns:
- diag(A) result
-
mean
public static Jama.Matrix mean(Jama.Matrix A) -
std
public static Jama.Matrix std(Jama.Matrix A)
-