Package igraph
[hide private]
[frames] | no frames]

Package igraph

IGraph library.


Version: 0.5.1

License: Copyright (C) 2006-2007 Gabor Csardi <csardi@rmki.kfki.hu>, Tamas Nepusz <ntamas@rmki.kfki.hu> MTA RMKI, Konkoly-Thege Miklos st. 29-33, Budapest 1121, Hungary This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Submodules [hide private]

Classes [hide private]
  ARPACKOptions
Class representing the parameters of the ARPACK module.
  BFSIter
igraph BFS iterator object
  Edge
Class representing a single edge in a graph.
  EdgeSeq
Class representing a sequence of edges in the graph.
  Graph
Generic graph.
  GraphBase
Low-level representation of a graph.
  Vertex
Class representing a single vertex in a graph.
  VertexSeq
Class representing a sequence of vertices in the graph.
Functions [hide private]
 
_add_proxy_methods()
 
_graphmethod(func=None, name=None)
Auxiliary decorator
 
load(filename, *args, **kwds)
Loads a graph from the given filename.
 
read(filename, *args, **kwds)
Loads a graph from the given filename.
 
save(graph, filename, *args, **kwds)
Saves a graph to the given file.
 
summary(o, f=<epydoc.docintrospecter._DevNull instance at 0x2c3e40>)
Prints a summary of object o to a given stream
 
write(graph, filename, *args, **kwds)
Saves a graph to the given file.
Variables [hide private]
  ADJ_DIRECTED = 0
  ADJ_LOWER = 3
  ADJ_MAX = 1
  ADJ_MIN = 4
  ADJ_PLUS = 5
  ADJ_UNDIRECTED = 1
  ADJ_UPPER = 2
  ALL = 3
  BLISS_F = 0
  BLISS_FL = 1
  BLISS_FLM = 4
  BLISS_FM = 3
  BLISS_FS = 2
  BLISS_FSM = 5
  GET_ADJACENCY_BOTH = 2
  GET_ADJACENCY_LOWER = 1
  GET_ADJACENCY_UPPER = 0
  IN = 2
  OUT = 1
  REWIRING_SIMPLE = 0
  STAR_IN = 1
  STAR_OUT = 0
  STAR_UNDIRECTED = 2
  STRONG = 2
  TREE_IN = 1
  TREE_OUT = 0
  TREE_UNDIRECTED = 2
  WEAK = 1
  __build_date__ = 'Aug 16 2008'
  __loader__ = <zipimporter object "/Library/Python/2.5/site-pac...
  arpack_options = <igraph.ARPACKOptions object at 0x3885d0>
  config = <igraph.configuration.Configuration object at 0x284090>
  known_colors = {'alice blue': (0.941176470588, 0.972549019608,...
  palettes = {'gray': <igraph.colors.GradientPalette object at 0...
Function Details [hide private]

_graphmethod(func=None, name=None)

 

Auxiliary decorator

This decorator allows some methods of VertexSeq and EdgeSeq to call their respective counterparts in Graph to avoid code duplication.

Parameters:
  • func - the function being decorated. This function will be called on the results of the original Graph method. If None, defaults to the identity function.
  • name - the name of the corresponding method in Graph. If None, it defaults to the name of the decorated function.
Returns:
the decorated function

load(filename, *args, **kwds)

 

Loads a graph from the given filename.

This is just a convenience function, calls Graph.Read directly. All arguments are passed unchanged to Graph.Read

Parameters:
  • filename - the name of the file to be loaded

read(filename, *args, **kwds)

 

Loads a graph from the given filename.

This is just a convenience function, calls Graph.Read directly. All arguments are passed unchanged to Graph.Read

Parameters:
  • filename - the name of the file to be loaded

save(graph, filename, *args, **kwds)

 

Saves a graph to the given file.

This is just a convenience function, calls Graph.write directly. All arguments are passed unchanged to Graph.write

Parameters:
  • graph - the graph to be saved
  • filename - the name of the file to be written

summary(o, f=<epydoc.docintrospecter._DevNull instance at 0x2c3e40>)

 

Prints a summary of object o to a given stream

Parameters:
  • o - the object about which a human-readable summary is requested.
  • f - the stream to be used

write(graph, filename, *args, **kwds)

 

Saves a graph to the given file.

This is just a convenience function, calls Graph.write directly. All arguments are passed unchanged to Graph.write

Parameters:
  • graph - the graph to be saved
  • filename - the name of the file to be written

Variables Details [hide private]

__loader__

Value:
<zipimporter object "/Library/Python/2.5/site-packages/python_igraph-0\
.5.1-py2.5-macosx-10.5-i386.egg">

known_colors

Value:
{'alice blue': (0.941176470588, 0.972549019608, 1.0),
 'aliceblue': (0.941176470588, 0.972549019608, 1.0),
 'antique white': (0.980392156863, 0.921568627451, 0.843137254902),
 'antiquewhite': (0.980392156863, 0.921568627451, 0.843137254902),
 'antiquewhite1': (1.0, 0.937254901961, 0.858823529412),
 'antiquewhite2': (0.933333333333, 0.874509803922, 0.8),
 'antiquewhite3': (0.803921568627, 0.752941176471, 0.690196078431),
 'antiquewhite4': (0.545098039216, 0.513725490196, 0.470588235294),
...

palettes

Value:
{'gray': <igraph.colors.GradientPalette object at 0x25b6f0>,
 'red-blue': <igraph.colors.GradientPalette object at 0x25b750>}