GRF Files


GRF is a data directory which contains examples of GRF files. GRF files are used to store an embedding of an abstract graph. The abstract graph comprises a set of nodes, and edges that connect some pairs of nodes. The embedding assigns a position to each node, and draws edges as straight lines between the nodes.

The original format derives from the SPREMB package developed at the University of Queensland, Australia.

There are three variations on the file format. For all the formats, lines beginning with the "#" character are comment lines (this is a modification I added, but it's easy to strip such lines out if you don't want them.) We assume that the nodes of the graph are numbered, with a typical node numbered I. Information about node I is stored on the I-th noncomment line of the file. (It is not actually necessary that the I-th node be listed on the I-th noncomment line, but it is customary.) Edges of the graph that begin at node I will be described by listing the nodes at the terminal end of the edge. Thus, if there are edges from node I to nodes J(1), J(2), ..., J(K), then these nodes will be listed.

The I-th noncomment line of the file is

        I  X(I) Y(I) J(1) J(2) ... J(K)
      
where X(I) and Y(I) are the coordinates of a point used to represent the node in a drawing. All point coordinates should be between 0 and 1.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

GRAFFITI, a dataset directory which contains 195 abstract graphs, with adjacency and embedding information, stored in the GRF format.

GRAPH_REPRESENTATION, a data directory which contains examples of ways of representing abstract mathematical graphs

GRF_DISPLAY, a MATLAB program which reads a GRF file defining a mathematical graph and displays it in the MATLAB graphics window.

GRF_DISPLAY_OPENGL, a C++ program which reads a GRF file defining a mathematical graph and displays it in an OpenGL graphics window.

GRF_IO, a C++ library which reads or writes a GRF file;

GRF_IO, a FORTRAN90 library which reads or writes a GRF file;

GRF_IO, a MATLAB library which reads or writes a GRF file;

GRF_TO_EPS, a FORTRAN90 program which converts a GRF file to EPS format;

GRF_TO_XYL, a FORTRAN90 program which converts information describing the adjacency and embedding of an abstract graph from GRF to XYL format.

Reference:

  1. Peter Eades, Ian Fogg, David Kelly,
    SPREMB: A System for Developing Graph Algorithms,
    Congressus Numerantium,
    Volume 66, December 1988, pages 123-140.
  2. Stephen Skiena,
    Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica,
    Addison Wesley, 1990,
    ISBN: 0201509431,
    LC: QA164.S56.

Sample files:

You can go up one level to the DATA page.


Last revised on 19 January 2011.