|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.matrix.impl.AbstractMatrix
org.apache.mahout.math.matrix.impl.AbstractMatrix2D
@Deprecated public abstract class AbstractMatrix2D
Field Summary | |
---|---|
protected int |
columns
Deprecated. the number of colums and rows this matrix (view) has |
protected int |
columnStride
Deprecated. the number of elements between two columns, i.e. |
protected int |
columnZero
Deprecated. |
protected int |
rows
Deprecated. |
protected int |
rowStride
Deprecated. the number of elements between two rows, i.e. |
protected int |
rowZero
Deprecated. the index of the first element |
Fields inherited from class org.apache.mahout.math.matrix.impl.AbstractMatrix |
---|
isNoView |
Constructor Summary | |
---|---|
protected |
AbstractMatrix2D()
Deprecated. Makes this class non instantiable, but still let's others inherit from it. |
Method Summary | |
---|---|
protected void |
checkBox(int row,
int column,
int height,
int width)
Deprecated. Checks whether the receiver contains the given box and throws an exception, if necessary. |
protected void |
checkColumn(int column)
Deprecated. Sanity check for operations requiring a column index to be within bounds. |
protected void |
checkColumnIndexes(int[] indexes)
Deprecated. Checks whether indexes are legal and throws an exception, if necessary. |
protected void |
checkRow(int row)
Deprecated. Sanity check for operations requiring a row index to be within bounds. |
protected void |
checkRowIndexes(int[] indexes)
Deprecated. Checks whether indexes are legal and throws an exception, if necessary. |
void |
checkShape(AbstractMatrix2D B)
Deprecated. Sanity check for operations requiring two matrices with the same number of columns and rows. |
protected int |
columnOffset(int absRank)
Deprecated. Returns the position of the given absolute rank within the (virtual or non-virtual) internal 1-dimensional array. |
protected int |
columnRank(int rank)
Deprecated. Returns the absolute rank of the given relative rank. |
int |
columns()
Deprecated. Returns the number of columns. |
protected int |
index(int row,
int column)
Deprecated. Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array. |
protected int |
rowOffset(int absRank)
Deprecated. Returns the position of the given absolute rank within the (virtual or non-virtual) internal 1-dimensional array. |
protected int |
rowRank(int rank)
Deprecated. Returns the absolute rank of the given relative rank. |
int |
rows()
Deprecated. Returns the number of rows. |
protected void |
setUp(int rows,
int columns)
Deprecated. Sets up a matrix with a given number of rows and columns. |
protected void |
setUp(int rows,
int columns,
int rowZero,
int columnZero,
int rowStride,
int columnStride)
Deprecated. Sets up a matrix with a given number of rows and columns and the given strides. |
int |
size()
Deprecated. Returns the number of cells which is rows()*columns(). |
protected AbstractMatrix2D |
vColumnFlip()
Deprecated. Self modifying version of viewColumnFlip(). |
protected AbstractMatrix2D |
vDice()
Deprecated. Self modifying version of viewDice(). |
protected AbstractMatrix2D |
vPart(int row,
int column,
int height,
int width)
Deprecated. Self modifying version of viewPart(). |
protected AbstractMatrix2D |
vRowFlip()
Deprecated. Self modifying version of viewRowFlip(). |
Methods inherited from class org.apache.mahout.math.matrix.impl.AbstractMatrix |
---|
ensureCapacity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int columns
protected int rows
protected int rowStride
protected int columnStride
protected int rowZero
protected int columnZero
Constructor Detail |
---|
protected AbstractMatrix2D()
Method Detail |
---|
protected int columnOffset(int absRank)
absRank
- the absolute rank of the element.
protected int columnRank(int rank)
rank
- the relative rank of the element.
protected int rowOffset(int absRank)
absRank
- the absolute rank of the element.
protected int rowRank(int rank)
rank
- the relative rank of the element.
protected void checkBox(int row, int column, int height, int width)
IndexOutOfBoundsException
- if column<0 || width<0 || column+width>columns() || row<0 || height<0 ||
row+height>rows()protected void checkColumn(int column)
IndexOutOfBoundsException
- if column < 0 || column >= columns().protected void checkColumnIndexes(int[] indexes)
IndexOutOfBoundsException
- if ! (0 <= indexes[i] < columns()) for any i=0..indexes.length()-1.protected void checkRow(int row)
IndexOutOfBoundsException
- if row < 0 || row >= rows().protected void checkRowIndexes(int[] indexes)
IndexOutOfBoundsException
- if ! (0 <= indexes[i] < rows()) for any i=0..indexes.length()-1.public void checkShape(AbstractMatrix2D B)
IllegalArgumentException
- if columns() != B.columns() || rows() != B.rows().public int columns()
protected int index(int row, int column)
row
- the index of the row-coordinate.column
- the index of the column-coordinate.public int rows()
protected void setUp(int rows, int columns)
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.
IllegalArgumentException
- if rows<0 || columns<0 || (double)columns*rows > Integer.MAX_VALUE.protected void setUp(int rows, int columns, int rowZero, int columnZero, int rowStride, int columnStride)
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.rowZero
- the position of the first element.columnZero
- the position of the first element.rowStride
- the number of elements between two rows, i.e. index(i+1,j)-index(i,j).columnStride
- the number of elements between two columns, i.e. index(i,j+1)-index(i,j).
IllegalArgumentException
- if rows<0 || columns<0 || (double)columns*rows > Integer.MAX_VALUE or
flip's are illegal.public int size()
size
in class AbstractMatrix
protected AbstractMatrix2D vColumnFlip()
protected AbstractMatrix2D vDice()
protected AbstractMatrix2D vPart(int row, int column, int height, int width)
IndexOutOfBoundsException
- if column<0 || width<0 || column+width>columns() || row<0 || height<0 ||
row+height>rows()protected AbstractMatrix2D vRowFlip()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |