|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.PajekNetReader
public class 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(java.lang.String fileAndPath)
|
|
| Method Summary | |
|---|---|
java.util.List |
getDrawableNetwork(java.lang.Class nodeClass,
java.lang.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. |
java.util.List |
getNetwork(java.lang.Class nodeClass,
java.lang.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(java.lang.String fileAndPath)
| Method Detail |
|---|
public java.util.List getNetwork(java.lang.Class nodeClass,
java.lang.Class edgeClass)
throws java.io.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
java.io.IOException
public java.util.List getDrawableNetwork(java.lang.Class nodeClass,
java.lang.Class edgeClass,
int spaceWidth,
int spaceHeight)
throws java.io.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
java.io.IOExceptionpublic int[] getXY(Node node)
node - the node (must be of class nodeClass) to return x and y for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||