public class MatrixUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double[] |
colMeans(MatrixTable A)
Get the column means.
|
static Vector |
colMeanVector(MatrixTable A)
Get the column mean vector of a given matrix.
|
static double[] |
colSums(MatrixTable A)
Get the column sums.
|
static Vector |
colSumVector(MatrixTable A)
Get the column sum vector of a given matrix.
|
static Matrix |
deColumnMean(Matrix A)
Get the de-mean (column means) matrix of a given matrix.
|
static Matrix |
deRowMean(Matrix A)
Get the de-mean (row means) matrix of a given matrix.
|
static Matrix |
elementDivide(Matrix A1,
Matrix A2) |
static Matrix |
elementMultiply(Matrix A1,
Matrix A2) |
static Matrix |
elementOperation(Matrix A1,
Matrix A2,
BivariateRealFunction f) |
static double[] |
rowMeans(MatrixTable A)
Get the row means.
|
static Vector |
rowMeanVector(MatrixTable A)
Get the row mean vector of a given matrix.
|
static double[] |
rowSums(MatrixTable A)
Get the row sums.
|
static Vector |
rowSumVector(MatrixTable A)
Get the row sum vector of a given matrix.
|
static double |
sum(MatrixTable A)
Get the sum of all elements in the given matrix.
|
static double[] |
to1DArray(MatrixTable A)
Get all matrix entries in the form of an 1D
double[] . |
static double[][] |
to2DArray(MatrixTable A)
Get all matrix entries in the form of a 2D
double[][] array. |
static Vector[] |
toColumns(Matrix A)
Get an array of all column vectors from a matrix.
|
static Vector[] |
toRows(Matrix A)
Get an array of all row vectors from a matrix.
|
static String |
toString(MatrixTable A)
Get the
String representation of a matrix. |
public static double sum(MatrixTable A)
A
- the matrixpublic static double[] rowSums(MatrixTable A)
A
- a matrixpublic static Vector rowSumVector(MatrixTable A)
A
- the matrixpublic static double[] colSums(MatrixTable A)
A
- a matrixpublic static Vector colSumVector(MatrixTable A)
A
- the matrixpublic static double[] rowMeans(MatrixTable A)
A
- a matrixpublic static Vector rowMeanVector(MatrixTable A)
A
- the matrixpublic static double[] colMeans(MatrixTable A)
A
- a matrixpublic static Vector colMeanVector(MatrixTable A)
A
- the matrixpublic static Matrix deRowMean(Matrix A)
A
- the matrixpublic static Matrix deColumnMean(Matrix A)
A
- the matrixpublic static double[] to1DArray(MatrixTable A)
double[]
.A
- a matrixdouble[]
public static double[][] to2DArray(MatrixTable A)
double[][]
array.A
- a matrixdouble[][]
public static Vector[] toRows(Matrix A)
A
- a matrixpublic static Vector[] toColumns(Matrix A)
A
- a matrixpublic static String toString(MatrixTable A)
String
representation of a matrix.A
- a matrixString
representation of a matrixpublic static Matrix elementOperation(Matrix A1, Matrix A2, BivariateRealFunction f)
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.