edu.uci.ics.jung.io
Class PajekNetWriter<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.io.PajekNetWriter<V,E>

public class PajekNetWriter<V,E>
extends Object

Writes graphs in the Pajek NET format.

Labels for vertices may optionally be specified by implementations of VertexStringer. Edge weights are optionally specified by implementations of Transformer. Vertex locations are optionally specified by implementations of Transformer. Note that vertex location coordinates must be normalized to the interval [0, 1] on each axis in order to conform to the Pajek specification.

Author:
Joshua O'Madadhain, Tom Nelson - converted to jung2

Constructor Summary
PajekNetWriter()
          Creates a new instance.
 
Method Summary
 void save(Graph<V,E> g, String filename)
          Saves g to filename; no vertex labels are written out, and the edge weights are written as 1.0.
 void save(Graph<V,E> g, String filename, org.apache.commons.collections15.Transformer<V,String> vs, org.apache.commons.collections15.Transformer<E,Number> nev)
          Saves g to filename.
 void save(Graph<V,E> g, String filename, org.apache.commons.collections15.Transformer<V,String> vs, org.apache.commons.collections15.Transformer<E,Number> nev, org.apache.commons.collections15.Transformer<V,Point2D> vld)
          Saves g to filename.
 void save(Graph<V,E> g, Writer w)
          Saves g to w; no vertex labels are written out, and the edge weights are written as 1.0.
 void save(Graph<V,E> g, Writer w, org.apache.commons.collections15.Transformer<V,String> vs, org.apache.commons.collections15.Transformer<E,Number> nev)
          Saves g to w; vertex labels are given by vs and edge weights by nev.
 void save(Graph<V,E> graph, Writer w, org.apache.commons.collections15.Transformer<V,String> vs, org.apache.commons.collections15.Transformer<E,Number> nev, org.apache.commons.collections15.Transformer<V,Point2D> vld)
          Writes graph to w.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PajekNetWriter

public PajekNetWriter()
Creates a new instance.

Method Detail

save

public void save(Graph<V,E> g,
                 String filename,
                 org.apache.commons.collections15.Transformer<V,String> vs,
                 org.apache.commons.collections15.Transformer<E,Number> nev,
                 org.apache.commons.collections15.Transformer<V,Point2D> vld)
          throws IOException
Saves g to filename. Labels for vertices may be supplied by vs. Edge weights are specified by nev.

Throws:
IOException

save

public void save(Graph<V,E> g,
                 String filename,
                 org.apache.commons.collections15.Transformer<V,String> vs,
                 org.apache.commons.collections15.Transformer<E,Number> nev)
          throws IOException
Saves g to filename. Labels are specified by vs, and edge weights by nev; vertex coordinates are not written out.

Parameters:
g - the graph to write out
filename -
vs -
nev -
Throws:
IOException

save

public void save(Graph<V,E> g,
                 String filename)
          throws IOException
Saves g to filename; no vertex labels are written out, and the edge weights are written as 1.0.

Throws:
IOException

save

public void save(Graph<V,E> g,
                 Writer w)
          throws IOException
Saves g to w; no vertex labels are written out, and the edge weights are written as 1.0.

Throws:
IOException

save

public void save(Graph<V,E> g,
                 Writer w,
                 org.apache.commons.collections15.Transformer<V,String> vs,
                 org.apache.commons.collections15.Transformer<E,Number> nev)
          throws IOException
Saves g to w; vertex labels are given by vs and edge weights by nev.

Parameters:
g -
w -
vs -
nev -
Throws:
IOException

save

public void save(Graph<V,E> graph,
                 Writer w,
                 org.apache.commons.collections15.Transformer<V,String> vs,
                 org.apache.commons.collections15.Transformer<E,Number> nev,
                 org.apache.commons.collections15.Transformer<V,Point2D> vld)
          throws IOException
Writes 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).

Throws:
IOException


Copyright © 2009. All Rights Reserved.