|
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.sim.network.AbstractAdjacencyMatrix
|
+--uchicago.src.sim.network.AdjacencyDoubleMatrix
| Field Summary |
| Fields inherited from class uchicago.src.sim.network.AbstractAdjacencyMatrix |
comment, labels, matrixLabel |
| Constructor Summary | |
AdjacencyDoubleMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
Constructs an AdjacencyMatrix from the specified DenseDoubleMatrix2D |
|
AdjacencyDoubleMatrix(double[][] m)
Constructs an AdjacencyMatrix from the specified two dimensional double array. |
|
AdjacencyDoubleMatrix(int rows,
int cols)
Constructs an AdjacencyMatrix with the specified number of rows and columns. |
|
AdjacencyDoubleMatrix(List labels)
Constructs an AdjacencyMatrix with the specified row/col labels. |
|
| Method Summary | |
int |
columns()
Returns the number of columns in the matrix. |
double |
get(int row,
int col)
Gets the value at row, col. |
double |
getAvgDegree()
Gets the average degree of this matrix. |
double |
getDensity()
Gets (computes) the density of this matrix. |
cern.colt.matrix.impl.DenseDoubleMatrix1D |
getRow(int row)
Gets the specified row of data for this matrix. |
String |
matrixToString()
Returns a String representation of only the actual data matrix. |
int |
rows()
Returns the number of rows int matrix. |
void |
set(int row,
int col,
double val)
Sets a data value in this matrix. |
void |
setMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
Sets the actual matrix for this AdjacencyMatrix. |
void |
setMatrix(double[][] m)
Sets the actual matrix for this AdjacencyMatrix. |
String |
toString()
Returns a String representation of this AdjacencyMatrix (comment etc.) together with the actual data matrix. |
| Methods inherited from class uchicago.src.sim.network.AbstractAdjacencyMatrix |
getComment, getLabels, getMatrixLabel, setComment, setMatrixLabel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AdjacencyDoubleMatrix(int rows,
int cols)
rows - the number of rows in the matrixcols - the number of cols in the matrixpublic AdjacencyDoubleMatrix(List labels)
labels - the row & column labelspublic AdjacencyDoubleMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
m - the DenseDoubleMatrix2D to construct this AdjacencyMatrix frompublic AdjacencyDoubleMatrix(double[][] m)
m - the 2D double array to construct this AdjacencyMatrix from.| Method Detail |
public void setMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
m - the actual matrix data for this AdjacencyMatrixpublic void setMatrix(double[][] m)
m - the actual matrix data for this AdjacencyMatrixpublic cern.colt.matrix.impl.DenseDoubleMatrix1D getRow(int row)
row - the index of the row to getpublic double getDensity()
public double getAvgDegree()
public void set(int row,
int col,
double val)
row - the row index (i)col - the col index (j)
public double get(int row,
int col)
row - the row index (i)col - the col index (j)
public int rows()
public int columns()
public String matrixToString()
public String toString()
toString in class Object
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||