|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.colt.matrix.impl.AbstractMatrix
cern.colt.matrix.impl.AbstractMatrix2D
cern.colt.matrix.DoubleMatrix2D
cern.colt.matrix.impl.DenseDoubleMatrix2D
p3j.misc.math.Matrix2D
public class Matrix2D
Wrapper class for matrices. Created on July 04, 2006
Field Summary |
---|
Fields inherited from class cern.colt.matrix.impl.DenseDoubleMatrix2D |
---|
elements |
Fields inherited from class cern.colt.matrix.impl.AbstractMatrix2D |
---|
columns, columnStride, columnZero, rows, rowStride, rowZero |
Fields inherited from class cern.colt.matrix.impl.AbstractMatrix |
---|
isNoView |
Constructor Summary | |
---|---|
Matrix2D()
Constructor for bean compatibility. |
|
Matrix2D(double[][] values,
String rLabel,
String cLabel)
Standard constructor. |
|
Matrix2D(int rows,
int columns)
Alternative constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class cern.colt.matrix.impl.DenseDoubleMatrix2D |
---|
assign, assign, assign, assign, assign, getQuick, haveSharedCellsRaw, index, like, like1D, like1D, setQuick, viewSelectionLike, zAssign8Neighbors, zMult, zMult, zSum |
Methods inherited from class cern.colt.matrix.DoubleMatrix2D |
---|
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 |
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix2D |
---|
_columnOffset, _columnRank, _rowOffset, _rowRank, checkBox, checkColumn, checkColumnIndexes, checkRow, checkRowIndexes, checkShape, checkShape, columns, rows, setUp, setUp, size, toStringShort, vColumnFlip, vDice, vPart, vRowFlip, vStrides |
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix |
---|
ensureCapacity, isView, trimToSize |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 columnsMethod Detail |
---|
public 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 computed
public boolean equals(Object o)
equals
in class cern.colt.matrix.DoubleMatrix2D
public int hashCode()
hashCode
in class Object
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_n
public static Matrix2D sumRows(Matrix2D mat)
mat
- the matrix whose columns should be summed up
public static Matrix2D sumRows(Matrix2D mat, Integer lowerBorder, Integer upperBorder)
mat
- the matrix whose columns should be summed uplowerBorder
- the lower borderupperBorder
- the upper border
public Matrix2D sub(List<Matrix2D> subList)
subList
- the list of matrices to be subtracted
public Matrix2D getResizedMatrix(int newRows, int newCols)
newRows
- the new number of rowsnewCols
- the new number of columns
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |