|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AdjacencyMatrix
A social network adjacency matrix. This is used as an itermediary data
structure when moving between Nodes and Edges
and other kinds of network representations. The matrix is assumed to
be square and that the rows and columns refer to the same nodes.
Node,
Edge| 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. |
java.lang.String |
getComment()
Gets the comment, if any, associated with this matrix. |
double |
getDensity()
Gets (computes) the density of this matrix. |
java.util.List |
getLabels()
Gets the node labels for this matrix. |
java.lang.String |
getMatrixLabel()
Gets the label for this matrix. |
cern.colt.matrix.impl.DenseDoubleMatrix1D |
getRow(int row)
Gets the specified row of data for this matrix. |
java.lang.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 |
setComment(java.lang.String comment)
Associates a comment with this matrix (e.g. the tick count at which it was created.) |
void |
setMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
Sets the actual matrix for this AdjacencyMatrix. |
void |
setMatrixLabel(java.lang.String mLabel)
Sets the label for this matrix. |
| Method Detail |
|---|
void setMatrixLabel(java.lang.String mLabel)
mLabel - the label for this matrixjava.lang.String getMatrixLabel()
void setMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)
m - the actual matrix data for this AdjacencyMatrixvoid setComment(java.lang.String comment)
comment - the commentjava.lang.String getComment()
java.util.List getLabels()
cern.colt.matrix.impl.DenseDoubleMatrix1D getRow(int row)
row - the index of the row to getdouble getDensity()
double getAvgDegree()
void set(int row,
int col,
double val)
row - the row index (i)col - the col index (j)
double get(int row,
int col)
row - the row index (i)col - the col index (j)
int rows()
int columns()
java.lang.String matrixToString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||