|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uchicago.src.collection.DoubleMatrix
DoubleMatrix: a matrix of doubles (and any other number).
| Constructor Summary | |
DoubleMatrix(int sizeX,
int sizeY)
Constructs a matrix of the specified size, initializing the matrix cells to 0. |
|
DoubleMatrix(int sizeX,
int sizeY,
double[] matrix)
Constructs a matrix of the specified size, initializing the matrix cells to the values in matrix. |
|
| Method Summary | |
DoubleMatrix |
copyMatrix()
|
void |
copyMatrixTo(DoubleMatrix dm)
Copies the double[] in this DoubleMatrix to the specified double matrix. |
Object |
get(int index)
|
Object |
get(int col,
int row)
|
double[] |
getData()
|
double |
getDoubleAt(int x,
int y)
|
int |
getNumCols()
|
int |
getNumRows()
|
int |
getSizeX()
|
int |
getSizeY()
|
void |
initialize(double value)
Fills the matrix with the passed in value |
void |
printToFile(String fileName)
|
void |
put(int col,
int row,
Object obj)
|
void |
put(int index,
Object obj)
|
void |
putDoubleAt(int x,
int y,
double value)
|
Object |
remove(int index)
|
Object |
remove(int col,
int row)
|
double |
removeDouble(int col,
int row)
Removes the value and the specified column and row, leaving 0 in in its place. |
int |
size()
|
void |
trim()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DoubleMatrix(int sizeX,
int sizeY)
public DoubleMatrix(int sizeX,
int sizeY,
double[] matrix)
| Method Detail |
public double getDoubleAt(int x,
int y)
public void putDoubleAt(int x,
int y,
double value)
public DoubleMatrix copyMatrix()
public void copyMatrixTo(DoubleMatrix dm)
public int getSizeX()
public int getSizeY()
public void initialize(double value)
value - the value to fill the matrix with.public Object get(int index)
public Object get(int col,
int row)
get in interface BaseMatrix
public void put(int index,
Object obj)
public void put(int col,
int row,
Object obj)
put in interface BaseMatrix
public Object remove(int col,
int row)
remove in interface BaseMatrixpublic Object remove(int index)
public double removeDouble(int col,
int row)
public int size()
size in interface BaseMatrixpublic int getNumRows()
getNumRows in interface BaseMatrixpublic int getNumCols()
getNumCols in interface BaseMatrixpublic double[] getData()
public void trim()
trim in interface BaseMatrixpublic void printToFile(String fileName)
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||