RePast
v. 2.0

uchicago.src.collection
Class NewMatrix

java.lang.Object
  |
  +--uchicago.src.collection.NewMatrix
All Implemented Interfaces:
BaseMatrix

public class NewMatrix
extends Object
implements BaseMatrix


Constructor Summary
NewMatrix(int cols, int rows)
          Cols, rows instead of row cols because intended to work with xSize and ySize dimensions.
 
Method Summary
 Object get(int col, int row)
           
 int getNumCols()
           
 int getNumRows()
           
 void put(int col, int row, Object obj)
           
 Object remove(int col, int row)
           
 int size()
           
 void trim()
          Releases any superfulous memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewMatrix

public NewMatrix(int cols,
                 int rows)
Cols, rows instead of row cols because intended to work with xSize and ySize dimensions.

Method Detail

get

public Object get(int col,
                  int row)
Specified by:
get in interface BaseMatrix

put

public void put(int col,
                int row,
                Object obj)
Specified by:
put in interface BaseMatrix

remove

public Object remove(int col,
                     int row)
Specified by:
remove in interface BaseMatrix

getNumRows

public int getNumRows()
Specified by:
getNumRows in interface BaseMatrix

getNumCols

public int getNumCols()
Specified by:
getNumCols in interface BaseMatrix

size

public int size()
Specified by:
size in interface BaseMatrix

trim

public void trim()
Releases any superfulous memory. The default implementation here does nothing.

Specified by:
trim in interface BaseMatrix

RePast
v. 2.0

Bug reports and feature requests to RePast