public class Matrix2D
extends cern.colt.matrix.impl.DenseDoubleMatrix2D
Constructor and Description |
---|
Matrix2D()
Constructor for bean compatibility.
|
Matrix2D(double[][] values,
String rLabel,
String cLabel)
Standard constructor.
|
Matrix2D(int rows,
int columns)
Alternative constructor.
|
Modifier and Type | Method and Description |
---|---|
static Matrix2D |
add(List<Matrix2D> addList)
Adds a number of given matrices.
|
void |
assignColumn(int index,
double[] values)
Assigns column values.
|
void |
assignColumn(int indexSourceColumn,
Matrix2D source,
int indexTargetColumn)
Copies content from source column of source matrix to target column of this
matrix.
|
static long |
calculateHashCode(Matrix2D val)
Calculates hash code of the value
Matrix2D . |
Matrix2D |
copy() |
boolean |
equals(Object o) |
String |
getColumnLabel() |
Matrix2D |
getResizedMatrix(int newRows,
int newCols)
Create a matrix with differing dimensions.
|
String |
getRowLabel() |
int |
hashCode() |
void |
setColumnLabel(String columnLabel) |
void |
setRowLabel(String rowLabel) |
Matrix2D |
sub(List<Matrix2D> subList)
Subtract list of matrices, element-wise.
|
static void |
subMatrix(Matrix2D source,
Matrix2D target)
Copies as much as possible from the source to the target.
|
static Matrix2D |
sumRows(Matrix2D mat)
Sums up all rows of a matrix column-wise.
|
static Matrix2D |
sumRows(Matrix2D mat,
Integer lowerBorder,
Integer upperBorder)
Sums up some rows of a matrix column-wise.
|
assign, assign, assign, assign, assign, getQuick, haveSharedCellsRaw, index, like, like1D, like1D, setQuick, viewSelectionLike, zAssign8Neighbors, zMult, zMult, zSum
aggregate, aggregate, cardinality, equals, forEachNonZero, get, getContent, getNonZeros, haveSharedCells, like, set, toArray, toString, view, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSelection, viewSorted, viewStrides, zMult, zMult
_columnOffset, _columnRank, _rowOffset, _rowRank, checkBox, checkColumn, checkColumnIndexes, checkRow, checkRowIndexes, checkShape, checkShape, columns, rows, setUp, setUp, size, toStringShort, vColumnFlip, vDice, vPart, vRowFlip, vStrides
public Matrix2D(double[][] values, String rLabel, String cLabel)
values
- matrix valuesrLabel
- the row labelcLabel
- the column labelpublic Matrix2D()
public Matrix2D(int rows, int columns)
rows
- number of rowscolumns
- number of columnspublic void assignColumn(int index, double[] values)
index
- index of the column to be filledvalues
- values to be filled inpublic void assignColumn(int indexSourceColumn, Matrix2D source, int indexTargetColumn)
indexSourceColumn
- index of the column in the source matrixsource
- the source matrixindexTargetColumn
- index of the column in the target matrixpublic Matrix2D copy()
copy
in class cern.colt.matrix.DoubleMatrix2D
public static long calculateHashCode(Matrix2D val)
Matrix2D
.val
- the matrix for which the hash code shall be computedpublic boolean equals(Object o)
equals
in class cern.colt.matrix.DoubleMatrix2D
public static void subMatrix(Matrix2D source, Matrix2D target)
source
- the source matrixtarget
- the target matrixpublic String getColumnLabel()
public void setColumnLabel(String columnLabel)
public String getRowLabel()
public void setRowLabel(String rowLabel)
public static Matrix2D add(List<Matrix2D> addList)
addList
- the list of given matrices m_1, ..., m_npublic static Matrix2D sumRows(Matrix2D mat)
mat
- the matrix whose columns should be summed uppublic static Matrix2D sumRows(Matrix2D mat, Integer lowerBorder, Integer upperBorder)
mat
- the matrix whose columns should be summed uplowerBorder
- the lower borderupperBorder
- the upper borderpublic Matrix2D sub(List<Matrix2D> subList)
subList
- the list of matrices to be subtractedpublic Matrix2D getResizedMatrix(int newRows, int newCols)
newRows
- the new number of rowsnewCols
- the new number of columnsCopyright © 2013. All Rights Reserved.