Package de.jungblut.math.minimize
Class DenseMatrixFolder
- java.lang.Object
-
- de.jungblut.math.minimize.DenseMatrixFolder
-
public abstract class DenseMatrixFolder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DenseMatrixFolder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static de.jungblut.math.DoubleVectorfoldMatrices(de.jungblut.math.DoubleMatrix... matrices)Folds the given matrices column-wise into a single vector.static de.jungblut.math.DoubleVectorfoldMatrix(de.jungblut.math.DoubleMatrix mat)Folds a single matrix into a single vector by rows.static de.jungblut.math.DoubleMatrix[]unfoldMatrices(de.jungblut.math.DoubleVector vector, int[][] sizeArray)Unfolds a vector into matrices by the rules defined in the sizeArray.static de.jungblut.math.DoubleMatrixunfoldMatrix(de.jungblut.math.DoubleVector vector, int rows, int cols)Unfolds a single vector into a single matrix by rows.
-
-
-
Method Detail
-
foldMatrices
public static de.jungblut.math.DoubleVector foldMatrices(de.jungblut.math.DoubleMatrix... matrices)
Folds the given matrices column-wise into a single vector.
-
unfoldMatrices
public static de.jungblut.math.DoubleMatrix[] unfoldMatrices(de.jungblut.math.DoubleVector vector, int[][] sizeArray)Unfolds a vector into matrices by the rules defined in the sizeArray. The sizeArray must have following format: in each row the row and column count must be provided.
Example: sizeArray = {{2,3},{3,2}} will unfold into matrix 0 with 2 rows and 3 columns and matrix 1 with 3 rows and 2 columns.
-
unfoldMatrix
public static de.jungblut.math.DoubleMatrix unfoldMatrix(de.jungblut.math.DoubleVector vector, int rows, int cols)Unfolds a single vector into a single matrix by rows.- Parameters:
vector- the vector to split.rows- the number of rows the target matrix needs to have.cols- the number of columns the target matrix needs to have.- Returns:
- a matrix with the contents of the vector, row split.
-
foldMatrix
public static de.jungblut.math.DoubleVector foldMatrix(de.jungblut.math.DoubleMatrix mat)
Folds a single matrix into a single vector by rows.
-
-