public class PajekNetWriter
extends java.lang.Object
Labels for vertices may optionally be specified by implementations of
VertexStringer
. Edge weights are optionally specified by
implementations of NumberEdgeValue
. Vertex locations
are optionally specified by implementations of
VertexLocationFunction
. Note that vertex location coordinates
must be normalized to the interval [0, 1] on each axis in order to conform to the
Pajek specification.
Constructor and Description |
---|
PajekNetWriter() |
Modifier and Type | Method and Description |
---|---|
void |
save(Graph g,
java.lang.String filename)
Saves
g to filename ; no vertex labels are written out,
and the edge weights are written as 1.0. |
void |
save(Graph g,
java.lang.String filename,
VertexStringer vs,
NumberEdgeValue nev) |
void |
save(Graph g,
java.lang.String filename,
VertexStringer vs,
NumberEdgeValue nev,
VertexLocationFunction vld)
Saves
g to filename . |
void |
save(Graph g,
java.io.Writer w)
Saves
g to w ; no vertex labels are written out,
and the edge weights are written as 1.0. |
void |
save(Graph g,
java.io.Writer w,
VertexStringer vs,
NumberEdgeValue nev) |
void |
save(Graph graph,
java.io.Writer w,
VertexStringer vs,
NumberEdgeValue nev,
VertexLocationFunction vld)
Writes
graph to w . |
public void save(Graph g, java.lang.String filename, VertexStringer vs, NumberEdgeValue nev, VertexLocationFunction vld) throws java.io.IOException
g
to filename
. Labels for vertices may
be supplied by vs
. Edge weights are specified by nev
.java.io.IOException
save(Graph, Writer, VertexStringer, NumberEdgeValue, VertexLocationFunction)
public void save(Graph g, java.lang.String filename, VertexStringer vs, NumberEdgeValue nev) throws java.io.IOException
java.io.IOException
public void save(Graph g, java.lang.String filename) throws java.io.IOException
g
to filename
; no vertex labels are written out,
and the edge weights are written as 1.0.java.io.IOException
public void save(Graph g, java.io.Writer w) throws java.io.IOException
g
to w
; no vertex labels are written out,
and the edge weights are written as 1.0.java.io.IOException
public void save(Graph g, java.io.Writer w, VertexStringer vs, NumberEdgeValue nev) throws java.io.IOException
java.io.IOException
public void save(Graph graph, java.io.Writer w, VertexStringer vs, NumberEdgeValue nev, VertexLocationFunction vld) throws java.io.IOException
graph
to w
. Labels for vertices may
be supplied by vs
(defaults to no labels if null),
edge weights may be specified by nev
(defaults to weights of 1.0 if null),
and vertex locations may be specified by vld
(defaults
to no locations if null).java.io.IOException