Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.io
Class PajekNetFile

    java.lang.Object
      edu.uci.ics.jung.io.PajekNetFile

All Implemented Interfaces:
  GraphFile

Deprecated. As of version 1.4, replaced by `PajekNetReader` and `PajekNetWriter`

public class PajekNetFile
extends Object
implements GraphFile

A file reader for Pajek .net files. At the moment, only supports the part of the specification that defines:

- node ids (must be ordered from 1 to n)
- node labels (must be in quotes)
- directed edge connections (single or list)
- undirected edge connections (single or list)
- edge weights (1 or more can be specified; not compatible with edges specified in list form)

Here is an example format for a directed graph without edge weights and edges specified in list form:

     *vertices <# of vertices>
     1 "a"
     2 "b"
     3 "c"
     *arcslist
     1 2 3
     2 3

Here is an example format for an undirected graph with edge weights and edges specified in non-list form:

     *vertices <# of vertices>
     1 "a"
     2 "b"
     3 "c"
     *edges
     1 2 0.1
     1 3 0.9
     2 3 1.0

Author:
  Scott White, Joshua O'Madadhain
See Also:
  "'Pajek - Program for Large Network Analysis', Vladimir Batagelj and Andrej Mrvar, www.ucm.es/info/pecar/pajek.pdf"

Field Summary
`static String` | `EDGE_WEIGHT` Deprecated.

Constructor Summary
`PajekNetFile()` Deprecated. Default constructor for pajek graph reader
`PajekNetFile(String[] edgeKeys)` Deprecated. Constructor which takes in the user datum keys for the edge weights

Method Summary
`String[]` | `getEdgeKeys()` Deprecated. retrieves the set of edge keys the algorithm will use to store the edge weights
`Graph` | `load(Reader read)` Deprecated. Loads a graph for the given BufferedReader (where the data is assumed to be in Pajek NET format).
`Graph` | `load(String filename)` Deprecated. Loads a graph from disk for the given .net file If the edges are directed then a directed graph will be created, otherwise an undirected graph will be created
`void` | `save(Graph graph, String filename)` Deprecated. Writes `graph` to the file specified by `filename` in the Pajek NET format.
`void` | `setCreateDirectedOnly(boolean createDirectedOnly)` Deprecated. Forces a graph that is normally undirected to be loaded in as its directed equivalent
`void` | `setEdgeKeys(String[] edgeKeys)` Deprecated. set the edge the algorithm will use to store the edge weights

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EDGE_WEIGHT

    public static final String EDGE_WEIGHT

  Deprecated.
  See Also:
    Constant Field Values

Constructor Detail

### PajekNetFile

    public PajekNetFile()

  Deprecated.
  Default constructor for pajek graph reader

### PajekNetFile

    public PajekNetFile(String[] edgeKeys)

  Deprecated.
  Constructor which takes in the user datum keys for the edge weights

Parameters:
  `edgeKeys` - the user datum keys the algorithm should use to store the edge weights (as MutableDoubles)

Method Detail

### getEdgeKeys

    public String[] getEdgeKeys()

  Deprecated.
  retrieves the set of edge keys the algorithm will use to store the edge weights

  Returns:
    the user datum keys the algorithm should is using to store the edge weights (as MutableDoubles)

### setEdgeKeys

    public void setEdgeKeys(String[] edgeKeys)

  Deprecated.
  set the edge the algorithm will use to store the edge weights

  Parameters:
    `edgeKeys` - the user datum keys the algorithm should use to store the edge weights (as MutableDoubles)

### load

    public Graph load(String filename)

  Deprecated.
  Loads a graph from disk for the given .net file If the edges are directed then a directed graph will be created, otherwise an undirected graph will be created

  Specified by:
    `load` in interface `GraphFile`
  Parameters:
    `filename` - the fully specified file name of the pajek .net file
  Returns:
    the corresponding graph

### setCreateDirectedOnly

    public void setCreateDirectedOnly(boolean createDirectedOnly)

  Deprecated.
  Forces a graph that is normally undirected to be loaded in as its directed equivalent

  Parameters:
    `createDirectedOnly` - if true, force graph to be directed, false to not force this constraint

### load

    public Graph load(Reader read)

  Deprecated.
  Loads a graph for the given BufferedReader (where the data is assumed to be in Pajek NET format). If the edges are directed then a directed graph will be created, otherwise an undirected graph will be created.

  Parameters:
    `read` - the data stream that contains the graph data in .net format
  Returns:
    the corresponding graph

### save

    public void save(Graph graph,
                     String filename)

  Deprecated.
  Writes `graph` to the file specified by `filename` in the Pajek NET format.

  Specified by:
    `save` in interface `GraphFile`
  Parameters:
    `graph` - the graph to save
    `filename` - the fully specified file name where the graph is to be saved to disk

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD