|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.container.Matrix<E>
E
- The parameterized type.
@Deprecated public class Matrix<E>
Representation of a Matrix
, with the rows and the columns represented
as a 2D array. The 2D array has been implemented as a Object array as the needed
data stored within the Matrix is variable.
Constructor Summary | |
---|---|
Matrix(int rows,
int cols)
Deprecated. Create a new Matrix object with dimensions: rows x columns. |
|
Matrix(Matrix<E> copy)
Deprecated. Copy constructor. |
Method Summary | |
---|---|
void |
clear()
Deprecated. Clear the current Matrix of it's internal state. |
boolean |
equals(Object obj)
Deprecated. |
E |
get(int row,
int col)
Deprecated. Return the current item within the grid, located at (row, column). |
Matrix<E> |
getClone()
Deprecated. Create a cloned copy of the current object and return it. |
Collection<E> |
getColumn(int col)
Deprecated. Get a Vector representing the column within the Matrix at the given index. |
int |
getColumnCount()
Deprecated. Get the number of columns in the Matrix . |
Collection<E> |
getRow(int row)
Deprecated. Get a Vector representing the row within the Matrix at the given index. |
int |
getRowCount()
Deprecated. Get the number of rows in the Matrix . |
int |
hashCode()
Deprecated. |
void |
set(int row,
int col,
E object)
Deprecated. Place an Object at a point (row, column) within the Matrix . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Matrix(int rows, int cols)
Matrix
object with dimensions: rows x columns.
rows
- The number of rows the Matrix
should contain.cols
- The number of columns the Matrix
should contain.public Matrix(Matrix<E> copy)
copy
- The instance to copy.Method Detail |
---|
public Matrix<E> getClone()
getClone
in interface Cloneable
Object.clone()
public void set(int row, int col, E object)
Object
at a point (row, column) within the Matrix
.
row
- The row where the needed item is locatedcol
- The column where the needed item is locatedobject
- The Object
to place the Matrix
at prosition (row, column)public E get(int row, int col)
row
- The row where the needed item is locatedcol
- The column where the needed item is located
Object
within the Matrix
at position (row, column)public int getColumnCount()
Matrix
.
Matrix
.public int getRowCount()
Matrix
.
Matrix
.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void clear()
Matrix
of it's internal state.
public Collection<E> getRow(int row)
Vector
representing the row within the Matrix
at the given index.
row
- The row index of the row to be returned, indexed from 0.
Vector
representing the row within the Matrix
.public Collection<E> getColumn(int col)
Vector
representing the column within the Matrix
at the given index.
col
- The column index of the row to be returned, indexed from 0.
Vector
representing the column within the Matrix
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |