Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.network
Interface AdjacencyMatrix

All Known Implementing Classes:
  AbstractAdjacencyMatrix, AdjacencyBitMatrix, AdjacencyByteMatrix, AdjacencyDoubleMatrix

    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.

Version:
  $Revision: 1.6 $ $Date: 2004/11/03 19:51:01 $
Author:
  Nick Collier
See Also:
  `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

### setMatrixLabel

    void setMatrixLabel(java.lang.String mLabel)

  Sets the label for this matrix. This is used to indicated the type of matrix (i.e. kinship etc.).

  Parameters:
    `mLabel` - the label for this matrix

### getMatrixLabel

    java.lang.String getMatrixLabel()

  Gets the label for this matrix. This is used to indicated the type of matrix (i.e. kinship etc.).

### setMatrix

    void setMatrix(cern.colt.matrix.impl.DenseDoubleMatrix2D m)

  Sets the actual matrix for this AdjacencyMatrix.

  Parameters:
    `m` - the actual matrix data for this AdjacencyMatrix

### setComment

    void setComment(java.lang.String comment)

  Associates a comment with this matrix (e.g. the tick count at which it was created.)

  Parameters:
    `comment` - the comment

### getComment

    java.lang.String getComment()

  Gets the comment, if any, associated with this matrix.

### getLabels

    java.util.List getLabels()

  Gets the node labels for this matrix.

### getRow

    cern.colt.matrix.impl.DenseDoubleMatrix1D getRow(int row)

  Gets the specified row of data for this matrix.

  Parameters:
    `row` - the index of the row to get

### getDensity

    double getDensity()

  Gets (computes) the density of this matrix.

### getAvgDegree

    double getAvgDegree()

  Gets the average degree of this matrix.

### set

    void set(int row,
             int col,
             double val)

  Sets a data value in this matrix.

  Parameters:
    `row` - the row index (i)
    `col` - the col index (j)

### get

    double get(int row,
               int col)

  Gets the value at row, col.

  Parameters:
    `row` - the row index (i)
    `col` - the col index (j)
  Returns:
    the double value at row, col (ij)

### rows

    int rows()

  Returns the number of rows int matrix.

### columns

    int columns()

  Returns the number of columns in the matrix.

### matrixToString

    java.lang.String matrixToString()

  Returns a String representation of only the actual data matrix.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD