|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.collection.DoubleMatrix
public class 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()
Copies a Double Matrix |
void |
copyMatrixTo(DoubleMatrix dm)
Copies the double[] in this Matrix to the specified DoubleMatrix. |
java.lang.Object |
get(int index)
|
java.lang.Object |
get(int col,
int row)
|
double[] |
getData()
|
double |
getDoubleAt(int x,
int y)
Returns a double at (x,y) |
int |
getNumCols()
|
int |
getNumRows()
|
int |
getSizeX()
The x dimension of this Matrix |
int |
getSizeY()
The y dimension of this Matrix |
void |
initialize(double value)
Fills the matrix with the passed in value |
void |
printToFile(java.lang.String fileName)
|
void |
put(int col,
int row,
java.lang.Object obj)
|
void |
put(int index,
java.lang.Object obj)
|
void |
putDoubleAt(int x,
int y,
double value)
|
java.lang.Object |
remove(int index)
|
java.lang.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)
sizeX - sizeY -
public DoubleMatrix(int sizeX,
int sizeY,
double[] matrix)
sizeX - sizeY - matrix - | Method Detail |
|---|
public double getDoubleAt(int x,
int y)
x - y -
public void putDoubleAt(int x,
int y,
double value)
x - y - value - public DoubleMatrix copyMatrix()
public void copyMatrixTo(DoubleMatrix dm)
dm - the matrix to copypublic int getSizeX()
public int getSizeY()
public void initialize(double value)
value - the value to fill the matrix with.public java.lang.Object get(int index)
index -
public java.lang.Object get(int col,
int row)
get in interface BaseMatrix
public void put(int index,
java.lang.Object obj)
public void put(int col,
int row,
java.lang.Object obj)
put in interface BaseMatrix
public java.lang.Object remove(int col,
int row)
remove in interface BaseMatrixpublic java.lang.Object remove(int index)
public double removeDouble(int col,
int row)
col - 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(java.lang.String fileName)
fileName -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||