|
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.NetworkConvertor
Utility class to convert one kind of network representation to another.
| Method Summary | |
static Vector |
matricesToNodes(Vector matrices,
Class nodeClass,
Class edgeClass)
Converts the network(s) described in matrices to a list of nodes and links of type nodeClass and type edgeClass. |
static Vector |
nodesToMatrices(List nodeList)
Deprecated. use nodesToMatrices(List nodeList, int matrixType)
instead. |
static Vector |
nodesToMatrices(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 |
public static Vector nodesToMatrices(List nodeList)
nodesToMatrices(List nodeList, int matrixType)
instead.
AdjacencyMatrix
public static Vector nodesToMatrices(List nodeList,
int matrixType)
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.
nodeList - the list of nodes that is the source for the matrixmatrixType - 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
AdjacencyMatrix
public static Vector matricesToNodes(Vector matrices,
Class nodeClass,
Class edgeClass)
matrices - a list of AdjacencyMatricesnodeClass - specifies the type of Nodes to createedgeClass - specifies the type of Edge to create
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||