|
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.PajekNetReader
Class for constructing networks from text files in Pajek's *.net Arc/Edge
list file format. Will not read Pajek Arclist/Edgelist format, or Pajek
matrix format. Requires that if "*Arcs" and "*Edges" both exist in file,
"*Arcs" must be before "*Edges" (this is Pajek's default).
Pajek is Windows-based freeware, written by Vladimir Batagelj and
Andrej Mrvar,University of Ljubljana,Slovenia downloadable from:
http://vlado.fmf.uni-lj.si/pub/networks/pajek/
currently does not read colors, edge widths, node sizes, etc..
| Constructor Summary | |
PajekNetReader(String fileAndPath)
|
|
| Method Summary | |
List |
getDrawableNetwork(Class nodeClass,
Class edgeClass,
int spaceWidth,
int spaceHeight)
Returns a list of nodes of type nodeClass forming network corresponding to the *.net file with edges of class edgeClass and strength corresponding to the arcs and edges in the file. |
List |
getNetwork(Class nodeClass,
Class edgeClass)
Returns a list of nodes of type nodeClass forming network corresponding to the *.net file with edges of class edgeClass and with strengths corresponding to the arcs and edges in the file |
int[] |
getXY(Node node)
Returns an int[x,y] with the coordinates of the node if they were read from the Pajek *.net file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PajekNetReader(String fileAndPath)
| Method Detail |
public List getNetwork(Class nodeClass,
Class edgeClass)
throws IOException
nodeClass - the class to construct nodes from. Must implement Node
and have no-argument constructoredgeClass - the class to construct nodes from. Must implement Edge
and have no-argument constructor
IOException
public List getDrawableNetwork(Class nodeClass,
Class edgeClass,
int spaceWidth,
int spaceHeight)
throws IOException
nodeClass - the class to construct nodes from. Must implement Node
and have no-argument constructoredgeClass - the class to construct nodes from. Must implement Edge
and have no-argument constructorspaceWidth - the horizontal dimension of the display in pixelsspaceHeight - the vertical dimension of the display in pixels
IOExceptionpublic int[] getXY(Node node)
node - the node (must be of class nodeClass) to return x and y for
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||