dynamo.vf.vfGraph
- class dynamo.vf.vfGraph(*args, **kwds)[source]
A class for manipulating the graph creating from the transition matrix, built from the (reconstructed) vector field. This is a derived class from igraph’s Graph.
Methods
Adjacency
(matrix[, mode, loops])Generates a graph from its adjacency matrix.
Asymmetric_Preference
(type_dist_matrix, ...)Generates a graph based on asymmetric vertex types and connection probabilities.
Atlas
()Generates a graph from the Graph Atlas.
Barabasi
(m[, outpref, directed, power, ...])Generates a graph based on the Barabási-Albert model.
Biadjacency
(matrix[, directed, mode, ...])Creates a bipartite graph from a bipartite adjacency matrix.
Bipartite
(types, edges[, directed])Creates a bipartite graph with the given vertex types and edges.
Chung_Lu
([in_, loops, variant])Generates a Chung-Lu random graph.
DataFrame
([directed, vertices, use_vids])Generates a graph from one or two dataframes.
De_Bruijn
(n)Generates a de Bruijn graph with parameters (m, n)
Degree_Sequence
([in_, method])Generates a graph with a given degree sequence.
DictDict
([directed, vertex_name_attr])Constructs a graph from a dict-of-dicts representation.
DictList
(edges[, directed, ...])Constructs a graph from a list-of-dictionaries representation.
Erdos_Renyi
(p, m[, directed, loops])Generates a graph based on the Erdős-Rényi model.
Establishment
(k, type_dist, pref_matrix[, ...])Generates a graph based on a simple growing model with vertex types.
Famous
()Generates a famous graph based on its name.
Forest_Fire
(fw_prob[, bw_factor, ambs, directed])Generates a graph based on the forest fire model
Formula
([formula, attr, simplify])Generates a graph from a graph formula
Full
([directed, loops])Generates a full graph (directed or undirected, with or without loops).
Full_Bipartite
(n1, n2[, directed, mode])Generates a full bipartite graph (directed or undirected, with or without loops).
Full_Citation
([directed])Generates a full citation graph
GRG
(n, radius[, torus])Generates a random geometric graph.
Growing_Random
(m[, directed, citation])Generates a growing random graph.
Hexagonal_Lattice
([directed, mutual])Generates a regular hexagonal lattice.
Hypercube
([directed])Generates an n-dimensional hypercube graph.
Incidence
(*args, **kwds)Deprecated alias to L{Graph.Biadjacency()}.
Isoclass
(cls[, directed])Generates a graph with a given isomorphism class.
K_Regular
(k[, directed, multiple])Generates a k-regular random graph
Kautz
(n)Generates a Kautz graph with parameters (m, n)
LCF
(shifts, repeats)Generates a graph from LCF notation.
Lattice
([nei, directed, mutual, circular])Generates a regular square lattice.
ListDict
([directed, vertex_name_attr])Constructs a graph from a dict-of-lists representation.
Load
(f[, format])Unified reading function for graphs.
Preference
(type_dist, pref_matrix[, ...])Generates a graph based on vertex types and connection probabilities.
Prufer
()Generates a tree from its Prüfer sequence.
Random_Bipartite
(n1, n2[, p, m, directed, ...])Generates a random bipartite graph with the given number of vertices and edges (if m is given), or with the given number of vertices and the given connection probability (if p is given).
Read
(f[, format])Unified reading function for graphs.
Read_Adjacency
(f[, sep, comment_char, attribute])Constructs a graph based on an adjacency matrix from the given file.
Read_DIMACS
(f[, directed])Reads a graph from a file conforming to the DIMACS minimum-cost flow file format.
Read_DL
([directed])Reads an UCINET DL file and creates a graph based on it.
Read_Edgelist
([directed])Reads an edge list from a file and creates a graph based on it.
Read_GML
()Reads a GML file and creates a graph based on it.
Read_GraphDB
([directed])Reads a GraphDB format file and creates a graph based on it.
Read_GraphML
([index])Reads a GraphML format file and creates a graph based on it.
Read_GraphMLz
(f[, index])Reads a graph from a zipped GraphML file.
Read_Lgl
([names, weights, directed])Reads an .lgl file used by LGL.
Read_Ncol
([names, weights, directed])Reads an .ncol file used by LGL.
Read_Pajek
()Reads a file in the Pajek format and creates a graph based on it.
Read_Pickle
([fname])Reads a graph from Python pickled format
Read_Picklez
(fname)Reads a graph from compressed Python pickled format, uncompressing it on-the-fly.
Realize_Bipartite_Degree_Sequence
(degrees2)Generates a bipartite graph from the degree sequences of its partitions.
Realize_Degree_Sequence
([in_, ...])Generates a graph from a degree sequence.
Recent_Degree
(m, window[, outpref, ...])Generates a graph based on a stochastic model where the probability of an edge gaining a new node is proportional to the edges gained in a given time window.
Ring
([directed, mutual, circular])Generates a ring graph.
SBM
(pref_matrix, block_sizes[, directed, loops])Generates a graph based on a stochastic block model.
Star
([mode, center])Generates a star graph.
Static_Fitness
(fitness_out[, fitness_in, ...])Generates a non-growing graph with edge probabilities proportional to node fitnesses.
Static_Power_Law
(m, exponent_out[, ...])Generates a non-growing graph with prescribed power-law degree distributions.
Tree
(children[, mode])Generates a tree in which almost all vertices have the same number of children.
Tree_Game
([directed, method])Generates a random tree by sampling uniformly from the set of labelled trees with a given number of nodes.
Triangular_Lattice
([directed, mutual])Generates a regular triangular lattice.
TupleList
([directed, vertex_name_attr, ...])Constructs a graph from a list-of-tuples representation.
Watts_Strogatz
(size, nei, p[, loops, multiple])This function generates networks with the small-world property based on a variant of the Watts-Strogatz model.
Weighted_Adjacency
(matrix[, mode, attr, loops])Generates a graph from its weighted adjacency matrix.
__init__
(*args, **kwds)add_edge
(source, target, **kwds)Adds a single edge to the graph.
add_edges
(es[, attributes])Adds some edges to the graph.
add_vertex
([name])Adds a single vertex to the graph.
add_vertices
(n[, attributes])Adds some vertices to the graph.
adhesion
([target, checks])Calculates the edge connectivity of the graph or between some vertices.
all_minimal_st_separators
()Returns a list containing all the minimal s-t separators of a graph.
all_st_cuts
(source, target)Returns all the cuts between the source and target vertices in a directed graph.
all_st_mincuts
(source, target[, capacity])Returns all the mincuts between the source and target vertices in a directed graph.
alpha
()Returns the independence number of the graph.
are_adjacent
(v2)Decides whether two given vertices are directly connected.
are_connected
(*args, **kwds)Deprecated alias to L{Graph.are_adjacent()}.
articulation_points
()Returns the list of articulation points in the graph.
as_directed
(*args, **kwds)Returns a directed copy of this graph.
as_undirected
(*args, **kwds)Returns an undirected copy of this graph.
assortativity
([types2, directed, normalized])Returns the assortativity of the graph based on numeric properties of the vertices.
assortativity_degree
()Returns the assortativity of a graph based on vertex degrees.
assortativity_nominal
([directed, normalized])Returns the assortativity of the graph based on vertex categories.
attributes
()@return: the attribute name list of the graph
authority_score
([scale, arpack_options, ...])Calculates Kleinberg's authority score for the vertices of the graph
automorphism_group
([color])Calculates the generators of the automorphism group of a graph using the BLISS isomorphism algorithm.
average_path_length
([unconn, weights])Calculates the average path length in a graph.
betweenness
([directed, cutoff, weights, ...])Calculates or estimates the betweenness of vertices in a graph.
bfs
([mode])Conducts a breadth first search (BFS) on the graph.
bfsiter
([mode, advanced])Constructs a breadth first search (BFS) iterator of the graph.
bibcoupling
()Calculates bibliographic coupling scores for given vertices in a graph.
biconnected_components
([...])Calculates the biconnected components of the graph.
bipartite_projection
([types, multiplicity, ...])Projects a bipartite graph into two one-mode graphs.
bipartite_projection_size
([types])Calculates the number of vertices and edges in the bipartite projections of this graph according to the specified vertex types.
blocks
([return_articulation_points])Calculates the biconnected components of the graph.
bridges
()Returns the list of bridges in the graph.
build_graph
(adj_mat)build sparse diffusion graph.
canonical_permutation
([color])Calculates the canonical permutation of a graph using the BLISS isomorphism algorithm.
chordal_completion
([alpham1])Returns the list of edges needed to be added to the graph to make it chordal.
clear
()Clears the graph, deleting all vertices, edges, and attributes.
clique_number
()Returns the clique number of the graph.
cliques
([max])Returns some or all cliques of the graph as a list of tuples.
closeness
([mode, cutoff, weights, normalized])Calculates the closeness centralities of given vertices in a graph.
clusters
([mode])Deprecated alias to L{Graph.connected_components()}.
cocitation
()Calculates cocitation scores for given vertices in a graph.
cohesion
([target, checks, neighbors])Calculates the vertex connectivity of the graph or between some vertices.
cohesive_blocks
()Calculates the cohesive block structure of the graph.
community_edge_betweenness
([clusters, ...])Community structure based on the betweenness of the edges in the network.
community_fastgreedy
([weights])Community structure based on the greedy optimization of modularity.
community_infomap
([edge_weights, ...])Finds the community structure of the network according to the Infomap method of Martin Rosvall and Carl T.
community_label_propagation
([weights, ...])Finds the community structure of the graph according to the label propagation method of Raghavan et al.
community_leading_eigenvector
([clusters, ...])Newman's leading eigenvector method for detecting community structure.
community_leiden
([objective_function, ...])Finds the community structure of the graph using the Leiden algorithm of Traag, van Eck & Waltman.
community_multilevel
([weights, ...])Community structure based on the multilevel algorithm of Blondel et al.
community_optimal_modularity
(*args, **kwds)Calculates the optimal modularity score of the graph and the corresponding community structure.
community_spinglass
(*args, **kwds)Finds the community structure of the graph according to the spinglass community detection method of Reichardt & Bornholdt.
community_walktrap
([weights, steps])Community detection algorithm of Latapy & Pons, based on random walks.
complementer
()Returns the complementer of the graph
components
([mode])Calculates the (strong or weak) connected components for a given graph.
compose
()Returns the composition of two graphs.
connected_components
([mode])Calculates the (strong or weak) connected components for a given graph.
constraint
([weights])Calculates Burt's constraint scores for given vertices in a graph.
contract_vertices
([combine_attrs])Contracts some vertices in the graph, i.e. replaces groups of vertices with single vertices.
convergence_degree
()Undocumented (yet).
convergence_field_size
()Undocumented (yet).
convert_to_class
(obj)copy
()Creates a copy of the graph.
coreness
()Finds the coreness (shell index) of the vertices of the network.
count_automorphisms
([color])Calculates the number of automorphisms of a graph using the BLISS isomorphism algorithm.
count_automorphisms_vf2
([color, edge_color, ...])Returns the number of automorphisms of the graph.
count_isomorphisms_vf2
([color1, color2, ...])Determines the number of isomorphisms between the graph and another one
count_multiple
()Counts the multiplicities of the given edges.
count_subisomorphisms_vf2
([color1, color2, ...])Determines the number of subisomorphisms between the graph and another one
cut_vertices
()Returns the list of articulation points in the graph.
decompose
([maxcompno, minelements])Decomposes the graph into subgraphs.
degree
([mode, loops])Returns some vertex degrees from the graph.
degree_distribution
([bin_width])Calculates the degree distribution of the graph.
delete_edges
(*args, **kwds)Deletes some edges from the graph.
delete_vertices
()Deletes vertices and all its edges from the graph.
density
()Calculates the density of the graph.
dfs
(vid[, mode])Conducts a depth first search (DFS) on the graph.
dfsiter
([mode, advanced])Constructs a depth first search (DFS) iterator of the graph.
diameter
([unconn, weights])Calculates the diameter of the graph.
difference
()Subtracts the given graph from the original
disjoint_union
(other)Creates the disjoint union of two (or more) graphs.
distances
([target, weights, mode, algorithm])Calculates shortest path lengths for given vertices in a graph.
diversity
([weights])Calculates the structural diversity index of the vertices.
dominator
([mode])Returns the dominator tree from the given root node
dyad_census
(*args, **kwds)Calculates the dyad census of the graph.
eccentricity
([mode, weights])Calculates the eccentricities of given vertices in a graph.
ecount
()Counts the number of edges.
edge_attributes
()@return: the attribute name list of the edges of the graph
edge_betweenness
([cutoff, weights, sources, ...])Calculates or estimates the edge betweennesses in a graph.
edge_connectivity
([target, checks])Calculates the edge connectivity of the graph or between some vertices.
edge_disjoint_paths
([target, checks])Calculates the edge connectivity of the graph or between some vertices.
eigen_adjacency
([which, arpack_options])eigenvector_centrality
([scale, weights, ...])Calculates the eigenvector centralities of the vertices in a graph.
evcent
([scale, weights, return_eigenvalue, ...])Calculates the eigenvector centralities of the vertices in a graph.
farthest_points
([unconn, weights])Returns two vertex IDs whose distance equals the actual diameter of the graph.
feedback_arc_set
([method])Calculates an approximately or exactly minimal feedback arc set.
feedback_vertex_set
([method])Calculates a minimum feedback vertex set.
from_graph_tool
(g)Converts the graph from graph-tool
from_networkx
([vertex_attr_hashable])Converts the graph from networkx
fundamental_cycles
([cutoff])Finds a single fundamental cycle basis of the graph
get_adjacency
([type, attribute, default, eids])Returns the adjacency matrix of a graph.
get_adjacency_sparse
([attribute])Returns the adjacency matrix of a graph as a SciPy CSR matrix.
get_adjlist
([mode])Returns the adjacency list representation of the graph.
get_all_shortest_paths
([to, weights, mode])Calculates all of the shortest paths from/to a given node in a graph.
get_all_simple_paths
(v[, to, cutoff, mode])Calculates all the simple paths from a given node to some other nodes (or all of them) in a graph.
get_automorphisms_vf2
([color, edge_color, ...])Returns all the automorphisms of the graph
get_biadjacency
([types])Returns the bipartite adjacency matrix of a bipartite graph.
get_diameter
([unconn, weights])Returns a path with the actual diameter of the graph.
get_edge_dataframe
()Export edges with attributes to pandas.DataFrame
get_edgelist
()Returns the edge list of a graph.
get_eid
(v2[, directed, error])Returns the edge ID of an arbitrary edge between vertices v1 and v2
get_eids
([directed, error])Returns the edge IDs of some edges between some vertices.
get_incidence
(*args, **kwds)Deprecated alias to L{Graph.get_biadjacency()}.
get_inclist
([mode])Returns the incidence list representation of the graph.
get_isomorphisms_vf2
([color1, color2, ...])Returns all isomorphisms between the graph and another one
get_k_shortest_paths
(to[, k, weights, mode, ...])Calculates the k shortest paths from/to a given node in a graph.
get_shortest_path
(to[, weights, mode, ...])Calculates the shortest path from a source vertex to a target vertex in a graph.
get_shortest_path_astar
(to, heuristics[, ...])Calculates the shortest path from a source vertex to a target vertex in a graph using the A-Star algorithm and a heuristic function.
get_shortest_paths
([to, weights, mode, ...])Calculates the shortest paths from/to a given node in a graph.
get_subisomorphisms_lad
([domains, induced, ...])Returns all subisomorphisms between the graph and another one using the LAD algorithm.
get_subisomorphisms_vf2
([color1, color2, ...])Returns all subisomorphisms between the graph and another one
get_vertex_dataframe
()Export vertices with attributes to pandas.DataFrame
girth
()Returns the girth of the graph.
gomory_hu_tree
([capacity, flow])Calculates the Gomory-Hu tree of an undirected graph with optional edge capacities.
harmonic_centrality
([mode, cutoff, weights, ...])Calculates the harmonic centralities of given vertices in a graph.
has_multiple
()Checks whether the graph has multiple edges.
hub_score
([scale, arpack_options, ...])Calculates Kleinberg's hub score for the vertices of the graph
incident
([mode])Returns the edges a given vertex is incident on.
indegree
(*args, **kwds)Returns the in-degrees in a list.
independence_number
()Returns the independence number of the graph.
independent_vertex_sets
([max])Returns some or all independent vertex sets of the graph as a list of tuples.
induced_subgraph
([implementation])Returns a subgraph spanned by the given vertices.
intersection
(other[, byname])Creates the intersection of two (or more) graphs.
is_acyclic
()Returns whether the graph is acyclic (i.e.
is_biconnected
()Decides whether the graph is biconnected.
is_bipartite
()Decides whether the graph is bipartite or not.
is_chordal
([alpham1])Returns whether the graph is chordal or not.
is_clique
([directed])Decides whether a set of vertices is a clique, i.e. a fully connected subgraph.
is_complete
()Checks whether the graph is complete, i.e. whether there is at least one connection between all distinct pairs of vertices.
is_connected
()Decides whether the graph is connected.
is_dag
()Checks whether the graph is a DAG (directed acyclic graph).
is_directed
()Checks whether the graph is directed.
is_independent_vertex_set
()Decides whether no two vertices within a set are adjacent.
is_loop
()Checks whether a specific set of edges contain loop edges
is_minimal_separator
()Decides whether the given vertex set is a minimal separator.
is_multiple
()Checks whether an edge is a multiple edge.
is_mutual
([loops])Checks whether an edge has an opposite pair.
is_named
()Returns whether the graph is named.
is_separator
()Decides whether the removal of the given vertices disconnects the graph.
is_simple
()Checks whether the graph is simple (no loop or multiple edges).
is_tree
()Checks whether the graph is a (directed or undirected) tree graph.
is_weighted
()Returns whether the graph is weighted.
isoclass
()Returns the isomorphism class of the graph or its subgraph.
isomorphic
()Checks whether the graph is isomorphic to another graph.
isomorphic_bliss
([return_mapping_12, ...])Checks whether the graph is isomorphic to another graph, using the BLISS isomorphism algorithm.
isomorphic_vf2
([color1, color2, ...])Checks whether the graph is isomorphic to another graph, using the VF2 isomorphism algorithm.
k_core
(*args)Returns some k-cores of the graph.
knn
([weights])Calculates the average degree of the neighbors for each vertex, and the same quantity as the function of vertex degree.
laplacian
([normalized, mode])Returns the Laplacian matrix of a graph.
largest_cliques
()Returns the largest cliques of the graph as a list of tuples.
largest_independent_vertex_sets
()Returns the largest independent vertex sets of the graph as a list of tuples.
layout
([layout])Returns the layout of the graph according to a layout algorithm.
layout_auto
(*args, **kwds)Chooses and runs a suitable layout function based on simple topological properties of the graph.
layout_bipartite
(**kwds)Place the vertices of a bipartite graph in two layers.
layout_circle
(**kwds)Places the vertices of the graph uniformly on a circle or a sphere.
layout_davidson_harel
(**kwds)Places the vertices on a 2D plane according to the Davidson-Harel layout algorithm.
layout_drl
(**kwds)Places the vertices on a 2D plane or in the 3D space ccording to the DrL layout algorithm.
layout_fruchterman_reingold
(**kwds)Places the vertices on a 2D plane according to the Fruchterman-Reingold algorithm.
layout_fruchterman_reingold_3d
(**kwds)Alias for L{layout_fruchterman_reingold()} with dim=3.
layout_graphopt
(**kwds)This is a port of the graphopt layout algorithm by Michael Schmuhl.
layout_grid
(**kwds)Places the vertices of a graph in a 2D or 3D grid.
layout_grid_3d
(**kwds)Alias for L{layout_grid()} with dim=3.
layout_kamada_kawai
(**kwds)Places the vertices on a plane according to the Kamada-Kawai algorithm.
layout_kamada_kawai_3d
(**kwds)Alias for L{layout_kamada_kawai()} with dim=3.
layout_lgl
(**kwds)Places the vertices on a 2D plane according to the Large Graph Layout.
layout_mds
(**kwds)Places the vertices in an Euclidean space with the given number of dimensions using multidimensional scaling.
layout_random
(**kwds)Places the vertices of the graph randomly.
layout_random_3d
(**kwds)Alias for L{layout_random()} with dim=3.
layout_reingold_tilford
(**kwds)Places the vertices on a 2D plane according to the Reingold-Tilford layout algorithm.
layout_reingold_tilford_circular
(**kwds)Circular Reingold-Tilford layout for trees.
layout_sphere
(**kwds)Alias for L{layout_circle()} with dim=3.
layout_star
(**kwds)Calculates a star-like layout for the graph.
layout_sugiyama
([layers, weights, hgap, ...])Places the vertices using a layered Sugiyama layout.
layout_umap
(**kwds)Uniform Manifold Approximation and Projection (UMAP).
linegraph
()Returns the line graph of the graph.
list_triangles
()Lists the triangles of the graph
maxdegree
([mode, loops])Returns the maximum degree of a vertex set in the graph.
maxflow
(source, target[, capacity])Returns a maximum flow between the given source and target vertices in a graph.
maxflow_value
(target[, capacity])Returns the value of the maximum flow between the source and target vertices.
maximal_cliques
([max, file])Returns the maximal cliques of the graph as a list of tuples.
maximal_independent_vertex_sets
()Returns the maximal independent vertex sets of the graph as a list of tuples.
maximum_bipartite_matching
([types, weights, eps])Finds a maximum matching in a bipartite graph.
maximum_cardinality_search
()Conducts a maximum cardinality search on the graph.
mean_degree
()Calculates the mean degree of the graph.
mincut
([source, target, capacity])Calculates the minimum cut between the given source and target vertices or within the whole graph.
mincut_value
([target, capacity])Returns the minimum cut between the source and target vertices or within the whole graph.
minimum_cycle_basis
([complete, use_cycle_order])Computes a minimum cycle basis of the graph
minimum_size_separators
()Returns a list containing all separator vertex sets of minimum size.
modularity
(membership[, weights, ...])Calculates the modularity score of the graph with respect to a given clustering.
modularity_matrix
([resolution, directed])Calculates the modularity matrix of the graph.
motifs_randesu
([cut_prob, callback])Counts the number of motifs in the graph
motifs_randesu_estimate
([cut_prob, sample])Counts the total number of motifs in the graph
motifs_randesu_no
([cut_prob])Counts the total number of motifs in the graph
multimaxflow
(sources, sinks)Multi-source multi-sink maximum flow.
neighborhood
([order, mode, mindist])For each vertex specified by I{vertices}, returns the vertices reachable from that vertex in at most I{order} steps.
neighborhood_size
([order, mode, mindist])For each vertex specified by I{vertices}, returns the number of vertices reachable from that vertex in at most I{order} steps.
neighbors
([mode])Returns adjacent vertices to a given vertex.
omega
()Returns the clique number of the graph.
outdegree
(*args, **kwds)Returns the out-degrees in a list.
pagerank
([vertices, directed, damping, ...])Calculates the PageRank values of a graph.
path_length_hist
([directed])Returns the path length histogram of the graph
permute_vertices
()Permutes the vertices of the graph according to the given permutation and returns the new graph.
personalized_pagerank
([directed, damping, ...])Calculates the personalized PageRank values of a graph.
predecessors
()Returns the predecessors of a given vertex.
radius
([weights])Calculates the radius of the graph.
random_walk
(steps[, mode, stuck, weights, ...])Performs a random walk of a given length from a given node.
reciprocity
([mode])Reciprocity defines the proportion of mutual connections in a directed graph.
reverse_edges
()Reverses the direction of some edges in the graph.
rewire
([mode])Randomly rewires the graph while preserving the degree distribution.
rewire_edges
([loops, multiple])Rewires the edges of a graph with constant probability.
save
(f[, format])Unified writing function for graphs.
shell_index
()Finds the coreness (shell index) of the vertices of the network.
shortest_paths
(*args, **kwds)Deprecated alias to L{Graph.distances()}.
shortest_paths_dijkstra
(*args, **kwds)Deprecated alias to L{Graph.distances()}.
similarity_dice
([pairs, mode, loops])Dice similarity coefficient of vertices.
similarity_inverse_log_weighted
([mode])Inverse log-weighted similarity coefficient of vertices.
similarity_jaccard
([pairs, mode, loops])Jaccard similarity coefficient of vertices.
simplify
([loops, combine_edges])Simplifies a graph by removing self-loops and/or multiple edges.
spanning_tree
([weights, return_tree])Calculates a minimum spanning tree for a graph.
st_mincut
(source, target[, capacity])Calculates the minimum cut between the source and target vertices in a graph.
strength
([mode, loops, weights])Returns the strength (weighted degree) of some vertices from the graph
subcomponent
([mode])Determines the indices of vertices which are in the same component as a given vertex.
subgraph
([implementation])Returns a subgraph spanned by the given vertices.
subgraph_edges
([delete_vertices])Returns a subgraph spanned by the given edges.
subisomorphic_lad
([domains, induced, ...])Checks whether a subgraph of the graph is isomorphic to another graph.
subisomorphic_vf2
([color1, color2, ...])Checks whether a subgraph of the graph is isomorphic to another graph.
successors
()Returns the successors of a given vertex.
summary
([verbosity, width])Returns the summary of the graph.
to_dict_dict
([use_vids, edge_attrs, ...])Export graph to dictionary of dicts of edge attributes
to_dict_list
([use_vids, skip_none, ...])Export graph as two lists of dictionaries, for vertices and edges.
to_directed
()Converts an undirected graph to directed.
to_graph_tool
([graph_attributes, ...])Converts the graph to graph-tool
to_list_dict
([use_vids, ...])Export graph to a dictionary of lists (or other sequences).
to_networkx
([create_using, vertex_attr_hashable])Converts the graph to networkx format.
to_prufer
()Converts a tree graph into a Prüfer sequence.
to_tuple_list
([use_vids, edge_attrs, ...])Export graph to a list of edge tuples
to_undirected
([combine_edges])Converts a directed graph to undirected.
topological_sorting
()Calculates a possible topological sorting of the graph.
transitivity_avglocal_undirected
([mode, weights])Calculates the average of the vertex transitivities of the graph.
transitivity_local_undirected
([mode, weights])Calculates the local transitivity (clustering coefficient) of the given vertices in the graph.
transitivity_undirected
()Calculates the global transitivity (clustering coefficient) of the graph.
triad_census
(*args, **kwds)Calculates the triad census of the graph.
unfold_tree
([mode])Unfolds the graph using a BFS to a tree by duplicating vertices as necessary.
union
(other[, byname])Creates the union of two (or more) graphs.
vcount
()Counts the number of vertices.
vertex_attributes
()@return: the attribute name list of the vertices of the graph
vertex_coloring_greedy
()Calculates a greedy vertex coloring for the graph based on some heuristics.
vertex_connectivity
([target, checks, neighbors])Calculates the vertex connectivity of the graph or between some vertices.
vertex_disjoint_paths
([target, checks, ...])Calculates the vertex connectivity of the graph or between some vertices.
write
(f[, format])Unified writing function for graphs.
write_adjacency
(f[, sep, eol])Writes the adjacency matrix of the graph to the given file
write_dimacs
(f[, source, target, capacity])Writes the graph in DIMACS format to the given file.
write_dot
()Writes the graph in DOT format to the given file.
write_edgelist
()Writes the edge list of a graph to a file.
write_gml
([creator, ids])Writes the graph in GML format to the given file.
write_graphml
([prefixattr])Writes the graph to a GraphML file.
write_graphmlz
(f[, compresslevel])Writes the graph to a zipped GraphML file.
write_leda
([names, weights])Writes the graph to a file in LEDA native format.
write_lgl
([names, weights, isolates])Writes the edge list of a graph to a file in .lgl format.
write_ncol
([names, weights])Writes the edge list of a graph to a file in .ncol format.
write_pajek
()Writes the graph in Pajek format to the given file.
write_pickle
([fname, version])Saves the graph in Python pickled format
write_picklez
([fname, version])Saves the graph in Python pickled format, compressed with gzip.
write_svg
(fname[, layout, width, height, ...])Saves the graph as an SVG (Scalable Vector Graphics) file
Attributes
es
The edge sequence of the graph
vs
The vertex sequence of the graph