Package igraph
source code
IGraph library.
Version:
0.6.5
License:
Copyright (C) 2006-2012 Tamás Nepusz <ntamas@gmail.com>
Pázmány Péter sétány 1/a, 1117 Budapest, 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
|
|
Graph
Generic graph.
|
|
|
VertexSeq
Class representing a sequence of vertices in the graph.
|
|
|
EdgeSeq
Class representing a sequence of edges in the graph.
|
|
|
ARPACKOptions
Class representing the parameters of the ARPACK module.
|
|
|
BFSIter
igraph BFS iterator object
|
|
|
Edge
Class representing a single edge in a graph.
|
|
|
GraphBase
Low-level representation of a graph.
|
|
|
Vertex
Class representing a single vertex in a graph.
|
|
|
autocurve(graph,
attribute='curved',
default=0)
Calculates curvature values for each of the edges in the graph to
make sure that multiple edges are shown properly on a graph plot. |
source code
|
|
|
|
read(filename,
*args,
**kwds)
Loads a graph from the given filename. |
source code
|
|
|
|
load(filename,
*args,
**kwds)
Loads a graph from the given filename. |
source code
|
|
|
|
write(graph,
filename,
*args,
**kwds)
Saves a graph to the given file. |
source code
|
|
|
|
save(graph,
filename,
*args,
**kwds)
Saves a graph to the given file. |
source code
|
|
|
|
summary(obj,
stream=None,
*args,
**kwds)
Prints a summary of object o to a given stream |
source code
|
|
|
|
config = None
|
|
|
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
|
|
|
Nexus = NexusConnection()
|
|
|
OUT = 1
|
|
|
REWIRING_SIMPLE = 0
|
|
|
REWIRING_SIMPLE_LOOPS = 1
|
|
|
STAR_IN = 1
|
|
|
STAR_MUTUAL = 3
|
|
|
STAR_OUT = 0
|
|
|
STAR_UNDIRECTED = 2
|
|
|
STRONG = 2
|
|
|
TRANSITIVITY_NAN = 0
|
|
|
TRANSITIVITY_ZERO = 1
|
|
|
TREE_IN = 1
|
|
|
TREE_OUT = 0
|
|
|
TREE_UNDIRECTED = 2
|
|
|
WEAK = 1
|
|
|
__package__ = 'igraph'
|
|
|
arpack_options = <igraph.ARPACKOptions object at 0x7fb5cb87f6d0>
|
|
|
dbl_epsilon = 2.22044604925e-16
|
|
|
known_colors = {'alice blue': (0.941176470588, 0.972549019608,...
|
|
|
name = 'write_svg'
|
|
|
palettes = {'gray': <GradientPalette with 256 colors>, 'heat':...
|
|
|
pi = 3.14159265359
|
Imports:
__build_date__,
Configuration,
os,
math,
gzip,
sys,
operator,
defaultdict,
izip,
mkstemp,
warn,
AdvancedGradientPalette,
BoundingBox,
ClusterColoringPalette,
Clustering,
CohesiveBlocks,
Cover,
Cut,
DefaultGraphDrawer,
Dendrogram,
DyadCensus,
FittedPowerLaw,
Flow,
GradientPalette,
GraphSummary,
Histogram,
InternalError,
Layout,
Matching,
Matrix,
NexusConnection,
Palette,
Plot,
Point,
PrecalculatedPalette,
RainbowPalette,
Rectangle,
RunningMean,
StringIO,
TriadCensus,
UniqueIdGenerator,
VertexClustering,
VertexCover,
VertexDendrogram,
_igraph,
clustering,
color_name_to_rgb,
color_name_to_rgba,
community_to_membership,
compare_communities,
compat,
configuration,
convex_hull,
cos,
cut,
datatypes,
deepcopy,
drawing,
formula,
hsl_to_rgb,
hsla_to_rgba,
hsv_to_rgb,
hsva_to_rgba,
is_degree_sequence,
is_graphical_degree_sequence,
islice,
layout,
matching,
mean,
median,
multidict,
named_temporary_file,
nexus,
percentile,
plot,
power_law_fit,
property,
quantile,
remote,
rescale,
rgb_to_hsl,
rgb_to_hsv,
rgba_to_hsla,
rgba_to_hsva,
safemax,
safemin,
set_progress_handler,
set_random_number_generator,
set_status_handler,
sin,
split_join_distance,
statistics,
str_to_orientation,
utils,
vendor
autocurve(graph,
attribute='curved',
default=0)
| source code
|
Calculates curvature values for each of the edges in the graph to make
sure that multiple edges are shown properly on a graph plot.
This function checks the multiplicity of each edge in the graph and
assigns curvature values (numbers between -1 and 1, corresponding to CCW
(-1), straight (0) and CW (1) curved edges) to them. The assigned values
are either stored in an edge attribute or returned as a list, depending
on the value of the attribute argument.
- Parameters:
graph - the graph on which the calculation will be run
attribute - the name of the edge attribute to save the curvature values to.
The default value is curved, which is the name of
the edge attribute the default graph plotter checks to decide
whether an edge should be curved on the plot or not. If
attribute is None, the result will not be
stored.
default - the default curvature for single edges. Zero means that single
edges will be straight. If you want single edges to be curved as
well, try passing 0.5 or -0.5 here.
- Returns:
- the list of curvature values if attribute is
None, otherwise None.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Prints a summary of object o to a given stream
Positional and keyword arguments not explicitly mentioned here are
passed on to the underlying summary() method of the object
if it has any.
- Parameters:
obj - the object about which a human-readable summary is requested.
stream - the stream to be used. If None, the standard output
will be used.
|
known_colors
- Value:
{'alice blue': (0.941176470588, 0.972549019608, 1.0, 1.0),
'aliceblue': (0.941176470588, 0.972549019608, 1.0, 1.0),
'antique white': (0.980392156863,
0.921568627451,
0.843137254902,
1.0),
'antiquewhite': (0.980392156863, 0.921568627451, 0.843137254902, 1.0)
,
...
|
|
palettes
- Value:
{'gray': <GradientPalette with 256 colors>,
'heat': <AdvancedGradientPalette with 256 colors>,
'rainbow': <RainbowPalette with 256 colors>,
'red-black-green': <AdvancedGradientPalette with 256 colors>,
'red-blue': <GradientPalette with 256 colors>,
'red-green': <GradientPalette with 256 colors>,
'red-purple-blue': <AdvancedGradientPalette with 256 colors>,
'red-yellow-green': <AdvancedGradientPalette with 256 colors>,
...
|
|