net.sourceforge.cilib.container
Class Matrix<E>

java.lang.Object
  extended by net.sourceforge.cilib.container.Matrix<E>
Type Parameters:
E - The parameterized type.
All Implemented Interfaces:
Serializable, Cloneable

Deprecated.

@Deprecated
public class Matrix<E>
extends Object
implements Cloneable

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.

Author:
Gary Pampara
See Also:
Serialized Form

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

Matrix

public Matrix(int rows,
              int cols)
Deprecated. 
Create a new Matrix object with dimensions: rows x columns.

Parameters:
rows - The number of rows the Matrix should contain.
cols - The number of columns the Matrix should contain.

Matrix

public Matrix(Matrix<E> copy)
Deprecated. 
Copy constructor.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public Matrix<E> getClone()
Deprecated. 
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

set

public void set(int row,
                int col,
                E object)
Deprecated. 
Place an Object at a point (row, column) within the Matrix.

Parameters:
row - The row where the needed item is located
col - The column where the needed item is located
object - The Object to place the Matrix at prosition (row, column)

get

public E get(int row,
             int col)
Deprecated. 
Return the current item within the grid, located at (row, column).

Parameters:
row - The row where the needed item is located
col - The column where the needed item is located
Returns:
The Object within the Matrix at position (row, column)

getColumnCount

public int getColumnCount()
Deprecated. 
Get the number of columns in the Matrix.

Returns:
The number of columns in the Matrix.

getRowCount

public int getRowCount()
Deprecated. 
Get the number of rows in the Matrix.

Returns:
The number of rows in the Matrix.

equals

public boolean equals(Object obj)
Deprecated. 

Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated. 

Overrides:
hashCode in class Object

clear

public void clear()
Deprecated. 
Clear the current Matrix of it's internal state.


getRow

public Collection<E> getRow(int row)
Deprecated. 
Get a Vector representing the row within the Matrix at the given index.

Parameters:
row - The row index of the row to be returned, indexed from 0.
Returns:
A Vector representing the row within the Matrix.

getColumn

public Collection<E> getColumn(int col)
Deprecated. 
Get a Vector representing the column within the Matrix at the given index.

Parameters:
col - The column index of the row to be returned, indexed from 0.
Returns:
A Vector representing the column within the Matrix.


Copyright © 2009 CIRG. All Rights Reserved.