public class MatrixUtils
extends java.lang.Object
| Constructor and Description |
|---|
MatrixUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.commons.math3.linear.RealMatrix |
getVector(int size,
double value)
Creates a vector (1 X size matrix) with all elements set to value.
|
static org.apache.commons.math3.linear.RealMatrix |
multiplyElements(org.apache.commons.math3.linear.RealMatrix A,
org.apache.commons.math3.linear.RealMatrix B)
Elementwise multiplication of elements in two arrays.
|
static void |
multiplyElementsBy(org.apache.commons.math3.linear.RealMatrix A,
org.apache.commons.math3.linear.RealMatrix B)
Elementwise multiplication of two matrices.
|
static double |
sumMatrix(org.apache.commons.math3.linear.RealMatrix X) |
public static org.apache.commons.math3.linear.RealMatrix multiplyElements(org.apache.commons.math3.linear.RealMatrix A,
org.apache.commons.math3.linear.RealMatrix B)
throws org.apache.commons.math3.exception.DimensionMismatchException
A - a matrixB - a matrix of the same dimension as Aorg.apache.commons.math3.exception.DimensionMismatchExceptionpublic static void multiplyElementsBy(org.apache.commons.math3.linear.RealMatrix A,
org.apache.commons.math3.linear.RealMatrix B)
throws org.apache.commons.math3.exception.DimensionMismatchException
A - a matrix that is multiplied by the elements of BB - another matrixorg.apache.commons.math3.exception.DimensionMismatchExceptionpublic static org.apache.commons.math3.linear.RealMatrix getVector(int size,
double value)
size - value - public static double sumMatrix(org.apache.commons.math3.linear.RealMatrix X)