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
Class NetworkConvertor

    java.lang.Object
      uchicago.src.sim.network.NetworkConvertor

    public class NetworkConvertor

extends java.lang.Object

Utility class to convert one kind of network representation to another.

Version:
  $Revision: 1.6 $ $Date: 2004/11/03 19:51:01 $
Author:
  Nick Collier

Method Summary
`static java.util.Vector` | `matricesToNodes(java.util.Vector matrices, java.lang.Class nodeClass, java.lang.Class edgeClass)` Converts the network(s) described in matrices to a list of nodes and links of type nodeClass and type edgeClass. matrices must contain AdjacencyMatrices that describe the same nodes, that is, each AdjacencyMatrix must contain the same list of node labels, in the same order.
`static java.util.Vector` | `nodesToMatrices(java.util.List nodeList)` Deprecated. use `nodesToMatrices(List nodeList, int matrixType)` instead.
`static java.util.Vector` | `nodesToMatrices(java.util.List nodeList, int matrixType)` Converts the network(s) described by a list Nodes to a Vector of AdjacencyMatrices.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### nodesToMatrices

    public static java.util.Vector nodesToMatrices(java.util.List nodeList)

  Deprecated. use `nodesToMatrices(List nodeList, int matrixType)` instead.

  Converts the network(s) described by a list Nodes to a Vector of AdjacencyMatrices.

  Returns:
    a Vector of AdjacencyMatrices
  See Also:
    `AdjacencyMatrix`

### nodesToMatrices

    public static java.util.Vector nodesToMatrices(java.util.List nodeList,
                                                   int matrixType)

  Converts the network(s) described by a list Nodes to a Vector of AdjacencyMatrices.

  The matrixType parameter refers to the size of the matrix elements, the ij values. A matrix of type of NetworkConstants.BINARY contains on 0 or 1 as elements. A matrix of type of NetworkConstants.SMALL contains values of -127 - 127 as elements. And a matrix of type NetworkConstants.LARGE contains anything else. Matrix ij values are assigned the edge strength of an edge, so unless you have explicitly set an edge strength of greater than 1, use NetworkConstants.BINARY.

  Parameters:
    `nodeList` - the list of nodes that is the source for the matrix
    `matrixType` - the type of the matrix. type refers to the size of the matrix elements (ij values) and can be one of NetworkConstants.BINARY, NetworkConstants.LARGE, NetworkConstants.SMALL
  Returns:
    a Vector of AdjacencyMatrices
  See Also:
    `AdjacencyMatrix`

### matricesToNodes

    public static java.util.Vector matricesToNodes(java.util.Vector matrices,
                                                   java.lang.Class nodeClass,
                                                   java.lang.Class edgeClass)

  Converts the network(s) described in matrices to a list of nodes and links of type nodeClass and type edgeClass. matrices must contain AdjacencyMatrices that describe the same nodes, that is, each AdjacencyMatrix must contain the same list of node labels, in the same order.

  Parameters:
    `matrices` - a list of AdjacencyMatrices
    `nodeClass` - specifies the type of Nodes to create
    `edgeClass` - specifies the type of Edge to create
  Returns:
    a list of nodes of the type specified by nodeClass. These nodes will contain edges of type edgeClass

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