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.Matrix
addValue
(Jama.Matrix A, double val) Adds a value to each elemnts of theMatrix
static Jama.Matrix
asin
(Jama.Matrix A) Computes the arcsin of the inputMatrix
(element by element)static Jama.Matrix
diag
(Jama.Matrix A) If the argument is a row or columnMatrix
it returns a new diagonalMatrix
with the input as diagonal elements.static Jama.Matrix
exp
(Jama.Matrix A) Computes the exponential of the inputMatrix
static Jama.Matrix
mean
(Jama.Matrix A) static Jama.Matrix
sqrt
(Jama.Matrix A) Computes the square root of the inputMatrix
(element by element)static Jama.Matrix
std
(Jama.Matrix A) static Jama.Matrix
sumRows
(Jama.Matrix A) Sums across the rows of theMatrix
and 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 theMatrix
and 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
-Matrix
val
- 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 columnMatrix
it returns a new diagonalMatrix
with the input as diagonal elements. If the argument is aMatrix
it returns the diagonal elements as a single columnMatrix
Is 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)
-