|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.NetworkConvertor
public class NetworkConvertor
Utility class to convert one kind of network representation to another.
| 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 |
|---|
public static java.util.Vector nodesToMatrices(java.util.List nodeList)
nodesToMatrices(List nodeList, int matrixType)
instead.
AdjacencyMatrix
public static java.util.Vector nodesToMatrices(java.util.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 java.util.Vector matricesToNodes(java.util.Vector matrices,
java.lang.Class nodeClass,
java.lang.Class edgeClass)
matrices - a list of AdjacencyMatricesnodeClass - specifies the type of Nodes to createedgeClass - specifies the type of Edge to create
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||