Expand description
§rust-igraph
Pure-Rust, high-performance graph and network analysis library.
A faithful port of igraph with 1,297 public APIs,
zero unsafe, and no C/C++ FFI. Built for researchers, data scientists,
and systems engineers who need production-grade graph algorithms in the
Rust ecosystem.
§Feature overview
| Category | Highlights |
|---|---|
| Traversal | BFS, DFS, topological sort, random walks |
| Shortest paths | Dijkstra, Bellman-Ford, A*, Johnson, all-pairs, widest paths |
| Centrality | betweenness, closeness, eigenvector, PageRank, HITS, Katz |
| Community | Louvain, Leiden, Infomap, Spinglass, label propagation, Walktrap, fast greedy |
| Connectivity | components, articulation points, bridges, separators, percolation |
| Flow | max-flow, min-cut, Gomory-Hu tree, disjoint paths |
| Isomorphism | VF2, LAD, BLISS canonical labeling, isoclass |
| Generators | Erdos-Renyi, Barabasi-Albert, SBM, lattices, 40+ more |
| Properties | 60+ structural recognizers, degree stats, transitivity, graphlets |
| Eigenvalues | Lanczos (symmetric), Arnoldi (general), adjacency |
| Layout | Fruchterman-Reingold, Kamada-Kawai, DrL, MDS, LGL, circle, tree |
| I/O | GML, GraphML, Pajek, DOT, LEDA, DL, DIMACS, NCOL, LGL |
| Similarity | Jaccard, Dice, inverse-log-weighted |
§Quick start
use rust_igraph::{Graph, bfs};
let mut g = Graph::with_vertices(4);
g.add_edge(0, 1).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(1, 3).unwrap();
let order = bfs(&g, 0).unwrap();
assert_eq!(order, vec![0, 1, 2, 3]);Or with the fluent builder:
use rust_igraph::GraphBuilder;
let g = GraphBuilder::undirected()
.edges(&[(0, 1), (1, 2), (2, 3), (3, 0)])
.build()
.unwrap();
assert_eq!(g.vcount(), 4);Methods are available directly on Graph for the most common operations:
use rust_igraph::Graph;
let g = Graph::from_edges(&[(0,1), (1,2), (2,0)], false, None).unwrap();
assert!(g.is_connected().unwrap());
assert!(g.is_simple().unwrap());
let pr = g.pagerank().unwrap();
assert_eq!(pr.len(), 3);Random graph generators are one method call away:
use rust_igraph::Graph;
let er = Graph::erdos_renyi(1000, 0.01, 42).unwrap();
let ba = Graph::barabasi_albert(1000, 3, 42).unwrap();
let ws = Graph::watts_strogatz(1000, 6, 0.1, 42).unwrap();
assert_eq!(er.vcount(), 1000);
assert_eq!(ba.vcount(), 1000);
assert_eq!(ws.vcount(), 1000);§Complete workflow
A typical analysis pipeline — load, explore, analyze, in just a few lines:
use rust_igraph::Graph;
// Build a small network
let g = Graph::from_edges(
&[(0,1),(1,2),(2,3),(3,4),(4,0),(0,2),(2,4)],
false, None
).unwrap();
// Structural overview
assert!(g.is_connected().unwrap());
assert!(g.is_simple().unwrap());
let apl = g.average_path_length().unwrap().unwrap();
assert!(apl < 2.0);
// Centrality
let pr = g.pagerank().unwrap();
let bc = g.betweenness().unwrap();
// Community structure
let communities = g.louvain().unwrap();
assert!(communities.modularity >= 0.0);
// Single-pair shortest path
let path = g.shortest_path_to(0, 3, None).unwrap();
assert!(!path.vertices.is_empty());
// Random walk
let (walk, _edges) = g.random_walk(0, 20, 42).unwrap();
assert_eq!(walk[0], 0);§Import style
All algorithms are also re-exported as free functions at the crate root:
use rust_igraph::{Graph, pagerank, betweenness, louvain};For minimal imports, use the prelude module:
use rust_igraph::prelude::*;§License
GPL-2.0-or-later, matching upstream igraph.
Re-exports§
pub use crate::algorithms::chordality::ChordalResult;pub use crate::algorithms::chordality::McsResult;pub use crate::algorithms::chordality::is_chordal;pub use crate::algorithms::chordality::maximum_cardinality_search;pub use crate::algorithms::cliques::clique_number;pub use crate::algorithms::cliques::clique_size_hist;pub use crate::algorithms::cliques::cliques;pub use crate::algorithms::cliques::independence_number;pub use crate::algorithms::cliques::independent_vertex_sets;pub use crate::algorithms::cliques::largest_cliques;pub use crate::algorithms::cliques::largest_independent_vertex_sets;pub use crate::algorithms::cliques::largest_weighted_cliques;pub use crate::algorithms::cliques::maximal_cliques;pub use crate::algorithms::cliques::maximal_cliques_count;pub use crate::algorithms::cliques::maximal_cliques_hist;pub use crate::algorithms::cliques::maximal_cliques_subset;pub use crate::algorithms::cliques::maximal_independent_vertex_sets;pub use crate::algorithms::cliques::weighted_clique_number;pub use crate::algorithms::cliques::weighted_cliques;pub use crate::algorithms::coloring::BipartiteColoringResult;pub use crate::algorithms::coloring::BipartiteEdgeDirection;pub use crate::algorithms::coloring::GreedyColoringHeuristic;pub use crate::algorithms::coloring::chromatic_number_upper_bound;pub use crate::algorithms::coloring::edge_chromatic_number;pub use crate::algorithms::coloring::edge_coloring_greedy;pub use crate::algorithms::coloring::is_bipartite_coloring;pub use crate::algorithms::coloring::is_edge_coloring;pub use crate::algorithms::coloring::is_vertex_coloring;pub use crate::algorithms::coloring::vertex_chromatic_number;pub use crate::algorithms::coloring::vertex_coloring_greedy;pub use crate::algorithms::constructors::adjacency::AdjacencyMode;pub use crate::algorithms::constructors::adjacency::LoopsMode;pub use crate::algorithms::constructors::adjacency::adjacency;pub use crate::algorithms::constructors::atlas::ATLAS_SIZE;pub use crate::algorithms::constructors::atlas::atlas;pub use crate::algorithms::constructors::biadjacency::BiadjacencyResult;pub use crate::algorithms::constructors::biadjacency::biadjacency;pub use crate::algorithms::constructors::circulant::circulant;pub use crate::algorithms::constructors::create::create;pub use crate::algorithms::constructors::create_bipartite::create_bipartite;pub use crate::algorithms::constructors::de_bruijn::de_bruijn;pub use crate::algorithms::constructors::extended_chordal_ring::extended_chordal_ring;pub use crate::algorithms::constructors::famous::famous;pub use crate::algorithms::constructors::famous::famous_names;pub use crate::algorithms::constructors::full::full_graph;pub use crate::algorithms::constructors::full_bipartite::FullBipartite;pub use crate::algorithms::constructors::full_bipartite::full_bipartite;pub use crate::algorithms::constructors::full_citation::full_citation;pub use crate::algorithms::constructors::full_multipartite::FullMultipartite;pub use crate::algorithms::constructors::full_multipartite::MultipartiteMode;pub use crate::algorithms::constructors::full_multipartite::full_multipartite;pub use crate::algorithms::constructors::generalized_petersen::generalized_petersen;pub use crate::algorithms::constructors::hamming::hamming;pub use crate::algorithms::constructors::hexagonal_lattice::hexagonal_lattice;pub use crate::algorithms::constructors::hypercube::MAX_HYPERCUBE_DIMENSION;pub use crate::algorithms::constructors::hypercube::hypercube;pub use crate::algorithms::constructors::kary_tree::TreeMode;pub use crate::algorithms::constructors::kary_tree::kary_tree;pub use crate::algorithms::constructors::kautz::kautz;pub use crate::algorithms::constructors::lcf::lcf;pub use crate::algorithms::constructors::linegraph::linegraph;pub use crate::algorithms::constructors::mycielskian::mycielski_graph;pub use crate::algorithms::constructors::mycielskian::mycielskian;pub use crate::algorithms::constructors::prufer::from_prufer;pub use crate::algorithms::constructors::prufer::to_prufer;pub use crate::algorithms::constructors::realize_bipartite_degree_sequence::realize_bipartite_degree_sequence;pub use crate::algorithms::constructors::realize_degree_sequence::RealizeDegseqMethod;pub use crate::algorithms::constructors::realize_degree_sequence::realize_degree_sequence;pub use crate::algorithms::constructors::realize_directed_degree_sequence::realize_directed_degree_sequence;pub use crate::algorithms::constructors::regular_tree::regular_tree;pub use crate::algorithms::constructors::ring::cycle_graph;pub use crate::algorithms::constructors::ring::path_graph;pub use crate::algorithms::constructors::ring::ring_graph;pub use crate::algorithms::constructors::square_lattice::square_lattice;pub use crate::algorithms::constructors::star::StarMode;pub use crate::algorithms::constructors::star::star_graph;pub use crate::algorithms::constructors::symmetric_tree::symmetric_tree;pub use crate::algorithms::constructors::tree_from_parent_vector::tree_from_parent_vector;pub use crate::algorithms::constructors::triangular_lattice::triangular_lattice;pub use crate::algorithms::constructors::turan::turan;pub use crate::algorithms::constructors::weighted_adjacency::weighted_adjacency;pub use crate::algorithms::constructors::weighted_biadjacency::WeightedBiadjacencyResult;pub use crate::algorithms::constructors::weighted_biadjacency::weighted_biadjacency;pub use crate::algorithms::constructors::wheel::WheelMode;pub use crate::algorithms::constructors::wheel::wheel_graph;pub use crate::algorithms::cycles::CycleMode;pub use crate::algorithms::cycles::CycleResult;pub use crate::algorithms::cycles::find_cycle;pub use crate::algorithms::dominating_set::is_dominating_set;pub use crate::algorithms::dominating_set::minimum_dominating_set;pub use crate::algorithms::edge_cover::is_edge_cover;pub use crate::algorithms::edge_cover::minimum_edge_cover;pub use crate::algorithms::embedding::adjacency_spectral_embedding::AdjacencySpectralEmbeddingResult;pub use crate::algorithms::embedding::adjacency_spectral_embedding::SpectralWhich;pub use crate::algorithms::embedding::adjacency_spectral_embedding::adjacency_spectral_embedding;pub use crate::algorithms::embedding::dim_select::dim_select;pub use crate::algorithms::embedding::laplacian_spectral_embedding::LaplacianSpectralEmbeddingResult;pub use crate::algorithms::embedding::laplacian_spectral_embedding::LaplacianType;pub use crate::algorithms::embedding::laplacian_spectral_embedding::laplacian_spectral_embedding;pub use crate::algorithms::epidemics::Sir;pub use crate::algorithms::epidemics::sir;pub use crate::algorithms::feedback_arc_set::FasAlgorithm;pub use crate::algorithms::feedback_arc_set::feedback_arc_set;pub use crate::algorithms::feedback_vertex_set::FvsAlgorithm;pub use crate::algorithms::feedback_vertex_set::feedback_vertex_set;pub use crate::algorithms::fundamental_cycles::fundamental_cycles;pub use crate::algorithms::games::barabasi::barabasi_game_bag;pub use crate::algorithms::games::barabasi_aging::barabasi_aging_game;pub use crate::algorithms::games::barabasi_psumtree::barabasi_game_psumtree;pub use crate::algorithms::games::barabasi_psumtree::barabasi_game_psumtree_multiple;pub use crate::algorithms::games::bipartite::BipartiteGraph;pub use crate::algorithms::games::bipartite::BipartiteMode;pub use crate::algorithms::games::bipartite::bipartite_game_gnm;pub use crate::algorithms::games::bipartite::bipartite_game_gnp;pub use crate::algorithms::games::bipartite::bipartite_iea_game;pub use crate::algorithms::games::callaway_traits::callaway_traits_game;pub use crate::algorithms::games::chung_lu::ChungLuVariant;pub use crate::algorithms::games::chung_lu::chung_lu_game;pub use crate::algorithms::games::cited_type::cited_type_game;pub use crate::algorithms::games::citing_cited_type::citing_cited_type_game;pub use crate::algorithms::games::degree_sequence::degree_sequence_game_configuration;pub use crate::algorithms::games::degree_sequence_configuration_simple::degree_sequence_game_configuration_simple;pub use crate::algorithms::games::degree_sequence_fast_heur::degree_sequence_game_fast_heur_simple;pub use crate::algorithms::games::degree_sequence_vl::degree_sequence_game_vl;pub use crate::algorithms::games::dotproduct::DotProductWarnings;pub use crate::algorithms::games::dotproduct::dot_product_game;pub use crate::algorithms::games::dotproduct::dot_product_game_with_warnings;pub use crate::algorithms::games::edge_sampling::EdgeSplit;pub use crate::algorithms::games::edge_sampling::sample_edges;pub use crate::algorithms::games::edge_sampling::split_edges;pub use crate::algorithms::games::edge_sampling::split_edges_connected;pub use crate::algorithms::games::edge_switching_simple::degree_sequence_game_edge_switching_simple;pub use crate::algorithms::games::erdos_renyi::erdos_renyi_gnm;pub use crate::algorithms::games::erdos_renyi::erdos_renyi_gnp;pub use crate::algorithms::games::establishment::establishment_game;pub use crate::algorithms::games::forestfire::forest_fire_game;pub use crate::algorithms::games::grg::grg_game;pub use crate::algorithms::games::grg::grg_game_with_coords;pub use crate::algorithms::games::growing_random::growing_random_game;pub use crate::algorithms::games::hsbm::hsbm_game;pub use crate::algorithms::games::hsbm::hsbm_list_game;pub use crate::algorithms::games::iea_game::iea_game;pub use crate::algorithms::games::islands::simple_interconnected_islands_game;pub use crate::algorithms::games::k_regular::k_regular_game;pub use crate::algorithms::games::lastcit::lastcit_game;pub use crate::algorithms::games::negative_sampling::sample_negative_edges;pub use crate::algorithms::games::negative_sampling::sample_negative_edges_degree_biased;pub use crate::algorithms::games::negative_sampling::sample_negative_edges_excluding;pub use crate::algorithms::games::preference::asymmetric_preference_game;pub use crate::algorithms::games::preference::preference_game;pub use crate::algorithms::games::recent_degree::recent_degree_game;pub use crate::algorithms::games::recent_degree_aging::recent_degree_aging_game;pub use crate::algorithms::games::sbm::sbm_game;pub use crate::algorithms::games::static_fitness::static_fitness_game;pub use crate::algorithms::games::static_fitness::static_power_law_game;pub use crate::algorithms::games::tree::tree_game_lerw;pub use crate::algorithms::games::tree::tree_game_prufer;pub use crate::algorithms::games::watts::watts_strogatz_game;pub use crate::algorithms::graphlets::GraphletBasis;pub use crate::algorithms::graphlets::GraphletDecomposition;pub use crate::algorithms::graphlets::graphlets;pub use crate::algorithms::graphlets::graphlets_candidate_basis;pub use crate::algorithms::graphlets::graphlets_project;pub use crate::algorithms::hrg::HrgDendrogram;pub use crate::algorithms::hrg::HrgTree;pub use crate::algorithms::hrg::from_hrg_dendrogram;pub use crate::algorithms::hrg::hrg_consensus;pub use crate::algorithms::hrg::hrg_create;pub use crate::algorithms::hrg::hrg_fit;pub use crate::algorithms::hrg::hrg_game;pub use crate::algorithms::hrg::hrg_predict;pub use crate::algorithms::hrg::hrg_sample;pub use crate::algorithms::hrg::hrg_sample_many;pub use crate::algorithms::independent_set::maximum_independent_set;pub use crate::algorithms::matching::MatchingResult;pub use crate::algorithms::matching::is_matching;pub use crate::algorithms::matching::is_maximal_matching;pub use crate::algorithms::matching::maximum_bipartite_matching;pub use crate::algorithms::matching::maximum_bipartite_matching_weighted;pub use crate::algorithms::matching_lsap::solve_lsap;pub use crate::algorithms::max_cut::MaxCutResult;pub use crate::algorithms::max_cut::cut_value;pub use crate::algorithms::max_cut::maximum_cut;pub use crate::algorithms::minimum_cycle_basis::minimum_cycle_basis;pub use crate::algorithms::motifs::DyadCensus;pub use crate::algorithms::motifs::TriadCensus;pub use crate::algorithms::motifs::TriadType;pub use crate::algorithms::motifs::dyad_census;pub use crate::algorithms::motifs::graph_count;pub use crate::algorithms::motifs::graph_count;pub use crate::algorithms::motifs::isoclass;pub use crate::algorithms::motifs::isoclass;pub use crate::algorithms::motifs::isoclass_create;pub use crate::algorithms::motifs::isoclass_subgraph;pub use crate::algorithms::motifs::motifs_randesu;pub use crate::algorithms::motifs::motifs_randesu;pub use crate::algorithms::motifs::motifs_randesu_callback;pub use crate::algorithms::motifs::motifs_randesu_estimate;pub use crate::algorithms::motifs::motifs_randesu_no;pub use crate::algorithms::motifs::triad_census;pub use crate::algorithms::motifs::triad_census;pub use crate::algorithms::simple_cycles::SimpleCycle;pub use crate::algorithms::simple_cycles::SimpleCycleMode;pub use crate::algorithms::simple_cycles::simple_cycles;pub use crate::algorithms::vertex_cover::is_vertex_cover;pub use crate::algorithms::vertex_cover::minimum_vertex_cover;
Modules§
- algorithms
- Algorithm implementations for rust-igraph.
- prelude
- Minimal import set for common use cases.
Structs§
- AllShortest
Paths - Result of
get_all_shortest_paths/get_all_shortest_paths_with_mode. - AllShortest
Paths Dijkstra - Result of
get_all_shortest_paths_dijkstra. - Beta
Weighted Gabriel - A Gabriel graph together with the per-edge β-threshold weights.
- BfsSimple
- Result of
bfs_simple. - BfsTree
- Result of a multi-output BFS scan from a single root. Returned by
bfs_tree. - Biconnected
Components - Output of
biconnected_components. - Bipartite
Projection - Result of a bipartite projection.
- Bipartite
Projection Size - Sizes of both bipartite projections.
- Bipartite
Result - Result of bipartiteness check.
- Centralization
Result - Result of a centralization convenience wrapper.
- Closeness
Cutoff Result - Result of
closeness_cutoff. - Cohesive
Blocks - Result of
cohesive_blocks. - Community
ToMembership Result - Result of
community_to_membership: per-vertex cluster ids densified to0..k, plus the size of each cluster in the same order. - Community
Voronoi Result - Result of
community_voronoi. - Connected
Components - Result of a weak connected-components scan.
- Convex
Hull Result - Result of
convex_hull_2d. - DfsSimple
- Result of
dfs_simple. - DfsTree
- Result of a multi-output DFS scan from a single root. Returned by
dfs_tree. - DhParams
- Parameters for the Davidson-Harel layout.
- Dijkstra
AllPaths - Output of
dijkstra_all_shortest_paths. - Dijkstra
Paths - Output of
dijkstra_paths.parents[v]is the predecessor ofvalong the shortest-path tree from the single source (orNonefor the source itself and for unreachable vertices — the caller can disambiguate viadistances[v]).inbound_edges[v]is the edge idvwas reached through;Nonefor the source and unreachable vertices. - Dimacs
Graph - Result of reading a DIMACS file.
- DlGraph
- Result of reading a DL file.
- Dominator
Tree - Result of
dominator_tree. - DotGraph
- Result of parsing a DOT file.
- DrlOptions
- Full DrL options.
- Eccentricity
Classes - Result of
eccentricity_classes. - Edge
Betweenness Result - Result of
edge_betweenness_community. - Edgelist
Percolation - Outputs of
edgelist_percolation. Same length as the input edge slice.giant_size[i]is the size of the largest component after edgeiis added;vertex_count[i]is the number of distinct vertices touched by edges0..=i. - Eigen
Decomposition - Result of an eigenvalue decomposition.
- Eigenvector
Scores - Output of
eigenvector_centrality_full: the normalised centrality vector and the dominant eigenvalue of the (possibly shifted-back) adjacency matrix. - Eulerian
Classification - Whether an Eulerian path or cycle exists in a graph.
- Even
Tarjan Result - Result of the Even-Tarjan reduction.
- Fast
Greedy Result - Result of
fast_greedy_modularity/fast_greedy_modularity_weighted. - Fluid
Options - Full option bag for
fluid_communities_with_options. - Fluid
Result - Result of
fluid_communities/fluid_communities_with_options. - FrBounds
- Optional per-vertex bounding box constraints.
- FrBounds3d
- 3D bounding box constraints.
- FrParams
- Parameters for the 2D Fruchterman-Reingold layout.
- FrParams3d
- Parameters for the 3D Fruchterman-Reingold layout.
- GemParams
- Parameters for the GEM layout algorithm.
- General
Eigen Decomposition - Result of a general eigenvalue decomposition.
- GetBiadjacency
Result - Result of
get_biadjacency_matrix. - GetBiadjacency
Weighted Result - Result of
get_biadjacency_weighted. - Gomory
HuTree - Output of
gomory_hu_tree— a weighted undirected tree on the same vertex set as the input graph, plus one flow value per tree edge. - Graph
- Counterpart of
igraph_t(seereferences/igraph/include/igraph_datatype.h). - Graph
Builder - A fluent builder for constructing
Graphinstances. - Graph
Summary - Result of
graph_summarycontaining precomputed graph statistics. - Graphml
Graph - Result of parsing a
GraphMLfile. - Graphopt
Params - Parameters for the GraphOpt layout.
- Hits
Scores - Output of
hub_and_authority_scores: scaled hub and authority vectors and the dominant eigenvalue ofA·Aᵀ. - Induced
Subgraph Result - Result of an induced subgraph extraction.
- Infomap
Result - Result of an Infomap run.
- KShortest
Path - Result of
k_shortest_paths. - KkBounds
- Per-vertex coordinate bounds for the 2D KK layout.
- KkBounds3d
- Per-vertex coordinate bounds for the 3D KK layout.
- KkParams
- Parameters for the 2D Kamada-Kawai layout.
- KkParams3d
- Parameters for the 3D Kamada-Kawai layout.
- Label
Spread Result - Result of label spreading prediction.
- LadSubisomorphism
- Result of a first-solution LAD subgraph-isomorphism search
(
subisomorphic_lad). - Leading
Eigenvector Result - Result of the leading eigenvector community detection.
- Leda
Graph - Result of reading a LEDA file.
- Leiden
Options - Full set of options for
leiden_with_options. Construct viaLeidenOptions::default()and then mutate the fields you care about, mirroring the way upstream C exposes per-parameter defaults. - Leiden
Result - Result of a Leiden run.
- LglGraph
- Result of reading an LGL file: the graph plus optional metadata.
- LglParams
- Parameters for the LGL layout algorithm.
- Louvain
Result - Result of a Louvain run.
- LpaOptions
- Full option bag for
label_propagation_with_options. - LpaResult
- Result of a label-propagation run.
- MaxFlow
- Output of
max_flow: scalar value, per-edge flow vector, cut edge ids, and source-side / sink-side vertex partitions. - Ncol
Graph - Result of reading an NCOL file: the graph plus optional metadata.
- Neighbor
Sample Result - Result of k-hop neighborhood sampling.
- Neighbors
Iter - Zero-allocation iterator over the neighbors of a vertex.
- Pajek
Graph - Result of reading a Pajek file.
- Path
Length Hist Result - Result of
path_length_hist. - Power
LawFit Result - Result of fitting a power-law distribution to a sample.
- Pseudo
Diameter Result - Result of the pseudo-diameter computation.
- Reachability
Result - Result of a reachability analysis.
- Reindex
Membership Result - Result of
reindex_membership: a densified membership vector[0, k), the old cluster id behind each new id (sonew_to_old[i]is the original id that now maps toi), and the number of distinct clustersk = new_to_old.len(). - Residual
Graph Result - Result of the residual graph computation.
- Shortest
Path - A single shortest path: the vertex sequence (including
fromandto) and the edge sequence along it. For a path ofkvertices the edge vector hask - 1entries. - Shortest
Paths Dijkstra - Result of
get_shortest_paths_dijkstra: vertex and edge paths from a single source to all vertices. - Simplify
AndColorize - The colored simple graph produced by
simplify_and_colorize. - Site
Percolation - Outputs of
site_percolation. Same length asvertex_order.giant_size[i]is the size of the largest connected component after vertexvertex_order[i]is activated;edge_count[i]is the cumulative number of edges added through stepi(an edge is “added” the moment both its endpoints become active). - Spinglass
Options - Options for spinglass community detection.
- Spinglass
Result - Result of spinglass community detection.
- Split
Join Distance - Asymmetric split-join distances between two community partitions.
- StCuts
- Result of
all_st_cuts. - StMin
Cuts - Result of
all_st_mincuts. - StMincut
- Output of
st_mincut: scalar value, cut edge ids, and the source-side / sink-side vertex partitions. - Strongly
Regular Params - Result of strongly regular graph recognition.
- Structural
Features - Per-vertex structural feature vector.
- Subgraph
From Edges Result - Result of a subgraph-from-edges extraction.
- Sugiyama
Params - Parameters for the Sugiyama layout.
- Sugiyama
Result - Result of a Sugiyama layout computation.
- Umap
Params - Parameters for the UMAP layout algorithm.
- Unfold
Tree Result - Result of unfolding a graph into a tree.
- Vf2Isomorphism
- Result of an exact VF2 graph-isomorphism test (
isomorphic_vf2). - Vf2Subisomorphism
- Result of a VF2 subgraph-isomorphism test (
subisomorphic_vf2). - Voronoi
Partition - Result of
voronoi: the Voronoi cell each vertex belongs to plus the distance to its assigned generator. - Walktrap
Options - Tuning knobs for
walktrap_with_options. - Walktrap
Result - Result of
walktrap/walktrap_weighted/walktrap_with_options. - Widest
Paths - Sidecar outputs from a single-source widest-paths run. Carries
the widths vector plus the parent-pointer SPT (vertex-side and
edge-side). Counterpart of the
parentsandinbound_edgesoutputs ofigraph_get_widest_paths. Source itself hasparents[source] == Noneandinbound_edges[source] == None; unreachable vertices also have bothNone. To disambiguate the source from unreachable targets, consultwidths: source hasSome(f64::INFINITY), unreachable hasNone. - WlHash
Result - Result of Weisfeiler-Lehman hashing.
Enums§
- Adjacency
Type - Which triangle of the adjacency matrix to fill (undirected graphs only).
- AggMode
- Aggregation mode for neighborhood operations.
- AllShortest
Paths Mode - Direction mode for
get_all_shortest_pathsandget_all_shortest_paths_with_mode. - Attribute
Value - A single attribute value attached to a graph, vertex, or edge.
- BfsMode
- Direction mode for
bfs_simple. - Cached
Property - The set of boolean graph properties that may be cached.
- Centralization
Mode - Whether centralization considers in-degree, out-degree, or total.
- Community
Comparison - Which partition-comparison measure
compare_communitiesreturns. - Connectedness
Mode - Connectivity mode for directed graphs.
- Coreness
Mode - Direction-handling for
coreness_with_mode. - Degree
Mode - Direction mode for degree computation in directed graphs.
- DfsMode
- Direction mode for
dfs_simple. - Dijkstra
Mode - Direction selector for the mode-aware Dijkstra entry points
(SP-001c). Counterpart of
igraph_neimode_trestricted to the three valuesigraph_distances_dijkstraaccepts. For undirected graphs every variant collapses toDijkstraMode::All(every edge is bidirectional). - Dimacs
Problem - The type of DIMACS problem read from the file.
- Distance
Metric - Distance metric for spatial edge length computation.
- Distances
Cutoff Mode - Direction mode for cutoff-aware unweighted distance functions.
- Distances
From Mode - Direction mode for
distances_from_with_mode. - Distances
Mode - Direction mode for
distances_all_with_mode. - Dominator
Mode - Traversal direction for
dominator_tree. - DrlTemplate
- Predefined parameter templates for DrL.
- EccMode
- Mode for direction-aware eccentricity / radius / diameter on directed
graphs. For undirected graphs every mode reduces to
EccMode::All. - Edge
Type Filter - What kinds of edges are allowed when testing graphicality.
- Eigen
Which - Which eigenvalues to compute.
- Eigenvector
Mode - How to consider edge directions for
eigenvector_centrality_fulland friends. Mirrors upstream’sIGRAPH_OUT/IGRAPH_IN/IGRAPH_ALL. - FrGrid
- Grid acceleration mode for Fruchterman-Reingold layout.
- General
Eigen Which - Which eigenvalues to compute for a general (non-symmetric) matrix.
- Graph
Product Type - Selects which graph product type to compute.
- Igraph
Error - All errors returned from rust-igraph.
- Laplacian
Normalization - Laplacian normalization mode.
- Leiden
Objective - Quality function (objective) that Leiden optimises. Mirrors
igraph_leiden_objective_t. - Loop
Handling - How to count self-loop edges in the adjacency matrix diagonal.
- Loop
Mode - How loops are counted when computing degree centralization.
- LpaVariant
- Which variant of label propagation to run. Mirrors
igraph_lpa_variant_t. - MstAlgorithm
- Selector for the minimum-spanning-tree algorithm.
- Neighborhood
Mode - Direction mode for
neighborhood_size_with_modeon directed graphs. Ignored on undirected graphs — every mode reduces toNeighborhoodMode::All. - Reachability
Mode - Direction mode for reachability in directed graphs.
- Reciprocity
Mode - Reciprocity formula choice. Counterpart of upstream’s
igraph_reciprocity_t(IGRAPH_RECIPROCITY_DEFAULT/IGRAPH_RECIPROCITY_RATIO). - Rewire
Directed Mode - Which endpoint of a directed edge to rewire.
- Root
Choice - Heuristic for selecting tree-layout roots when multiple candidates exist within a component.
- RtMode
- Mode for tree edge traversal direction.
- Shortest
Path Mode - Direction mode for
get_shortest_paths_with_mode. - Simple
Mode - Direction-handling for
is_simple_with_mode. Counterpart of upstream’sdirectedboolean parameter. - Simple
Path Mode - Mode for traversing neighbors in directed graphs.
- Sort
Order - Sort order for vertex degree sorting.
- Spinglass
Update Rule - Update rule for the spinglass null model.
- Strength
Mode - Direction mode for
strength_with_modeon directed graphs. Ignored on undirected graphs. - Subcomponent
Mode - Direction mode for subcomponent search.
- ToDirected
Mode - Mode for converting an undirected graph to directed.
- ToUndirected
Mode - Mode for converting a directed graph to undirected.
- Transitivity
Mode - How to handle vertices with degree < 2 when averaging local transitivity.
- Vconn
Nei - Behaviour when
sourceandtargetare directly adjacent. - Voronoi
Tiebreaker - Tie-breaking rule used when two or more generators reach a vertex at the same distance.
- Walk
Mode - Direction mode for edge-path traversal.
Constants§
- FLUID_
DEFAULT_ MAX_ ITERATIONS - Default safety cap on outer iterations for
fluid_communities/fluid_communities_with_options. - LEIDEN_
DEFAULT_ BETA - Default randomness used in the refinement step — same default as
upstream
igraph_community_leiden_simple(β = 0.01). - LEIDEN_
DEFAULT_ ITERATIONS - Default number of outer iterations. The reference paper and upstream both note that two iterations are usually enough.
- SPINGLASS_
DEFAULT_ SPINS - Default number of spins for spinglass.
- WALKTRAP_
DEFAULT_ STEPS - Default random-walk length matching the igraph reference (
steps = 4).
Functions§
- a_
star_ path - Single-source single-target shortest path using A*.
- abc_
entropy - Compute the ABC entropy.
- abc_
index - Compute the atom-bond connectivity (ABC) index.
- adhesion
- Group adhesion — igraph C alias
igraph_adhesion(flow.c:2433). Exact synonym foredge_connectivity; kept for naming parity with the upstream API and so users following the White-Harary (2001) sociological-network literature have a direct hit. Identical signature and behaviour. - albertson_
coindex - Compute the Albertson coindex.
- albertson_
index - Compute the Albertson index (edge irregularity).
- algebraic_
connectivity - Compute the algebraic connectivity of a graph.
- all_
minimal_ st_ separators - List all vertex sets that are minimal (s,t) separators for some s and t.
- all_
simple_ paths - Enumerate all simple paths from
fromto vertices into. - all_
st_ cuts - List all (s,t) edge cuts of a directed graph (Provan-Shier).
- all_
st_ mincuts - List all minimum (s,t) edge cuts of a directed graph (Provan-Shier).
- are_
adjacent - Check whether two vertices are connected by at least one edge.
- arithmetic_
geometric_ index - Compute the arithmetic-geometric index.
- articulation_
points - Articulation points of
graph(returns vertices in upstream’s DFS-discovery order). - assortativity
- Value-based assortativity coefficient of
graph. - assortativity_
degree - Degree assortativity coefficient of
graph(undirected, unweighted). ReturnsNonefor graphs with no edges or for regular graphs (all vertices same degree — the variance denominator vanishes, matching upstream’sIGRAPH_NAN). - assortativity_
degree_ directed - Directed degree assortativity coefficient (ALGO-PR-006c).
- assortativity_
degree_ directed_ weighted - Directed weighted degree assortativity (PR-006d).
- assortativity_
degree_ weighted - Weighted degree assortativity coefficient.
- assortativity_
nominal - Compute categorical (nominal) assortativity coefficient.
- atom_
bond_ sum_ connectivity - Compute the atom-bond sum-connectivity index.
- attention_
aggregate - Aggregate a signal with per-edge attention weights.
- augmented_
forman_ ricci_ curvature - Augmented Forman-Ricci curvature for each edge.
- augmented_
zagreb_ index - Compute the augmented Zagreb index.
- automorphism_
group - Compute a generating set of the automorphism group
Aut(G). - average_
local_ efficiency - Average of
local_efficiencyover allNvertices. By upstream convention, returns0.0whenvcount < 3(no vertex can have two distinct neighbours, so every per-vertex value is trivially 0). - average_
sombor_ index - Compute the average Sombor index.
- avg_
local_ clustering - Compute the average local clustering coefficient.
- avg_
nearest_ neighbor_ degree - Average nearest-neighbour degree, per vertex.
- avg_
nearest_ neighbor_ degree_ weighted - Weighted average nearest-neighbour degree (Barrat formula).
- avg_
neighbor_ connectivity - Compute the average neighbor connectivity of the graph.
- avg_
neighbor_ degree_ ratio - Compute the average neighbor degree ratio.
- avg_
path_ fraction - Compute the average path fraction.
- balaban_
j_ index - Compute the Balaban J index of a graph.
- bandwidth
- Compute the exact graph bandwidth
B(G). - bandwidth_
lower_ bound - Compute a lower bound on graph bandwidth.
- bandwidth_
of_ labeling - Compute the bandwidth of a specific labeling.
- bell_
index - Compute the Bell index (degree population variance).
- bellman_
ford_ distances - Single-source Bellman-Ford shortest distances on
graphfromsource, following out-edges on directed graphs. - bellman_
ford_ distances_ with_ mode - Single-source Bellman-Ford with directed-mode selection.
- bellman_
ford_ path_ to - Returns the shortest path from
sourcetotargetusing Bellman-Ford, following out-edges on directed graphs. - bellman_
ford_ path_ to_ with_ mode - Returns the shortest path from
sourcetotargetusing Bellman-Ford with directed-mode selection. - bellman_
ford_ paths - Shortest paths from
sourceto each vertex intargetsusing Bellman-Ford (handles negative edge weights). - bellman_
ford_ paths_ with_ mode - Multi-target Bellman-Ford shortest paths with directed-mode selection.
- bertz_
complexity_ index - Compute the Bertz complexity index.
- beta_
weighted_ gabriel_ graph - Build the β-weighted Gabriel graph of a point set.
- betweenness
- Per-vertex (unweighted) betweenness centrality.
- betweenness_
centralization - Compute betweenness centralization.
- betweenness_
cutoff - Range-limited betweenness centrality.
- betweenness_
subset - Subset betweenness centrality.
- betweenness_
weighted - Per-vertex weighted betweenness centrality.
- bfs
- Visit order of vertices reachable from
root, in BFS order. - bfs_
simple - Mode-aware BFS from a single root, returning visit order, layer boundaries, and BFS-tree parents.
- bfs_
tree - Multi-output BFS from
root. Returns visit order, per-vertex distances, and per-vertex BFS-tree parent in a single pass. - bibcoupling
- Computes bibliographic coupling scores between all pairs of vertices.
- biconnected_
components - Compute the biconnected components of
graph. - bipartite_
projection - Project a bipartite graph onto one of its vertex types.
- bipartite_
projection_ size - Compute sizes of both bipartite projections without building them.
- bipartiteness_
ratio - Compute the bipartiteness ratio
(2 - μ_n) / 2. - bond_
percolation - Bond percolation: the size of the largest component as edges of
graphare added in the order specified byedge_order. - bridge_
ratio - Compute the bridge ratio of the graph.
- bridges
- Bridges of
graph— edges whose removal would increase the number of (weakly) connected components. - canonical_
permutation - Compute a canonical vertex permutation of
graph. - cartesian_
product - Computes the Cartesian product of two graphs.
- centrality_
correlation - Compute the centrality correlation (betweenness vs closeness).
- centralization
- Compute the graph-level centralization score from per-vertex scores.
- centralization_
betweenness_ tmax - Theoretical maximum betweenness centralization for a star graph.
- centralization_
betweenness_ wrapper - Betweenness centralization: compute per-vertex betweenness scores and the graph-level centralization in one call.
- centralization_
closeness_ tmax - Theoretical maximum closeness centralization for a star graph.
- centralization_
closeness_ wrapper - Closeness centralization: compute per-vertex closeness scores and the graph-level centralization in one call.
- centralization_
degree_ tmax - Theoretical maximum degree centralization for a star graph.
- centralization_
degree_ wrapper - Degree centralization: compute per-vertex degree scores and the graph-level centralization in one call.
- centralization_
eigenvector_ tmax - Theoretical maximum eigenvector centralization for a star graph.
- centralization_
eigenvector_ wrapper - Eigenvector centralization: compute per-vertex eigenvector centrality scores and the graph-level centralization in one call.
- cheeger_
bounds - Compute Cheeger constant bounds from the normalized Laplacian.
- chromatic_
number_ greedy - Count the number of colors used in a coloring.
- circle_
beta_ skeleton - Build the circle-based β-skeleton of a 2-D point set.
- circuit_
rank_ ratio - Compute the circuit rank ratio of the graph.
- class_
homophily - Class-balanced homophily ratio (adjusted for class imbalance).
- clique_
cover_ number - Compute the clique cover number
θ(G). - closed_
triplet_ ratio - Compute the closed triplet ratio (global transitivity).
- closeness
- Per-vertex closeness centrality (
Vec<Option<f64>>). - closeness_
centralization - Compute closeness centralization.
- closeness_
cutoff - Range-limited closeness centrality.
- closeness_
weighted - Per-vertex weighted closeness centrality.
- clustering_
degree_ correlation - Compute the clustering-degree correlation.
- cocitation
- Computes the cocitation scores between all pairs of vertices.
- cohesion
- Group cohesion — igraph C alias
igraph_cohesion(flow.c:2470). Exact synonym forvertex_connectivity; kept for naming parity with the upstream API and so users following the White-Harary (2001) sociological-network literature have a direct hit. Identical signature and behaviour. - cohesive_
blocks - Identify the hierarchical cohesive block structure of a graph.
- collatz_
sinogowitz - Compute the Collatz–Sinogowitz irregularity.
- communicability_
matrix - Compute the communicability matrix between all pairs of vertices.
- community_
to_ membership - Cut a binary dendrogram at
stepsmerges, returning the resulting membership and cluster-size vectors. - community_
voronoi - Voronoi-based community detection.
- compare_
communities - Compare two community membership vectors over the same vertex set.
- complementer
- Returns the complementer of
graph. - component_
ratio - Compute the component ratio.
- compose
- Computes the composition of two graphs.
- conductance
- Compute the conductance of a partition.
- connect_
neighborhood - Returns a new graph where each vertex is connected to all vertices
reachable within
ordersteps in the original graph. - connected_
components - Compute the weak connected components of
graph. - connective_
eccentricity_ index - Compute the connective eccentricity index.
- connectivity_
index - Compute the connectivity index of the graph.
- constraint
- Compute Burt’s constraint scores for all vertices.
- contract_
vertices - Contracts vertices according to a grouping, merging edges.
- convergence_
degree - Per-edge convergence degree.
- convergence_
degree_ full - Convergence degree along with the per-edge
In(e)/Out(e)counts. - convex_
hull_ 2d - Compute the convex hull of a set of 2D points.
- coreness
- Per-vertex coreness number.
- coreness_
with_ mode - Coreness with explicit
CorenessMode(ALGO-PR-015b). - count_
adjacent_ triangles - Per-vertex adjacent-triangle count. Entry
iis the number of triangles vertexiparticipates in. Parallel edges and self-loops are ignored — the simple graph induced by the OUT-neighbour view is used (consistent withcount_triangles). For directed graphs that is not yet the underlying-undirected projection that upstream uses; see ALGO-PR-002 for the deferred fix. - count_
automorphisms - Count the automorphisms of
graph— the order|Aut(G)|of its automorphism group. - count_
isomorphisms_ vf2 - Count the number of VF2 isomorphic mappings between two graphs.
- count_
loops - Counts self-loop edges in
graph. - count_
multiple - Per-edge multiplicity: how many edges share each edge’s endpoint pair.
- count_
multiple_ 1 - Multiplicity of a single edge: how many edges share the same
endpoint pair as edge
eid. - count_
mutual - Count the number of mutual edge pairs in a directed graph.
- count_
pairs_ at_ distance - Compute the number of vertex pairs at a given distance.
- count_
reachable - Per-vertex count of reachable vertices (including the vertex itself).
- count_
subisomorphisms_ vf2 - Count the number of VF2 subgraph-isomorphic embeddings of the pattern
graph2into the targetgraph1. - count_
triangles - Count the number of triangles in
graph. Edge directions, parallel edges, and self-loops are ignored. - cut_
size - Compute the cut size of a partition.
- cyclomatic_
density - Compute the cyclomatic density.
- decompose
- Decompose
graphinto its weakly connected components. - degeneracy
- Return the degeneracy of a graph.
- degree_
assortativity_ proxy - Compute the degree assortativity proxy.
- degree_
centralization - Compute degree centralization.
- degree_
closeness_ correlation - Compute the degree-closeness correlation.
- degree_
concentration - Compute the degree concentration.
- degree_
core_ ratio - Compute the core ratio (fraction of vertices with degree ≥ d̄).
- degree_
correlation_ vector - Compute the degree correlation function
k_nn(k). - degree_
cv - Compute the degree coefficient of variation.
- degree_
density - Compute the degree density (normalized second moment of degree).
- degree_
diff_ connectivity - Compute the degree difference connectivity index.
- degree_
distance - Compute the degree-distance index (Schultz-type).
- degree_
distance_ correlation - Compute the degree-distance correlation.
- degree_
distribution - Compute the degree distribution histogram of a graph.
- degree_
diversity - Compute the degree diversity (number of distinct degree values).
- degree_
eccentricity_ index - Compute the degree-eccentricity index.
- degree_
entropy - Shannon entropy of the degree distribution.
- degree_
entropy_ ln - Compute the Shannon entropy of the degree distribution (natural log).
- degree_
entropy_ normalized - Compute the normalized degree entropy.
- degree_
gini - Compute the Gini coefficient of the degree sequence.
- degree_
harmonic_ mean_ index - Compute the degree harmonic mean index.
- degree_
herfindahl - Compute the Herfindahl–Hirschman index of the degree sequence.
- degree_
hoover - Compute the Hoover index (Robin Hood index) of the degree sequence.
- degree_
iqr - Compute the interquartile range (IQR) of the degree sequence.
- degree_
isolated_ ratio - Compute the isolated ratio (fraction of degree-0 vertices).
- degree_
kurtosis - Compute the excess kurtosis of the degree distribution.
- degree_
laplacian_ energy - Compute the degree Laplacian energy of the graph.
- degree_
leaf_ ratio - Compute the leaf ratio (fraction of degree-1 vertices).
- degree_
mad - Compute the mean absolute deviation of the degree sequence.
- degree_
max_ deviation - Compute the maximum degree deviation from the mean.
- degree_
median - Compute the median of the degree sequence.
- degree_
median_ ad - Compute the median absolute deviation of the degree sequence.
- degree_
mixing_ entropy - Compute the degree mixing entropy.
- degree_
mode - Compute the mode of the degree sequence.
- degree_
neighbor_ max_ sum - Compute the sum of maximum neighbor degrees.
- degree_
neighbor_ min_ sum - Compute the sum of minimum neighbor degrees.
- degree_
neighbor_ range_ sum - Compute the sum of neighbor degree ranges.
- degree_
neighbor_ variance_ sum - Compute the sum of neighbor degree variances.
- degree_
palma - Compute the Palma ratio of the degree sequence.
- degree_
profile - Compute degree profile for each vertex: [deg, deg², log(deg+1)].
- degree_
range - Compute the range of the degree sequence.
- degree_
sequence - Returns the degree sequence of the graph.
- degree_
skewness - Compute the skewness of the degree distribution.
- degree_
span_ ratio - Compute the degree span ratio.
- degree_
spectral_ gap_ estimate - Compute the degree-based spectral gap estimate.
- degree_
structural_ info - Structural information content based on degree sequence.
- degree_
sum_ index - Compute the degree-sum index.
- degree_
tail_ ratio - Compute the tail ratio (fraction of vertices with degree ≥ 2·d̄).
- degree_
theil - Compute the Theil index (GE(1)) of the degree sequence.
- degree_
variance - Compute the variance of the degree sequence.
- degree_
variance_ ratio - Compute the degree variance ratio.
- delaunay_
graph - Build the Delaunay triangulation graph of a 1D or 2D point set.
- density
- Edge density of
graph. Counterpart ofigraph_density(_, NULL_weights, _, /*loops=*/false). - dfs
- Pre-order visit of vertices reachable from
root, in DFS order. - dfs_
simple - Mode-aware DFS from a single root, returning pre/post-order, parents, and DFS-tree depth.
- dfs_
tree - Multi-output DFS from
root. Returns visit order (pre and post), per-vertex parents, and DFS-tree depth in a single pass. - diameter
- Diameter of
graph— the maximum vertex eccentricity.Nonefor a graph with no vertices. - diameter_
radius_ ratio - Compute the diameter-radius ratio.
- diameter_
vulnerability - Compute the diameter vulnerability.
- diameter_
weighted - OUT-mode default for
diameter_weighted_with_mode. - diameter_
weighted_ with_ mode - Mode-aware weighted diameter.
Noneforvcount == 0. - diameter_
with_ mode - Diameter of
graphunder the givenmode.Noneforvcount == 0. - difference
- Returns
orig \ sub: the multiset difference of the edges. - dijkstra_
all_ shortest_ paths - All shortest weighted paths from
sourceto every vertex, preserving every tie. Counterpart ofigraph_get_all_shortest_paths_dijkstra(_, _, _, _, source, vss_all(), weights, mode). - dijkstra_
distances - Single-source Dijkstra distances.
- dijkstra_
distances_ cutoff - Single-source Dijkstra distances with an optional
cutoff. Whencutoff = Some(c), vertices whose shortest-path distance exceedscare returned asNone(unreachable-within-cutoff); the search stops relaxing edges out of any vertex whosemindist > c. - dijkstra_
distances_ cutoff_ with_ mode - Mode-aware
dijkstra_distances_cutoff. Counterpart ofigraph_distances_dijkstra_cutoff(_, _, source, vss_all(), weights, mode, cutoff). - dijkstra_
distances_ multi - Multi-source Dijkstra distances.
result[i][v]is the shortest distance fromsources[i]tov(orNoneif unreachable / past the cutoff). - dijkstra_
distances_ multi_ with_ mode - Mode-aware
dijkstra_distances_multi. - dijkstra_
distances_ with_ mode - Mode-aware Dijkstra distances. Counterpart of
igraph_distances_dijkstra(_, _, source, vss_all(), weights, mode). - dijkstra_
path_ to - Reconstruct a single source-to-target path returning vertex and
edge sequences.
Ok(None)iftargetis unreachable; the source vertex appears as the first element when reachable. - dijkstra_
path_ to_ with_ mode - Mode-aware
dijkstra_path_to. Counterpart ofigraph_get_shortest_path_dijkstra(_, _, _, source, target, weights, mode). - dijkstra_
paths - Single-source Dijkstra returning distances + parents + inbound edges over every vertex.
- dijkstra_
paths_ with_ mode - Mode-aware
dijkstra_paths. Counterpart ofigraph_get_shortest_paths_dijkstra(_, _, _, source, vss_all(), weights, mode, parents, inbound_edges). - dirichlet_
energy - Compute the Dirichlet energy of a signal on a graph.
- disjoint_
union - Returns the disjoint union of
leftandright. - disjoint_
union_ many - Disjoint union of any number of graphs (ALGO-OP-002b).
- distance_
energy - Compute the distance energy
E_D = Σ |λ_i(D)|. - distance_
estrada_ index - Compute the distance Estrada index
DEE = Σ exp(λ_i(D)). - distance_
spectral_ radius - Compute the distance spectral radius
ρ_D = λ_1(D). - distance_
spectrum - Compute the distance spectrum, sorted in decreasing order.
- distances
- Unweighted shortest-path lengths from
sourceto every vertex. - distances_
all - All-pairs unweighted shortest distances.
- distances_
all_ with_ mode - All-pairs shortest distances with direction control.
- distances_
cutoff - Unweighted shortest-path lengths from
sourceto every vertex, ignoring paths longer thancutoff. - distances_
cutoff_ multi - Multi-source unweighted distances with cutoff, direction-aware.
- distances_
cutoff_ with_ mode - Mode-aware
distances_cutoff. For undirected graphsmodeis ignored. - distances_
from - Compute shortest-path distances from multiple sources to all vertices.
- distances_
from_ with_ mode - Compute shortest-path distances from multiple sources with direction control.
- diversity
- Structural diversity index for all vertices in an undirected graph.
- dominator_
tree - Compute the Lengauer-Tarjan dominator tree of a directed flowgraph.
- ecc
- Compute the edge clustering coefficient for
eidsingraph. - eccentric_
connectivity_ index - Compute the eccentric connectivity index.
- eccentric_
distance_ sum - Compute the eccentric-distance sum.
- eccentricity
- Eccentricity of every vertex (length
vcount). Resultr[v]is the maximum shortest-path distance fromvto any reachable vertex. Isolated vertices have eccentricity0. - eccentricity_
classes - Classify each vertex by its eccentricity class.
- eccentricity_
weighted - OUT-mode default for
eccentricity_weighted_with_mode. Counterpart ofigraph_eccentricity(_, weights, _, igraph_vss_all(), IGRAPH_OUT). - eccentricity_
weighted_ with_ mode - Mode-aware weighted eccentricity. For each vertex
v, returnsmax_{u reachable from v} dist(v, u), where distances are weighted shortest-path lengths (Dijkstra). Unreachable vertex pairs are ignored (matches upstream’sunconn=true); isolated vertices have eccentricity0.0. - eccentricity_
with_ mode - Eccentricity of every vertex following
mode-direction edges. - edge_
adamic_ adar_ sum - Compute the sum of Adamic–Adar indices across all edges.
- edge_
betweenness - Per-edge unweighted betweenness centrality.
- edge_
betweenness_ community - Run edge-betweenness community detection on
graph. - edge_
betweenness_ community_ weighted - Run weighted edge-betweenness community detection on
graphwith per-edgeweights. - edge_
betweenness_ cutoff - Range-limited edge betweenness centrality.
- edge_
betweenness_ subset - Subset edge betweenness centrality.
- edge_
betweenness_ weighted - Per-edge weighted betweenness centrality (
Vec<f64>). - edge_
common_ neighbor_ sum - Compute the sum of common neighbor counts across all edges.
- edge_
conn_ ratio - Compute the edge connectivity ratio.
- edge_
connectivity - Edge connectivity (adhesion) of a graph.
- edge_
connectivity_ ratio - Compute the edge connectivity ratio.
- edge_
degree_ cosine - Compute the cosine similarity of degree vectors across edges.
- edge_
degree_ covariance - Compute the degree covariance across edges.
- edge_
degree_ diff_ ratio - Compute the degree difference ratio over edges.
- edge_
degree_ discrepancy - Compute the normalized degree discrepancy across edges.
- edge_
degree_ geometric_ sum - Compute the edge degree geometric sum.
- edge_
degree_ harmonic_ sum - Compute the edge degree harmonic sum.
- edge_
degree_ log_ product - Compute the edge degree log-product sum.
- edge_
degree_ max_ sum - Compute the edge degree max sum.
- edge_
degree_ mean_ sum - Compute the edge degree mean sum.
- edge_
degree_ min_ sum - Compute the edge degree min sum.
- edge_
degree_ pearson - Compute the Pearson correlation of endpoint degrees across edges.
- edge_
degree_ product_ ratio - Compute the product-sum ratio index over edges.
- edge_
degree_ ratio_ sum - Compute the edge degree ratio sum.
- edge_
degree_ rms - Compute the edge endpoint degree RMS.
- edge_
degree_ sorensen - Compute the Sørensen edge degree index.
- edge_
disjoint_ paths - Maximum number of pairwise edge-disjoint paths from
sourcetotarget. - edge_
entropy - Shannon entropy of the edge-degree distribution.
- edge_
heterophily - Heterophily ratio:
1 - edge_homophily. - edge_
homophily - Edge homophily ratio: fraction of edges connecting same-label vertices.
- edge_
inverse_ degree_ sum - Compute the inverse degree-sum index over edges.
- edge_
jaccard_ sum - Compute the sum of Jaccard overlap coefficients across all edges.
- edge_
overlap_ sum - Compute the sum of overlap coefficients across all edges.
- edge_
pi_ index - Compute the edge-PI index.
- edge_
resilience - Compute edge resilience
λ(G) / m. - edge_
surplus_ ratio - Compute the edge surplus ratio.
- edge_
szeged_ index - Compute the edge-Szeged index.
- edge_
vertex_ ratio - Compute the edge-vertex ratio.
- edgelist_
percolation - Percolation curve as a sequence of vertex-pair edges is added.
- effective_
resistance - Compute the effective resistance between two vertices.
- effective_
resistance_ matrix - Compute the effective resistance matrix for all pairs.
- efficiency_
ratio - Compute the efficiency ratio.
- eigen_
adjacency - Compute selected eigenvalues of a graph’s adjacency matrix.
- eigen_
matrix - Compute selected eigenpairs of a general real matrix.
- eigen_
matrix_ symmetric - Compute selected eigenpairs of a real symmetric matrix.
- eigenvector_
centrality - Backward-compatible undirected, unweighted entry point.
- eigenvector_
centrality_ directed - Directed unweighted eigenvector centrality.
- eigenvector_
centrality_ directed_ weighted - Directed weighted eigenvector centrality.
- eigenvector_
centrality_ full - Master entry point matching upstream’s signature.
- eigenvector_
centrality_ weighted - Undirected weighted eigenvector centrality.
- elimination_
ordering - Compute an elimination ordering using the min-degree heuristic.
- elliptic_
sombor_ index - Compute the elliptic Sombor index.
- estrada_
index - Compute the Estrada index of a graph.
- eulerian_
cycle - Build an Eulerian cycle if one exists, or return an error.
- eulerian_
path - Build an Eulerian path or cycle for
graphif one exists. ReturnsSome(edge_ids)(the walk visits each edge exactly once) orNoneif no Eulerian walk exists. - ev_
degree_ randic - Compute the ev-degree Randić index.
- even_
tarjan_ reduction - Compute the Even-Tarjan reduction of a graph.
- expand_
path_ to_ pairs - Expand a vertex path into consecutive pairs for edge lookup.
- expansion
- Compute the expansion (isoperimetric number) of a partition.
- exponential_
abc - Compute the exponential atom-bond connectivity index.
- exponential_
augmented_ zagreb - Compute the exponential augmented Zagreb index.
- exponential_
first_ zagreb - Compute the exponential first Zagreb index.
- exponential_
forgotten - Compute the exponential forgotten index.
- exponential_
ga - Compute the exponential geometric-arithmetic index.
- exponential_
inverse_ degree - Compute the exponential inverse degree index.
- exponential_
randic - Compute the exponential Randić index.
- exponential_
sum_ connectivity - Compute the exponential sum-connectivity index.
- fast_
greedy_ modularity - Run fast greedy modularity community detection on
graph(unweighted). - fast_
greedy_ modularity_ weighted - Run fast greedy modularity community detection on
graphwith edgeweights. - fiedler_
vector - Compute the Fiedler vector of a graph.
- fifth_
ga_ index - Compute the fifth geometric-arithmetic index.
- first_
ev_ degree_ zagreb - Compute the first ev-degree Zagreb index.
- first_
gourava_ index - Compute the first Gourava index.
- first_
hyper_ gourava_ index - Compute the first hyper-Gourava index.
- first_
hyper_ zagreb - Compute the first hyper-Zagreb index.
- first_
hyper_ zagreb_ coindex - Compute the first hyper-Zagreb coindex.
- first_
inverse_ nirmala - Compute the first inverse Nirmala index.
- first_
leap_ zagreb - Compute the first leap Zagreb index.
- first_
multiplicative_ zagreb - Compute the first multiplicative Zagreb index.
- first_
neighborhood_ zagreb - Compute the first neighborhood Zagreb index.
- first_
redefined_ zagreb - Compute the first redefined Zagreb index.
- first_
reformulated_ zagreb - Compute the first reformulated Zagreb index.
- first_
transmission_ zagreb - Compute the first transmission Zagreb index.
- first_
ve_ degree_ zagreb_ alpha - Compute the first ve-degree Zagreb alpha index.
- first_
ve_ degree_ zagreb_ beta - Compute the first ve-degree Zagreb beta index.
- first_
zagreb_ coindex - Compute the first Zagreb coindex.
- first_
zagreb_ connection - Compute the first Zagreb connection index.
- first_
zagreb_ entropy - Compute the first Zagreb entropy.
- first_
zagreb_ index - Compute the first Zagreb index
M₁(G) = Σ deg(v)². - floyd_
warshall_ distances - All-pairs shortest distances via Floyd-Warshall.
- fluid_
communities - Run Fluid Communities with default options
(seed = 0,
max_iterations=FLUID_DEFAULT_MAX_ITERATIONS). - fluid_
communities_ with_ options - Run Fluid Communities with full option control.
- forgotten_
coindex - Compute the forgotten coindex (F-coindex).
- forgotten_
index - Compute the forgotten topological index.
- forman_
ricci_ curvature - Forman-Ricci curvature for each edge.
- fourth_
abc_ index - Compute the fourth atom-bond connectivity index.
- freeman_
degree_ centralization - Compute Freeman’s degree centralization.
- gabriel_
graph - Build the Gabriel graph of a point set.
- general_
randic_ index - Compute the general Randić index
R_α(G). - general_
sum_ connectivity_ index - Compute the general sum-connectivity index
χ_α(G). - general_
zeroth_ order_ randic - Compute the general zeroth-order Randić index.
- geometric_
arithmetic_ index - Compute the geometric-arithmetic index.
- get_
adjacency - Compute the adjacency matrix of a graph.
- get_
all_ shortest_ paths - Find all shortest paths from
sourceto every reachable vertex. - get_
all_ shortest_ paths_ dijkstra - Find all shortest paths from
sourceto every reachable vertex using Dijkstra’s algorithm with non-negative edge weights. - get_
all_ shortest_ paths_ dijkstra_ with_ mode - Find all shortest paths from
sourcewith direction control. - get_
all_ shortest_ paths_ with_ mode - Find all shortest paths from
sourcewith direction control. - get_
biadjacency_ matrix - Extract the biadjacency matrix from a bipartite graph.
- get_
biadjacency_ weighted - Extract a weighted biadjacency matrix from a bipartite graph.
- get_
edgelist - Return all edges of the graph as a list of
(source, target)pairs. - get_
eids - Look up edge IDs for a batch of vertex pairs.
- get_
isomorphisms_ vf2 - Collect every VF2 isomorphic mapping between two graphs.
- get_
laplacian - Compute the Laplacian matrix of a graph.
- get_
shortest_ path - Calculate a single shortest path from
fromtoto. - get_
shortest_ path_ astar - Calculate a single shortest path from
fromtotousing A*. - get_
shortest_ paths - Returns one shortest path from
sourceto every vertex in the graph. - get_
shortest_ paths_ dijkstra - Returns one shortest path from
sourceto every vertex in the graph, using weighted edges (Dijkstra’s algorithm). - get_
shortest_ paths_ dijkstra_ with_ mode - Mode-aware
get_shortest_paths_dijkstra. - get_
shortest_ paths_ with_ mode - Returns one shortest path from
sourceto every vertex, with direction control for directed graphs. - get_
stochastic - Compute the stochastic adjacency matrix of a graph.
- get_
subisomorphisms_ lad - Enumerate all subgraph isomorphisms from
patternintotargetwith the LAD algorithm. Each returned vector maps pattern vertexi(by index) to its target vertex. - get_
subisomorphisms_ vf2 - Collect every VF2 subgraph-isomorphic embedding of the pattern
graph2into the targetgraph1. - giant_
component_ gap - Compute the giant component gap.
- girth
- Shortest cycle length in
graph. ReturnsNonefor acyclic graphs. - global_
efficiency - Global efficiency of
graph— average inverse pairwise shortest distance over allN*(N-1)ordered vertex pairs. Pairs that are unreachable contribute 0. - gomory_
hu_ tree - Gomory-Hu cut tree of an undirected graph (Gusfield 1990).
- gordon_
scantlebury_ index - Compute the Gordon-Scantlebury index (path-of-length-2 count).
- graovac_
ghorbani_ index - Compute the Graovac-Ghorbani index.
- graph_
center - Return the central vertices of a graph — those with minimum eccentricity.
- graph_
compactness - Compute the compactness of the graph.
- graph_
energy - Compute the graph energy.
- graph_
integrity - Compute the integrity of a graph.
- graph_
periphery - Return the periphery vertices of a graph.
- graph_
power - Returns the k-th power of a graph as a simple graph.
- graph_
product - Computes a graph product selected by
product_type. - graph_
summary - Compute a quick structural summary of a graph.
- graph_
summary_ string - Format a detailed multi-line summary of a graph.
- graph_
toughness - Compute the toughness of a graph.
- greedy_
clique_ cover - Find a greedy clique cover.
- greedy_
clique_ number - Compute the greedy clique number (lower bound on chromatic number).
- greedy_
coloring - Greedy vertex coloring in natural vertex order.
- greedy_
coloring_ largest_ first - Greedy coloring with largest-first (LF) ordering.
- greedy_
coloring_ with_ order - Greedy vertex coloring with a custom vertex processing order.
- greedy_
independent_ set - Find a maximal independent set using a greedy heuristic.
- greedy_
matching - Find a greedy maximal matching.
- gutman_
index - Compute the Gutman index.
- hamiltonian_
cycle - Find a Hamiltonian cycle using backtracking.
- hamiltonian_
path - Find a Hamiltonian path using backtracking.
- harary_
index - Compute the Harary index of a graph.
- harmonic_
centrality - Per-vertex harmonic centrality.
- harmonic_
centrality_ cutoff - Range-limited harmonic centrality.
- harmonic_
centrality_ weighted - Per-vertex weighted harmonic centrality.
- harmonic_
graph_ index - Compute the harmonic index.
- has_
hamiltonian_ cycle - Check whether a graph has a Hamiltonian cycle.
- has_
hamiltonian_ path - Check whether a graph has a Hamiltonian path.
- has_
loop - Returns
trueiffgraphhas at least one self-loop edge. - has_
multiple - Returns
trueiffgraphhas at least one parallel edge. - has_
mutual - Check whether a directed graph has any mutual (reciprocal) edges.
- heat_
kernel_ diffuse - Diffuse a signal on the graph using the heat kernel.
- hosoya_
index - Compute the Hosoya index (Z-index) of a graph.
- hub_
and_ authority_ scores - Compute Kleinberg’s hub and authority scores.
- hub_
and_ authority_ scores_ weighted - Weighted Kleinberg hub and authority scores.
- hub_
dominance - Compute the hub dominance.
- hub_
dominance_ ratio - Compute the hub dominance ratio.
- hub_
ratio - Compute the hub ratio.
- hyper_
wiener_ index - Compute the hyper-Wiener index of a graph.
- hyperbolicity
- Compute δ-hyperbolicity as a floating-point value.
- hyperbolicity_
twice - Compute the Gromov δ-hyperbolicity of a graph.
- independence_
ratio - Compute the independence ratio
α(G) / n. - independent_
set_ count_ sequence - Compute the independence polynomial coefficient sequence.
- induced_
subgraph - Creates the subgraph induced by the specified vertices.
- induced_
subgraph_ edges - Returns the IDs of edges whose both endpoints lie in
vids. - infomap
- Run Infomap with the default options (unweighted, 1 trial).
- infomap_
weighted - Run Infomap with per-edge weights (1 trial).
- infomap_
with_ options - Run Infomap with full control over parameters.
- intersection
- Returns the intersection of
leftandright. - intersection_
many - Returns the intersection of multiple graphs.
- inverse_
degree_ index - Compute the inverse degree index (zeroth-order Randić index).
- inverse_
degree_ power - Compute the inverse degree power index.
- inverse_
sum_ indeg_ index - Compute the inverse sum indeg index.
- invert_
permutation - Invert a permutation vector.
- ira_
index - Compute the power-difference irregularity index.
- irb_
index - Compute the root-difference irregularity index.
- ird_
index - Compute the square-difference irregularity index.
- irga_
index - Compute the geometric-arithmetic irregularity index.
- irl_
irregularity - Compute the IRL irregularity (irregularity by logarithm).
- irlu_
irregularity - Compute the IRLU irregularity (irregularity by log-ratio).
- is_
acyclic - Returns
trueiffgraphcontains no cycle. - is_
apex_ forest - Check whether a graph is an apex forest.
- is_
apex_ tree - Check whether a graph is an apex tree.
- is_
banner_ free - Check whether a graph is banner-free (no induced banner / flag).
- is_
biclique - Check whether a graph is a complete bipartite graph (biclique).
- is_
biconnected - Check whether
graphis biconnected. - is_
bigraphical - Test whether a bi-degree-sequence is bigraphical (realizable as a bipartite graph).
- is_
bipartite - Check whether a graph is bipartite and optionally return the partition.
- is_
biregular - Check whether a graph is biregular.
- is_
block_ graph - Check whether a graph is a block graph.
- is_
bowtie_ free - Check whether a graph is bowtie-free (no induced bowtie / butterfly).
- is_
bull_ free - Check whether a graph is bull-free.
- is_
c4_ free - Check whether a graph is
C_4-free (no induced 4-cycle). - is_
c5_ free - Check whether a graph is
C_5-free (no induced 5-cycle). - is_
cactus_ graph - Check whether a graph is a cactus graph.
- is_
caterpillar - Check whether a graph is a caterpillar tree.
- is_
chain_ graph - Check whether a graph is a chain graph.
- is_
chordal_ bipartite - Check whether a graph is chordal bipartite.
- is_
claw_ free - Check whether a graph is claw-free.
- is_
clique - Check whether a set of vertices forms a clique.
- is_
clique_ cover - Check whether a partition of vertices forms a valid clique cover.
- is_
cluster_ graph - Check whether a graph is a cluster graph (disjoint union of cliques).
- is_
co_ bipartite - Check whether a graph is co-bipartite.
- is_
co_ chordal - Check whether a graph is co-chordal (complement is chordal).
- is_
cograph - Check whether a graph is a cograph (P4-free).
- is_
complete - Returns
trueiff every pair of distinct vertices is adjacent. - is_
complete_ bipartite - Check whether a graph is complete bipartite.
- is_
complete_ multipartite - Check whether a graph is a complete multipartite graph.
- is_
connected - Tests whether the graph is connected.
- is_
cricket_ free - Check whether a graph is cricket-free.
- is_
cubic - Check whether a graph is cubic (3-regular).
- is_
cycle - Check whether a graph is a cycle graph.
- is_dag
- Returns
trueiffgraphis a directed acyclic graph. - is_
dart_ free - Check whether a graph is dart-free (no induced dart).
- is_
diamond_ free - Check whether a graph is diamond-free.
- is_
distance_ hereditary - Check whether a graph is distance-hereditary.
- is_
eulerian - Decide whether
graphhas an Eulerian path and/or cycle. - is_
forest - Returns
Some(roots)iffgraphis a forest undermode, otherwiseNone. The null graph is a forest with empty roots. - is_
fork_ free - Check whether a graph is fork-free (no induced fork / cross).
- is_
gem_ free - Check whether a graph is gem-free.
- is_
geodetic - Check whether a graph is geodetic.
- is_
graphical - Test whether a degree sequence is graphical (realizable as some graph).
- is_
hamiltonian_ cycle - Check whether a sequence of vertices forms a valid Hamiltonian cycle.
- is_
hamiltonian_ path - Check whether a sequence of vertices forms a valid Hamiltonian path.
- is_
house_ free - Check whether a graph is house-free (no induced house graph).
- is_
independent_ vertex_ set - Check whether a set of vertices forms an independent set.
- is_
k_ degenerate - Check whether a graph is k-degenerate.
- is_
lobster - Check whether a graph is a lobster tree.
- is_loop
- Returns a per-edge boolean vector marking self-loops.
- is_
minimal_ separator - Check whether a set of vertices is a minimal separator.
- is_
multiple - Returns a per-edge boolean vector marking multiple (parallel) edges.
- is_
mutual - Check whether each edge in a directed graph is mutual (reciprocated).
- is_
net_ free - Check whether a graph is net-free (no induced net subgraph).
- is_
outerplanar - Check whether a graph is outerplanar.
- is_
p5_ free - Check whether a graph is
P_5-free (no induced path on 5 vertices). - is_path
- Check whether a graph is a path graph.
- is_
paw_ free - Check whether a graph is paw-free.
- is_
perfect - Returns
truewhengraphis a perfect graph. - is_
perfect_ matching - Check whether a matching is a perfect matching.
- is_
planar - Test whether a graph is planar.
- is_
proper_ coloring - Check whether a coloring is valid (proper).
- is_
proper_ interval - Check whether a graph is a proper interval graph.
- is_
pseudo_ forest - Check whether a graph is a pseudo-forest.
- is_
ptolemaic - Check whether a graph is ptolemaic.
- is_
regular - Check whether a graph is regular.
- is_
same_ graph - Returns
trueiffg1andg2are identical as labelled graphs: same vertex count, same directedness, same edge multiset. Edges differing only in storage order (or, for undirected, in endpoint orientation) are treated as identical. - is_
self_ complementary - Check whether a graph is self-complementary.
- is_
semicomplete - Check whether a directed graph is semicomplete.
- is_
separator - Check whether a set of vertices is a separator of the graph.
- is_
series_ parallel - Check whether a graph is series-parallel.
- is_
simple - Returns
trueifgraphhas neither self-loops nor parallel edges. - is_
simple_ with_ mode is_simplewith explicitSimpleMode(ALGO-PR-013b).- is_
spider - Check whether a graph is a spider graph.
- is_
split_ graph - Check whether a graph is a split graph.
- is_star
- Check whether a graph is a star graph.
- is_
strongly_ chordal - Check whether a graph is strongly chordal.
- is_
strongly_ regular - Check whether a graph is strongly regular.
- is_
threshold_ graph - Check whether a graph is a threshold graph.
- is_
tournament - Check whether a graph is a tournament.
- is_tree
- Returns
Some(root)iffgraphis a tree undermode, otherwiseNone. The null graph (vcount == 0) is not a tree by convention. - is_
triangle_ free - Test whether a graph is triangle-free.
- is_
trivially_ perfect - Check whether a graph is trivially perfect.
- is_
unicyclic - Check whether a graph is unicyclic.
- is_
valid_ matching - Check whether a matching is valid.
- is_
weakly_ chordal - Check whether a graph is weakly chordal.
- is_
well_ covered - Check whether a graph is well-covered.
- is_
wheel - Check whether a graph is a wheel graph.
- is_
windmill - Check whether a graph is a windmill graph.
- isolated_
vertex_ ratio - Compute the isolated vertex ratio.
- isomorphic
- Decide whether two graphs are isomorphic, choosing a backend automatically.
- isomorphic_
bliss - Test whether two graphs are isomorphic via canonical labeling (BLISS).
- isomorphic_
vf2 - Test whether two graphs are isomorphic using the VF2 algorithm.
- johnson_
distances - All-pairs shortest-path distances via Johnson’s algorithm.
- join
- Creates the join of two graphs.
- joint_
degree_ distribution - Compute the joint degree distribution matrix.
- joint_
degree_ matrix - Compute the joint degree matrix of a graph.
- joint_
type_ distribution - Compute the joint type distribution (mixing matrix).
- k_
shortest_ paths - Finds the k shortest loopless paths between
sourceandtarget. - katz_
centrality - Compute Katz centrality for all vertices using power iteration.
- kirchhoff_
index - Compute the Kirchhoff index of a graph.
- knnk
- Per-degree average nearest-neighbour degree,
k_nn(k). - knnk_
weighted - Per-degree weighted average nearest-neighbour degree.
- label_
propagate_ predict - Predict labels using simple majority voting from labeled neighbors.
- label_
propagation - Run label propagation with the default options
(
LpaVariant::Fast, no initial labels, no fixed vertices, seed0). - label_
propagation_ weighted - Run label propagation with per-edge weights (default variant, no
initial labels, no fixed vertices, seed
0). - label_
propagation_ with_ options - Run label propagation with the full option bag.
- label_
spread - Predict labels for unlabeled vertices using label spreading.
- lanzhou_
index - Compute the Lanzhou index.
- laplacian_
spectrum - Compute all Laplacian eigenvalues, sorted in ascending order.
- largest_
component_ fraction - Compute the largest component fraction.
- layout_
align - Align a graph layout with the coordinate axes.
- layout_
bipartite - Compute a bipartite layout.
- layout_
circle - Place vertices uniformly on a unit circle.
- layout_
davidson_ harel - Compute the Davidson-Harel simulated annealing layout.
- layout_
drl - Compute the DrL layout.
- layout_
drl_ 3d - Compute the DrL layout in 3D.
- layout_
fruchterman_ reingold - 2D Fruchterman-Reingold force-directed layout.
- layout_
fruchterman_ reingold_ 3d - 3D Fruchterman-Reingold force-directed layout.
- layout_
gem - Compute the GEM force-directed layout.
- layout_
graphopt - Compute the GraphOpt force-directed layout.
- layout_
grid - Place vertices on a regular 2D grid.
- layout_
grid_ 3d - Place vertices on a regular 3D grid.
- layout_
kamada_ kawai - Compute 2D Kamada-Kawai layout.
- layout_
kamada_ kawai_ 3d - Compute 3D Kamada-Kawai layout.
- layout_
lgl - Compute the Large Graph Layout (LGL).
- layout_
mds - Compute the MDS (Multidimensional Scaling) layout.
- layout_
merge_ dla - Merge multiple 2D layouts into a single combined layout using DLA placement.
- layout_
random - Place vertices uniformly at random in the square
[-1, 1] × [-1, 1]. - layout_
random_ 3d - Place vertices uniformly at random in the cube
[-1, 1]³. - layout_
reingold_ tilford - Compute the Reingold-Tilford tree layout.
- layout_
reingold_ tilford_ circular - Circular variant of the Reingold-Tilford layout.
- layout_
sphere - Place vertices approximately uniformly on a unit sphere.
- layout_
star - Place vertices in a star layout: center at origin, rest on a unit circle.
- layout_
sugiyama - Compute the Sugiyama hierarchical layout.
- layout_
umap - Compute the 2D UMAP layout.
- layout_
umap_ 3d - Compute the 3D UMAP layout.
- le_
community_ to_ membership - Cut an incomplete dendrogram after
stepsmerges, starting from an initial (non-singleton) cluster assignment. - leading_
eigenvector - Detect communities using Newman’s leading eigenvector method.
- leading_
eigenvector_ weighted - Weighted leading eigenvector community detection (convenience wrapper).
- leaf_
to_ hub_ ratio - Compute the leaf-to-hub ratio.
- leiden
- Run Leiden with the default modularity objective,
γ = 1,β = 0.01, two iterations, seed0. - leiden_
weighted - Run Leiden with per-edge weights (modularity objective,
γ = 1,β = 0.01, two iterations, seed0). - leiden_
with_ options - Run Leiden with the full set of options.
- lexicographic_
product - Computes the lexicographic product of two graphs.
- line_
graph - Construct the line graph L(G) of the input graph.
- link_
pred_ adamic_ adar - Compute Adamic-Adar Index for given vertex pairs.
- link_
pred_ common_ neighbors - Compute Common Neighbors score for given vertex pairs.
- link_
pred_ jaccard - Compute Jaccard Coefficient for given vertex pairs.
- link_
pred_ preferential_ attachment - Compute Preferential Attachment score for given vertex pairs.
- link_
pred_ resource_ allocation - Compute Resource Allocation Index for given vertex pairs.
- list_
triangles - List all triangles in a graph.
- local_
efficiency - Per-vertex local efficiency. For each vertex
v, computes the average inverse distance between every ordered pair of distinct vertices inN(v)(the unique non-self neighbours ofv), measured in the subgraph obtained by removingv— paths must not pass throughv. Pairs unreachable inG \ {v}contribute 0. - local_
efficiency_ ratio - Compute the local efficiency ratio.
- local_
scan_ 0 - Local scan-0: vertex degree (unweighted) or strength (weighted).
- local_
scan_ 0_ them - Local scan-0 on two graphs: degree/strength from
themrestricted to edges that also exist inus. - local_
scan_ 1 - For each vertex, count edges within its closed 1-neighborhood.
- local_
scan_ 1_ ecount - Local scan-1 edge count / weight sum in the 1-neighbourhood of every vertex, with directed-mode support.
- local_
scan_ 1_ ecount_ them - Local scan-1 edge count on two graphs: count edges from
themin the 1-neighbourhood defined byus. - local_
scan_ k - For each vertex, count edges within its closed k-neighborhood.
- local_
scan_ k_ ecount - Mode-aware local scan-k edge count / weight sum.
- local_
scan_ k_ ecount_ them - Mode-aware local scan-k on two graphs.
- local_
scan_ subset_ ecount - Local scan on given vertex subsets: count edges (or sum weights) in the induced subgraph of each subset.
- louvain
- Run Louvain with the default options (
γ = 1, unweighted, deterministic seed0). - louvain_
weighted - Run Louvain with per-edge weights (
γ = 1, deterministic seed0). - louvain_
with_ options - Run Louvain with the full set of options.
- lune_
beta_ skeleton - Build the lune-based β-skeleton of a point set.
- matching_
count_ sequence - Compute the matching count sequence
[m(G,0), m(G,1), …]. - matching_
number - Compute the matching number
ν(G). - max_
degree - Returns the maximum degree in the graph.
- max_
degree_ vertex - Returns the vertex (or one of the vertices) with the maximum degree.
- max_
flow - Full maximum-flow computation: value, per-edge flow, cut edges, and source-side / sink-side vertex partitions.
- max_
flow_ value - Scalar maximum-flow value from
sourcetotarget. - maximum_
matching - Find the maximum matching (brute-force).
- mean_
degree - Mean degree of the graph.
- mean_
distance - Mean unweighted shortest-path length over all reachable ordered pairs.
Counterpart of
igraph_average_path_length(_, NULL_weights, _, _, /*directed=*/true, /*unconn=*/true). - mean_
distance_ weighted - Compute the weighted mean distance (average shortest path length).
- mean_
forman_ ricci - Compute the average Forman-Ricci curvature of the graph.
- merrifield_
simmons_ index - Compute the Merrifield–Simmons index of a graph.
- meshedness_
coefficient - Compute the meshedness coefficient of the graph.
- min_
degree - Returns the minimum degree in the graph.
- mincut
- Compute the global minimum cut of a (possibly weighted) graph.
- mincut_
value - Global minimum-cut value of a (possibly weighted) graph.
- minimum_
size_ separators - Find all minimum-size separating vertex sets.
- minimum_
spanning_ tree - Computes a minimum spanning tree (or forest, if disconnected) of
graphand returns the IDs of the edges that constitute the tree. - minmax_
degree_ ratio - Compute the min-max degree ratio index.
- modified_
first_ zagreb - Compute the modified first Zagreb index.
- modified_
first_ zagreb_ connection - Compute the modified first Zagreb connection index.
- modified_
sombor_ index - Compute the modified Sombor index.
- modular_
product - Computes the modular product of two graphs.
- modularity
- Modularity of
graphwith respect to community assignmentmembership. - modularity_
directed - Directed modularity (Leicht-Newman, ALGO-CO-001b).
- modularity_
matrix - Compute the modularity matrix B of a graph.
- modularity_
weighted - Weighted modularity (ALGO-CO-001c).
- modularity_
weighted_ directed - Directed weighted modularity (Leicht-Newman, ALGO-CO-006c follow-up).
- mostar_
index - Compute the Mostar index of a graph.
- multi_
edge_ ratio - Compute the multi-edge ratio of the graph.
- multiplicative_
abc - Compute the multiplicative atom-bond connectivity index.
- multiplicative_
ga - Compute the multiplicative geometric-arithmetic index.
- multiplicative_
randic - Compute the multiplicative Randić index.
- multiplicative_
sum_ connectivity - Compute the multiplicative sum-connectivity index.
- multiplicatively_
weighted_ harary - Compute the multiplicatively weighted Harary index.
- narumi_
katayama_ index - Compute the Narumi-Katayama index.
- natural_
connectivity - Compute the natural connectivity of a graph.
- nearest_
neighbor_ graph - Build the k-nearest-neighbor graph of a point set.
- neighbor_
aggregate - Aggregate a signal over each vertex’s neighborhood.
- neighbor_
degree_ disparity - Compute the average neighbor degree ratio.
- neighbor_
sample - Sample k-hop neighborhoods around seed vertices.
- neighbor_
sample_ weighted - Sample k-hop neighborhoods with importance-weighted sampling.
- neighborhood
- k-hop neighbourhood vertex list for every vertex (
mode = All,mindist = 0). - neighborhood_
forgotten_ index - Compute the neighborhood forgotten index.
- neighborhood_
graphs - Per-vertex induced subgraphs of k-hop neighbourhoods (
mode = All,mindist = 0). - neighborhood_
graphs_ with_ mode - Per-vertex induced subgraphs of k-hop neighbourhoods with full mode control.
- neighborhood_
size - k-hop neighbourhood size for every vertex (
mode = All,mindist = 0). - neighborhood_
size_ with_ mode - Full mode-aware k-hop neighbourhood size with
mindistfilter. - neighborhood_
with_ mode - Full mode-aware k-hop neighbourhood vertex list with
mindistfilter. - nirmala_
index - Compute the Nirmala index.
- node_
homophily - Node homophily ratio: average proportion of same-label neighbors.
- normalized_
algebraic_ connectivity - Compute the normalized algebraic connectivity
μ_2(L_norm). - normalized_
cut - Compute the normalized cut (
NCut) of a partition. - normalized_
dirichlet_ energy - Compute the normalized Dirichlet energy (Rayleigh quotient form).
- normalized_
laplacian_ spectrum - Compute the normalized Laplacian spectrum, sorted ascending.
- ollivier_
ricci_ curvature - Ollivier-Ricci curvature for each edge (lazy random walk variant).
- pagerank
PageRankscores via power iteration with damping0.85.- pagerank_
linsys PageRankvia GMRES on(I - α · Mᵀ) · pr = (1 - α)/N · 1.- pagerank_
weighted - Weighted
PageRankscores via power iteration with damping0.85. - path_
length_ hist - Compute a histogram of all shortest-path lengths.
- pendant_
edge_ ratio - Compute the pendant edge ratio.
- permute_
vertices - Creates a new graph with vertices permuted according to the given mapping.
- personalized_
pagerank - Personalized
PageRankscores via power iteration. - personalized_
pagerank_ default - Personalized
PageRankwith default damping factor (0.85). - personalized_
pagerank_ vs - Personalized
PageRankwith a vertex-set reset distribution. - pi_
index - Compute the Padmakar-Ivan (PI) index of a graph.
- platt_
index - Compute the Platt index (sum of edge degrees).
- power_
law_ fit - Fit a power-law distribution to a sample of numbers.
- ppr_
diffuse - Diffuse a signal using Personalized
PageRankpropagation. - pseudo_
diameter - Approximate the diameter of a graph using pseudo-peripheral vertex search.
- radius
- Radius of
graph— the minimum vertex eccentricity.Nonefor a graph with no vertices (matches upstream’sIGRAPH_NANfor the null graph). - radius_
weighted - OUT-mode default for
radius_weighted_with_mode. - radius_
weighted_ with_ mode - Mode-aware weighted radius.
Noneforvcount == 0. - radius_
with_ mode - Radius of
graphunder the givenmode.Noneforvcount == 0. - randic_
entropy - Compute the Randić entropy.
- randic_
index - Compute the Randić connectivity index.
- random_
sample - Generate an increasing random sequence of integers from
[l, h]. - random_
spanning_ tree - Uniformly sample a random spanning tree (or forest) of a graph.
- random_
walk - Random walk on
graphstarting atstart, taking up tostepstransitions. - random_
walk_ node2vec - Performs a second-order biased random walk (
Node2Vec) starting atstartfor up tostepstransitions. - random_
walks - Generate multiple random walks from every vertex in the graph.
- random_
walks_ from - Generate random walks from a specific set of starting vertices.
- random_
walks_ node2vec - Generate multiple
Node2Vecrandom walks from every vertex. - ratio_
cut - Compute the ratio cut of a partition.
- reachability
- Compute per-component reachability bitsets.
- reachability_
matrix - Dense reachability matrix of
graph.result[i][j]istrueiff vertexjis reachable fromiin zero or more steps. - read_
dimacs - Read a graph from DIMACS flow/edge format.
- read_dl
- Read a graph from UCINET DL format.
- read_
dot - Read a graph from DOT (Graphviz) format.
- read_
edgelist - Read an edge list from any
Readinto a freshGraph. - read_
gml - Read a graph from GML format.
- read_
graphdb - Read a graph from
GraphDBbinary format. - read_
graphml - Read a graph from
GraphMLformat. - read_
leda - Read a graph from LEDA native graph format.
- read_
lgl - Read a graph from LGL (
.lgl) format. - read_
ncol - Read a graph from NCOL (
.ncol) format. - read_
pajek - Read a graph from Pajek (
.net) format. - reciprocal_
degree_ distance - Compute the reciprocal degree distance (additively weighted Harary index).
- reciprocal_
randic_ index - Compute the reciprocal Randić index.
- reciprocal_
transmission_ index - Compute the reciprocal transmission index.
- reciprocity
- Reciprocity of
graph. ReturnsNonefor graphs with no edges (matches upstream’sIGRAPH_NAN). - reciprocity_
ratio - Compute the reciprocity ratio of the graph.
- reciprocity_
with_ mode - Reciprocity with explicit mode +
ignore_loops(ALGO-PR-004b). - reduced_
first_ zagreb - Compute the reduced first Zagreb index.
- reduced_
forgotten_ index - Compute the reduced forgotten index.
- reduced_
reciprocal_ randic - Compute the reduced reciprocal Randić index.
- reduced_
second_ zagreb - Compute the reduced second Zagreb index.
- reduced_
sombor_ index - Compute the reduced Sombor index.
- reduced_
sum_ connectivity - Compute the reduced sum-connectivity index.
- regularity
- Return the regularity degree of the graph, or
Noneif the graph is not regular. - reindex_
membership - Relabel a membership vector so cluster ids run contiguously over
0..k, wherekis the number of distinct clusters. The partition is unchanged: two vertices share a cluster in the output iff they shared one in the input. New ids are assigned in first-occurrence order — the first cluster id you encounter when sweeping left to right becomes0, the next new one becomes1, and so on. - relative_
neighborhood_ graph - Build the relative neighborhood graph of a point set.
- residual_
graph - Compute the residual graph given capacity and flow vectors.
- resistance_
centrality - Compute resistance centrality for all vertices.
- reverse
- Returns a new graph with all edge directions reversed.
- reverse_
edges - Returns a new graph with only the specified edges reversed.
- reverse_
residual_ graph - Compute the reverse-residual graph given capacity and flow vectors.
- revised_
szeged_ index - Compute the revised Szeged index of a graph.
- rewire
- Randomly rewires a graph while preserving its degree sequence.
- rewire_
directed_ edges - Rewires one endpoint of directed edges with constant probability.
- rewire_
edges - Rewires graph edges with constant probability.
- rich_
club_ density - Compute the rich club density.
- rich_
club_ sequence - Per-vertex rich-club coefficient sequence for
graph. - rooted_
product - Computes the rooted product of two graphs.
- roots_
for_ tree_ layout - Choose “nice” roots for a tree layout.
- running_
mean - Compute the running mean of a data vector.
- rwpe
- Compute Random Walk Positional Encoding for all vertices.
- rwpe_
vertices - Compute RWPE only for specified vertices (more efficient for batches).
- sample_
dirichlet - Sample points from a Dirichlet distribution.
- sample_
sphere_ surface - Sample points uniformly from the surface of a sphere.
- sample_
sphere_ volume - Sample points uniformly from the volume of a sphere.
- satisfies_
dirac - Check whether a graph satisfies Dirac’s condition.
- satisfies_
ore - Check whether a graph satisfies Ore’s condition.
- schultz_
index - Compute the Schultz index (degree-distance index).
- second_
ev_ degree_ zagreb - Compute the second ev-degree Zagreb index.
- second_
gourava_ index - Compute the second Gourava index.
- second_
hyper_ zagreb - Compute the second hyper-Zagreb index.
- second_
hyper_ zagreb_ coindex - Compute the second hyper-Zagreb coindex.
- second_
inverse_ nirmala - Compute the second inverse Nirmala index.
- second_
leap_ zagreb - Compute the second leap Zagreb index.
- second_
multiplicative_ zagreb - Compute the second multiplicative Zagreb index.
- second_
neighborhood_ zagreb - Compute the second neighborhood Zagreb index.
- second_
reformulated_ zagreb - Compute the second reformulated Zagreb index.
- second_
transmission_ zagreb - Compute the second transmission Zagreb index.
- second_
ve_ degree_ zagreb - Compute the second ve-degree Zagreb index.
- second_
zagreb_ coindex - Compute the second Zagreb coindex.
- second_
zagreb_ connection - Compute the second Zagreb connection index.
- second_
zagreb_ entropy - Compute the second Zagreb entropy.
- second_
zagreb_ index - Compute the second Zagreb index
M₂(G) = Σ_{(u,v)∈E} deg(u)·deg(v). - self_
loop_ ratio - Compute the self-loop ratio of the graph.
- sigma_
coindex - Compute the sigma coindex.
- sigma_
index - Compute the sigma index (Gutman irregularity).
- signless_
laplacian_ energy - Compute the signless Laplacian energy.
- signless_
laplacian_ smallest - Compute the smallest signless Laplacian eigenvalue
q_1(Q). - signless_
laplacian_ spectral_ radius - Compute the signless Laplacian spectral radius
q_n(Q). - signless_
laplacian_ spectrum - Compute the signless Laplacian spectrum, sorted ascending.
- similarity_
dice - Compute the full Dice similarity matrix for all vertex pairs.
- similarity_
dice_ es - Computes Dice similarity coefficients for pairs of vertices connected by the given edges.
- similarity_
dice_ pairs - Computes Dice similarity coefficients for given vertex pairs.
- similarity_
inverse_ log_ weighted - Compute the full inverse-log-weighted (Adamic-Adar) similarity matrix.
- similarity_
inverse_ log_ weighted_ pairs - Computes the inverse log-weighted (Adamic-Adar) similarity for given vertex pairs.
- similarity_
jaccard - Compute the full Jaccard similarity matrix for all vertex pairs.
- similarity_
jaccard_ es - Computes Jaccard similarity coefficients for pairs of vertices connected by the given edges.
- similarity_
jaccard_ pairs - Computes Jaccard similarity coefficients for given vertex pairs.
- simplify
- Return a copy of
graphwith self-loops and/or parallel edges removed. - simplify_
and_ colorize - Build a vertex- and edge-colored simple graph from
graph. - site_
percolation - Site percolation: the size of the largest component as vertices
(sites) of
graphare activated in the order specified byvertex_order. - smoothness_
ratio - Compute the smoothness ratio of a signal on a graph.
- sombor_
coindex - Compute the Sombor coindex.
- sombor_
index - Compute the Sombor index.
- sort_
vertices_ by_ degree - Return vertex IDs sorted by their degree.
- spanner
- Compute a t-spanner of the graph.
- spanning_
tree_ count - Count the number of spanning trees using Kirchhoff’s theorem.
- spatial_
edge_ lengths - Compute edge lengths from spatial vertex coordinates.
- spectral_
bisection - Compute a spectral bisection of the graph.
- spectral_
gap - Compute the spectral gap of a graph.
- spectral_
gap_ ratio - Compute the spectral gap ratio
μ_2 / μ_n. - spectral_
radius - Compute the spectral radius of a graph.
- spinglass
- Spinglass community detection with default options.
- spinglass_
weighted - Spinglass community detection with edge weights.
- spinglass_
with_ options - Spinglass community detection with full options.
- split_
join_ distance - Compute the two asymmetric projection distances between
comm1andcomm2. - square_
clustering_ ratio - Compute the square clustering ratio.
- square_
density - Compute the square (4-cycle) density of the graph.
- st_
edge_ connectivity - Edge connectivity between two vertices: the minimum number of edges
whose removal disconnects
sourcefromtarget. - st_
mincut - Full s-t minimum-cut: scalar value, the cut edge list, and the source-side / sink-side vertex partitions.
- st_
mincut_ value - Scalar s-t minimum-cut value (capacity of the minimum edge set
whose removal disconnects
sourcefromtarget). - st_
vertex_ connectivity - Vertex connectivity between two vertices.
- strength
- Weighted vertex degree for all vertices.
- strength_
with_ mode - Weighted vertex degree with direction mode and loop control.
- strong_
product - Computes the strong product of two graphs.
- strongly_
connected_ components - Compute the strongly connected components of
graph. - structural_
feature_ vectors - Compute structural feature vectors for all vertices.
- subcomponent
- Returns all vertices reachable from
sourcefollowing edges in the specifiedmode. - subgraph_
centrality - Compute subgraph centrality for all vertices.
- subgraph_
from_ edges - Create a subgraph containing only the specified edges.
- subisomorphic
- Decide whether
graph2is isomorphic to a subgraph ofgraph1. - subisomorphic_
lad - Decide whether
patternis isomorphic to a subgraph oftargetusing the LAD algorithm, returning the first embedding found. - subisomorphic_
vf2 - Test whether the pattern
graph2is a (non-induced) subgraph of the targetgraph1, using the VF2 algorithm. - sum_
connectivity_ index - Compute the sum-connectivity index.
- symmetric_
degree_ ratio - Compute the symmetric degree ratio index.
- symmetric_
diffuse - Diffuse a signal using symmetric normalized propagation.
- symmetric_
division_ deg_ index - Compute the symmetric division deg index.
- szeged_
index - Compute the Szeged index of a graph.
- tensor_
product - Computes the tensor (categorical/direct) product of two graphs.
- terminal_
wiener_ index - Compute the terminal Wiener index.
- third_
leap_ zagreb - Compute the third leap Zagreb index.
- third_
zagreb_ index - Compute the third Zagreb index.
- to_
directed - Converts an undirected graph to a directed graph.
- to_
undirected - Converts a directed graph to an undirected graph.
- topological_
sorting - Returns a topological ordering of
graph’s vertices. - total_
eccentricity - Compute the total eccentricity.
- total_
irregularity - Compute the total irregularity.
- total_
variation - Compute the total variation of a signal on a graph.
- transitive_
closure - Transitive closure of
graph. The returned graph shares the same vertex count and direction as the input. - transitivity_
avglocal_ undirected - Average local transitivity (clustering coefficient).
- transitivity_
barrat - Barrat’s weighted local transitivity, per vertex.
- transitivity_
gap - Compute the transitivity gap.
- transitivity_
local_ undirected - Local transitivity (clustering coefficient) per vertex.
- transitivity_
undirected - Global transitivity (clustering coefficient) of
graph—3 * triangles / connected_triples. ReturnsNonewhen there are no connected triples (matches upstream’sIGRAPH_TRANSITIVITY_NANmode); use.unwrap_or(0.0)for theIGRAPH_TRANSITIVITY_ZERObehaviour. - transmission_
ratio - Compute the transmission ratio.
- treewidth_
min_ fill - Compute an upper bound on treewidth via min-fill elimination.
- treewidth_
upper_ bound - Compute an upper bound on treewidth via min-degree elimination.
- triangle_
density - Compute the triangle density of the graph.
- triangle_
participation - Compute the triangle participation ratio.
- trussness
- Compute the trussness of every edge in an undirected graph.
- umap_
compute_ weights - Compute UMAP weights from edge distances.
- unfold_
tree - Unfold a graph into a tree by BFS, replicating multiply-visited vertices.
- union
- Returns the union of
leftandright. - union_
many - Returns the union of multiple graphs.
- variable_
first_ zagreb - Compute the variable first Zagreb index.
- variable_
sum_ exdeg - Compute the variable sum exdeg index.
- vertex_
conn_ ratio - Compute the vertex connectivity ratio.
- vertex_
connectivity - Vertex connectivity (cohesion) of a graph.
- vertex_
connectivity_ ratio - Compute the vertex connectivity ratio.
- vertex_
disjoint_ paths - Maximum number of pairwise internally vertex-disjoint paths from
sourcetotarget. - vertex_
path_ from_ edge_ path - Convert an edge path to a vertex path.
- vertex_
resilience - Compute vertex resilience
κ(G) / n. - von_
neumann_ entropy - Approximate Von Neumann entropy of the graph.
- voronoi
- Voronoi partitioning of a graph from a set of generator vertices.
- walk_
entropy - Compute the walk entropy of the graph.
- walk_
regularity - Compute the walk regularity index of the graph.
- walktrap
- Run Walktrap on an unweighted, undirected graph with default
steps = 4. - walktrap_
weighted - Run Walktrap on a weighted, undirected graph with default
steps = 4. - walktrap_
with_ options - Run Walktrap with a custom
WalktrapOptions. - widest_
path - Widest path from
fromtoto: returns the vertex sequence and the edge sequence along the widest (maximum-bottleneck) path. - widest_
path_ widths - Single-source widest-path widths on
graphfromsource, following out-edges on directed graphs. - widest_
path_ widths_ floyd_ warshall - All-pairs widest-path widths via the Floyd-Warshall recurrence.
- widest_
path_ widths_ floyd_ warshall_ with_ mode - Mode-aware variant of
widest_path_widths_floyd_warshall. Mode selects how directed edges contribute to the adjacency matrix: - widest_
path_ widths_ with_ mode - Widest-path widths with directed-mode selection. Mirrors
widest_path_widthsbut lets you choose OUT/IN/ALL traversal for directed graphs (ignored on undirected). - widest_
path_ with_ mode - Widest path with mode selection. Mirrors
widest_pathbut lets you pick OUT/IN/ALL traversal on directed graphs. - widest_
paths - Single-source widest-paths sidecar: widths plus the parent-pointer SPT. Convenient when you want all of widths, parent vertices, and inbound edge ids in one call without re-running the SPT.
- widest_
paths_ to - Widest paths from a single source to multiple targets. Returns
one
WidestPathResultper element oftargets, in the same order;Nonemeans the target is unreachable fromfrom. - widest_
paths_ to_ with_ mode - Mode-aware variant of
widest_paths_to. - widest_
paths_ with_ mode - Mode-aware variant of
widest_paths. - wiener_
index - Compute the Wiener index of a connected graph.
- wiener_
polarity_ index - Compute the Wiener polarity index of a graph.
- wl_hash
- Compute the Weisfeiler-Lehman hash of a graph.
- wl_
hash_ iterations - Compute WL hashes at each iteration level (subtree patterns of depth 0..k).
- wl_
isomorphic - Check if two graphs have equal WL hash (necessary but not sufficient for isomorphism).
- write_
dimacs_ flow - Write a graph in DIMACS max-flow format.
- write_
dl - Write a graph in UCINET DL edgelist1 format.
- write_
dot - Write a graph in DOT (Graphviz) format.
- write_
edgelist - Write a graph as an edge list.
- write_
gml - Write a graph in GML format, including attributes.
- write_
graphml - Write a graph in
GraphMLformat, including attributes. - write_
leda - Write a graph in LEDA native graph format.
- write_
lgl - Write a graph in LGL format.
- write_
ncol - Write a graph in NCOL format.
- write_
pajek - Write a graph in Pajek (
.net) format.
Type Aliases§
- Astar
Heuristic - A heuristic estimating the distance from a candidate vertex (first argument) to the target vertex (second argument). Must be admissible (never overestimate the true remaining distance) for the result to be a true shortest path.
- Bellman
Ford Path Entry - One entry in the result of
bellman_ford_paths:Some((vertices, edges))if the target is reachable,Noneotherwise. - Edge
Iter - Iterator over graph edges as
(from, to)pairs. - Igraph
Result - Convenience alias for
Result<T, IgraphError>. - Mincut
- Result of the global minimum cut computation.
- Node2
VecWalk Result - Result of a
Node2Vecrandom walk: the vertex chain and the edge chain. - Vertex
Id - Vertex id. The Phase-0 ADR-0007 fixes this to
u32;Option<VertexId>is the idiomatic “no vertex” sentinel (igraph C uses-1). - Widest
Path Result - One entry of
widest_paths_to’s output:Some((vertices, edges))for a reachable target,Nonefor unreachable. Each vertex chain begins with the source and ends with the target; each edge chain has length one less.