Skip to main content

rust_igraph/
lib.rs

1//! # rust-igraph
2//!
3//! **Pure-Rust, high-performance graph and network analysis library.**
4//!
5//! A faithful port of [igraph](https://igraph.org) with 400+ public APIs,
6//! zero `unsafe`, and no C/C++ FFI. Built for researchers, data scientists,
7//! and systems engineers who need production-grade graph algorithms in the
8//! Rust ecosystem.
9//!
10//! ## Feature overview
11//!
12//! | Category | Highlights |
13//! |----------|-----------|
14//! | **Traversal** | BFS, DFS, topological sort, random walks |
15//! | **Shortest paths** | Dijkstra, Bellman-Ford, A\*, all-pairs |
16//! | **Centrality** | betweenness, closeness, eigenvector, `PageRank`, HITS |
17//! | **Community** | Louvain, Leiden, label propagation, Walktrap, fast greedy |
18//! | **Connectivity** | components, articulation points, bridges, separators |
19//! | **Flow** | max-flow, min-cut, Gomory-Hu tree, disjoint paths |
20//! | **Isomorphism** | VF2, LAD, BLISS canonical labeling |
21//! | **Generators** | Erdos-Renyi, Barabasi-Albert, SBM, lattices, 30+ more |
22//! | **Properties** | 60+ structural recognizers, degree stats, transitivity |
23//! | **Eigenvalues** | Lanczos (symmetric), Arnoldi (general), adjacency |
24//! | **Layout** | Fruchterman-Reingold, Kamada-Kawai, `DrL`, circle, tree |
25//!
26//! ## Quick start
27//!
28//! ```
29//! use rust_igraph::{Graph, bfs};
30//!
31//! let mut g = Graph::with_vertices(4);
32//! g.add_edge(0, 1).unwrap();
33//! g.add_edge(0, 2).unwrap();
34//! g.add_edge(1, 3).unwrap();
35//!
36//! let order = bfs(&g, 0).unwrap();
37//! assert_eq!(order, vec![0, 1, 2, 3]);
38//! ```
39//!
40//! ## Import style
41//!
42//! All algorithms are re-exported at the crate root for convenience:
43//!
44//! ```rust,no_run
45//! use rust_igraph::{Graph, pagerank, betweenness, louvain};
46//! ```
47//!
48//! For minimal imports, use the [`prelude`] module:
49//!
50//! ```rust,no_run
51//! use rust_igraph::prelude::*;
52//! ```
53//!
54//! ## License
55//!
56//! GPL-2.0-or-later, matching upstream igraph.
57
58pub mod algorithms;
59pub(crate) mod core;
60pub mod prelude;
61
62// Top-level re-exports for the common case.
63// IMPORTANT: when a function name collides with the file/module it
64// lives in (e.g. `is_simple` in `is_simple.rs`), `pub use
65// crate::algorithms::properties::is_simple` resolves ambiguously to
66// **both** the module and the function, and rustdoc renders the
67// re-export twice on the crate-root page. To suppress that, every
68// re-export below points at the inner module path explicitly so the
69// resolution is unambiguously the function. The submodules
70// themselves are `pub(crate)` (see each algorithm-group `mod.rs`),
71// so the deep paths stay crate-internal at the type-checker level
72// while rustdoc only renders the function entry.
73pub use crate::algorithms::chordality::{
74    ChordalResult, McsResult, is_chordal, maximum_cardinality_search,
75};
76pub use crate::algorithms::cliques::{
77    clique_number, clique_size_hist, cliques, independence_number, independent_vertex_sets,
78    largest_cliques, largest_independent_vertex_sets, largest_weighted_cliques, maximal_cliques,
79    maximal_cliques_count, maximal_cliques_hist, maximal_cliques_subset,
80    maximal_independent_vertex_sets, weighted_clique_number, weighted_cliques,
81};
82pub use crate::algorithms::coloring::{
83    BipartiteColoringResult, BipartiteEdgeDirection, GreedyColoringHeuristic,
84    chromatic_number_upper_bound, edge_chromatic_number, edge_coloring_greedy,
85    is_bipartite_coloring, is_edge_coloring, is_vertex_coloring, vertex_chromatic_number,
86    vertex_coloring_greedy,
87};
88pub use crate::algorithms::community::community_to_membership::{
89    CommunityToMembershipResult, community_to_membership, le_community_to_membership,
90};
91pub use crate::algorithms::community::community_voronoi::{
92    CommunityVoronoiResult, community_voronoi,
93};
94pub use crate::algorithms::community::compare_communities::{
95    CommunityComparison, compare_communities,
96};
97pub use crate::algorithms::community::edge_betweenness_community::{
98    EdgeBetweennessResult, edge_betweenness_community,
99};
100pub use crate::algorithms::community::edge_betweenness_community_weighted::edge_betweenness_community_weighted;
101pub use crate::algorithms::community::fast_greedy_modularity::{
102    FastGreedyResult, fast_greedy_modularity, fast_greedy_modularity_weighted,
103};
104pub use crate::algorithms::community::fluid_communities::{
105    FLUID_DEFAULT_MAX_ITERATIONS, FluidOptions, FluidResult, fluid_communities,
106    fluid_communities_with_options,
107};
108pub use crate::algorithms::community::label_propagation::{
109    LpaOptions, LpaResult, LpaVariant, label_propagation, label_propagation_weighted,
110    label_propagation_with_options,
111};
112pub use crate::algorithms::community::leading_eigenvector::{
113    LeadingEigenvectorResult, leading_eigenvector, leading_eigenvector_weighted,
114};
115pub use crate::algorithms::community::leiden::{
116    LEIDEN_DEFAULT_BETA, LEIDEN_DEFAULT_ITERATIONS, LeidenObjective, LeidenOptions, LeidenResult,
117    leiden, leiden_weighted, leiden_with_options,
118};
119pub use crate::algorithms::community::louvain::{
120    LouvainResult, louvain, louvain_weighted, louvain_with_options,
121};
122pub use crate::algorithms::community::modularity::{
123    modularity, modularity_directed, modularity_weighted, modularity_weighted_directed,
124};
125pub use crate::algorithms::community::modularity_matrix::modularity_matrix;
126pub use crate::algorithms::community::reindex_membership::{
127    ReindexMembershipResult, reindex_membership,
128};
129pub use crate::algorithms::community::split_join_distance::{
130    SplitJoinDistance, split_join_distance,
131};
132pub use crate::algorithms::community::walktrap::{
133    WALKTRAP_DEFAULT_STEPS, WalktrapOptions, WalktrapResult, walktrap, walktrap_weighted,
134    walktrap_with_options,
135};
136pub use crate::algorithms::connectivity::articulation::articulation_points;
137pub use crate::algorithms::connectivity::biconnected::{
138    BiconnectedComponents, biconnected_components,
139};
140pub use crate::algorithms::connectivity::bridges::bridges;
141pub use crate::algorithms::connectivity::cohesive_blocks::{CohesiveBlocks, cohesive_blocks};
142pub use crate::algorithms::connectivity::components::{ConnectedComponents, connected_components};
143pub use crate::algorithms::connectivity::decompose::decompose;
144pub use crate::algorithms::connectivity::is_biconnected::is_biconnected;
145pub use crate::algorithms::connectivity::is_connected::{ConnectednessMode, is_connected};
146pub use crate::algorithms::connectivity::percolation::{
147    EdgelistPercolation, SitePercolation, bond_percolation, edgelist_percolation, site_percolation,
148};
149pub use crate::algorithms::connectivity::reachability::count_reachable;
150pub use crate::algorithms::connectivity::reachability_matrix::reachability_matrix;
151pub use crate::algorithms::connectivity::reachability_scc::{
152    ReachabilityMode, ReachabilityResult, reachability,
153};
154pub use crate::algorithms::connectivity::separators::{
155    all_minimal_st_separators, is_minimal_separator, is_separator, minimum_size_separators,
156};
157pub use crate::algorithms::connectivity::strong::strongly_connected_components;
158pub use crate::algorithms::connectivity::subcomponent::{SubcomponentMode, subcomponent};
159pub use crate::algorithms::connectivity::transitive_closure::transitive_closure;
160pub use crate::algorithms::constructors::adjacency::{AdjacencyMode, LoopsMode, adjacency};
161pub use crate::algorithms::constructors::atlas::{ATLAS_SIZE, atlas};
162pub use crate::algorithms::constructors::biadjacency::{BiadjacencyResult, biadjacency};
163pub use crate::algorithms::constructors::circulant::circulant;
164pub use crate::algorithms::constructors::create::create;
165pub use crate::algorithms::constructors::create_bipartite::create_bipartite;
166pub use crate::algorithms::constructors::de_bruijn::de_bruijn;
167pub use crate::algorithms::constructors::extended_chordal_ring::extended_chordal_ring;
168pub use crate::algorithms::constructors::famous::{famous, famous_names};
169pub use crate::algorithms::constructors::full::full_graph;
170pub use crate::algorithms::constructors::full_bipartite::{FullBipartite, full_bipartite};
171pub use crate::algorithms::constructors::full_citation::full_citation;
172pub use crate::algorithms::constructors::full_multipartite::{
173    FullMultipartite, MultipartiteMode, full_multipartite,
174};
175pub use crate::algorithms::constructors::generalized_petersen::generalized_petersen;
176pub use crate::algorithms::constructors::hamming::hamming;
177pub use crate::algorithms::constructors::hexagonal_lattice::hexagonal_lattice;
178pub use crate::algorithms::constructors::hypercube::{MAX_HYPERCUBE_DIMENSION, hypercube};
179pub use crate::algorithms::constructors::kary_tree::{TreeMode, kary_tree};
180pub use crate::algorithms::constructors::kautz::kautz;
181pub use crate::algorithms::constructors::lcf::lcf;
182pub use crate::algorithms::constructors::linegraph::linegraph;
183pub use crate::algorithms::constructors::mycielskian::{mycielski_graph, mycielskian};
184pub use crate::algorithms::constructors::prufer::{from_prufer, to_prufer};
185pub use crate::algorithms::constructors::realize_bipartite_degree_sequence::realize_bipartite_degree_sequence;
186pub use crate::algorithms::constructors::realize_degree_sequence::{
187    RealizeDegseqMethod, realize_degree_sequence,
188};
189pub use crate::algorithms::constructors::realize_directed_degree_sequence::realize_directed_degree_sequence;
190pub use crate::algorithms::constructors::regular_tree::regular_tree;
191pub use crate::algorithms::constructors::ring::{cycle_graph, path_graph, ring_graph};
192pub use crate::algorithms::constructors::square_lattice::square_lattice;
193pub use crate::algorithms::constructors::star::{StarMode, star_graph};
194pub use crate::algorithms::constructors::symmetric_tree::symmetric_tree;
195pub use crate::algorithms::constructors::tree_from_parent_vector::tree_from_parent_vector;
196pub use crate::algorithms::constructors::triangular_lattice::triangular_lattice;
197pub use crate::algorithms::constructors::turan::turan;
198pub use crate::algorithms::constructors::weighted_adjacency::weighted_adjacency;
199pub use crate::algorithms::constructors::weighted_biadjacency::{
200    WeightedBiadjacencyResult, weighted_biadjacency,
201};
202pub use crate::algorithms::constructors::wheel::{WheelMode, wheel_graph};
203pub use crate::algorithms::cycles::{CycleMode, CycleResult, find_cycle};
204pub use crate::algorithms::dominating_set::{is_dominating_set, minimum_dominating_set};
205pub use crate::algorithms::edge_cover::{is_edge_cover, minimum_edge_cover};
206pub use crate::algorithms::eigen::adjacency::eigen_adjacency;
207pub use crate::algorithms::eigen::general::{
208    GeneralEigenDecomposition, GeneralEigenWhich, eigen_matrix,
209};
210pub use crate::algorithms::eigen::symmetric::{
211    EigenDecomposition, EigenWhich, eigen_matrix_symmetric,
212};
213pub use crate::algorithms::embedding::adjacency_spectral_embedding::{
214    AdjacencySpectralEmbeddingResult, SpectralWhich, adjacency_spectral_embedding,
215};
216pub use crate::algorithms::embedding::dim_select::dim_select;
217pub use crate::algorithms::embedding::laplacian_spectral_embedding::{
218    LaplacianSpectralEmbeddingResult, LaplacianType, laplacian_spectral_embedding,
219};
220pub use crate::algorithms::epidemics::{Sir, sir};
221pub use crate::algorithms::feedback_arc_set::{FasAlgorithm, feedback_arc_set};
222pub use crate::algorithms::feedback_vertex_set::{FvsAlgorithm, feedback_vertex_set};
223pub use crate::algorithms::flow::all_st_cuts::{StCuts, all_st_cuts};
224pub use crate::algorithms::flow::all_st_mincuts::{StMinCuts, all_st_mincuts};
225pub use crate::algorithms::flow::dominator_tree::{DominatorMode, DominatorTree, dominator_tree};
226pub use crate::algorithms::flow::edge_connectivity::{adhesion, edge_connectivity};
227pub use crate::algorithms::flow::edge_disjoint_paths::edge_disjoint_paths;
228pub use crate::algorithms::flow::gomory_hu_tree::{GomoryHuTree, gomory_hu_tree};
229pub use crate::algorithms::flow::max_flow::{MaxFlow, max_flow, max_flow_value};
230pub use crate::algorithms::flow::mincut::{Mincut, mincut};
231pub use crate::algorithms::flow::mincut_value::mincut_value;
232pub use crate::algorithms::flow::st_edge_connectivity::st_edge_connectivity;
233pub use crate::algorithms::flow::st_mincut::{StMincut, st_mincut, st_mincut_value};
234pub use crate::algorithms::flow::st_vertex_connectivity::{VconnNei, st_vertex_connectivity};
235pub use crate::algorithms::flow::vertex_connectivity::{cohesion, vertex_connectivity};
236pub use crate::algorithms::flow::vertex_disjoint_paths::vertex_disjoint_paths;
237pub use crate::algorithms::fundamental_cycles::fundamental_cycles;
238pub use crate::algorithms::games::barabasi::barabasi_game_bag;
239pub use crate::algorithms::games::barabasi_aging::barabasi_aging_game;
240pub use crate::algorithms::games::barabasi_psumtree::{
241    barabasi_game_psumtree, barabasi_game_psumtree_multiple,
242};
243pub use crate::algorithms::games::bipartite::{
244    BipartiteGraph, BipartiteMode, bipartite_game_gnm, bipartite_game_gnp, bipartite_iea_game,
245};
246pub use crate::algorithms::games::callaway_traits::callaway_traits_game;
247pub use crate::algorithms::games::chung_lu::{ChungLuVariant, chung_lu_game};
248pub use crate::algorithms::games::cited_type::cited_type_game;
249pub use crate::algorithms::games::citing_cited_type::citing_cited_type_game;
250pub use crate::algorithms::games::correlated::{correlated_game, correlated_pair_game};
251pub use crate::algorithms::games::degree_sequence::degree_sequence_game_configuration;
252pub use crate::algorithms::games::degree_sequence_configuration_simple::degree_sequence_game_configuration_simple;
253pub use crate::algorithms::games::degree_sequence_fast_heur::degree_sequence_game_fast_heur_simple;
254pub use crate::algorithms::games::degree_sequence_vl::degree_sequence_game_vl;
255pub use crate::algorithms::games::dotproduct::{
256    DotProductWarnings, dot_product_game, dot_product_game_with_warnings,
257};
258pub use crate::algorithms::games::edge_switching_simple::degree_sequence_game_edge_switching_simple;
259pub use crate::algorithms::games::erdos_renyi::{erdos_renyi_gnm, erdos_renyi_gnp};
260pub use crate::algorithms::games::establishment::establishment_game;
261pub use crate::algorithms::games::forestfire::forest_fire_game;
262pub use crate::algorithms::games::grg::{grg_game, grg_game_with_coords};
263pub use crate::algorithms::games::growing_random::growing_random_game;
264pub use crate::algorithms::games::hsbm::{hsbm_game, hsbm_list_game};
265pub use crate::algorithms::games::iea_game::iea_game;
266pub use crate::algorithms::games::islands::simple_interconnected_islands_game;
267pub use crate::algorithms::games::k_regular::k_regular_game;
268pub use crate::algorithms::games::lastcit::lastcit_game;
269pub use crate::algorithms::games::preference::{asymmetric_preference_game, preference_game};
270pub use crate::algorithms::games::recent_degree::recent_degree_game;
271pub use crate::algorithms::games::recent_degree_aging::recent_degree_aging_game;
272pub use crate::algorithms::games::sbm::sbm_game;
273pub use crate::algorithms::games::static_fitness::{static_fitness_game, static_power_law_game};
274pub use crate::algorithms::games::tree::{tree_game_lerw, tree_game_prufer};
275pub use crate::algorithms::games::watts::watts_strogatz_game;
276pub use crate::algorithms::graphlets::{
277    GraphletBasis, GraphletDecomposition, graphlets, graphlets_candidate_basis, graphlets_project,
278};
279pub use crate::algorithms::independent_set::maximum_independent_set;
280pub use crate::algorithms::io::dimacs::{
281    DimacsGraph, DimacsProblem, read_dimacs, write_dimacs_flow,
282};
283pub use crate::algorithms::io::dl::{DlGraph, read_dl};
284pub use crate::algorithms::io::dot::write_dot;
285pub use crate::algorithms::io::edgelist::{read_edgelist, write_edgelist};
286pub use crate::algorithms::io::gml::{read_gml, write_gml};
287pub use crate::algorithms::io::graphdb::read_graphdb;
288pub use crate::algorithms::io::graphml::write_graphml;
289pub use crate::algorithms::io::leda::write_leda;
290pub use crate::algorithms::io::lgl::{LglGraph, read_lgl, write_lgl};
291pub use crate::algorithms::io::ncol::{NcolGraph, read_ncol, write_ncol};
292pub use crate::algorithms::io::pajek::{PajekGraph, read_pajek, write_pajek};
293pub use crate::algorithms::isomorphism::canonical::automorphism_group::automorphism_group;
294pub use crate::algorithms::isomorphism::canonical::canonical_permutation::canonical_permutation;
295pub use crate::algorithms::isomorphism::canonical::count_automorphisms::count_automorphisms;
296pub use crate::algorithms::isomorphism::canonical::isomorphic_bliss::isomorphic_bliss;
297pub use crate::algorithms::isomorphism::lad::{
298    LadSubisomorphism, get_subisomorphisms_lad, subisomorphic_lad,
299};
300pub use crate::algorithms::isomorphism::queries::{isomorphic, subisomorphic};
301pub use crate::algorithms::isomorphism::simplify_and_colorize::{
302    SimplifyAndColorize, simplify_and_colorize,
303};
304pub use crate::algorithms::isomorphism::subiso::{
305    Vf2Subisomorphism, count_subisomorphisms_vf2, get_subisomorphisms_vf2, subisomorphic_vf2,
306};
307pub use crate::algorithms::isomorphism::vf2::{
308    Vf2Isomorphism, count_isomorphisms_vf2, get_isomorphisms_vf2, isomorphic_vf2,
309};
310pub use crate::algorithms::layout::align::layout_align;
311pub use crate::algorithms::layout::bipartite::layout_bipartite;
312pub use crate::algorithms::layout::davidson_harel::{DhParams, layout_davidson_harel};
313pub use crate::algorithms::layout::drl::{DrlOptions, DrlTemplate, layout_drl, layout_drl_3d};
314pub use crate::algorithms::layout::fruchterman_reingold::{
315    FrBounds, FrBounds3d, FrGrid, FrParams, FrParams3d, layout_fruchterman_reingold,
316    layout_fruchterman_reingold_3d,
317};
318pub use crate::algorithms::layout::gem::{GemParams, layout_gem};
319pub use crate::algorithms::layout::graphopt::{GraphoptParams, layout_graphopt};
320pub use crate::algorithms::layout::kamada_kawai::{
321    KkBounds, KkBounds3d, KkParams, KkParams3d, layout_kamada_kawai, layout_kamada_kawai_3d,
322};
323pub use crate::algorithms::layout::lgl::{LglParams, layout_lgl};
324pub use crate::algorithms::layout::mds::layout_mds;
325pub use crate::algorithms::layout::merge_dla::layout_merge_dla;
326pub use crate::algorithms::layout::reingold_tilford::{
327    RootChoice, RtMode, layout_reingold_tilford, layout_reingold_tilford_circular,
328    roots_for_tree_layout,
329};
330pub use crate::algorithms::layout::simple::{
331    layout_circle, layout_grid, layout_grid_3d, layout_random, layout_random_3d, layout_sphere,
332    layout_star,
333};
334pub use crate::algorithms::layout::sugiyama::{SugiyamaParams, SugiyamaResult, layout_sugiyama};
335pub use crate::algorithms::layout::umap::{
336    UmapParams, layout_umap, layout_umap_3d, umap_compute_weights,
337};
338pub use crate::algorithms::matching::{
339    MatchingResult, is_matching, is_maximal_matching, maximum_bipartite_matching,
340    maximum_bipartite_matching_weighted,
341};
342pub use crate::algorithms::matching_lsap::solve_lsap;
343pub use crate::algorithms::max_cut::{MaxCutResult, cut_value, maximum_cut};
344pub use crate::algorithms::minimum_cycle_basis::minimum_cycle_basis;
345pub use crate::algorithms::motifs::{
346    DyadCensus, TriadCensus, TriadType, dyad_census, graph_count, isoclass, isoclass_create,
347    isoclass_subgraph, motifs_randesu, motifs_randesu_callback, motifs_randesu_estimate,
348    motifs_randesu_no, triad_census,
349};
350pub use crate::algorithms::nongraph::random_sample::random_sample;
351pub use crate::algorithms::nongraph::sampling::{
352    sample_dirichlet, sample_sphere_surface, sample_sphere_volume,
353};
354pub use crate::algorithms::operators::bipartite_projection::{
355    BipartiteProjection, bipartite_projection,
356};
357pub use crate::algorithms::operators::bipartite_projection_size::{
358    BipartiteProjectionSize, bipartite_projection_size,
359};
360pub use crate::algorithms::operators::complementer::complementer;
361pub use crate::algorithms::operators::compose::compose;
362pub use crate::algorithms::operators::connect_neighborhood::{connect_neighborhood, graph_power};
363pub use crate::algorithms::operators::contract_vertices::contract_vertices;
364pub use crate::algorithms::operators::difference::difference;
365pub use crate::algorithms::operators::disjoint_union::{disjoint_union, disjoint_union_many};
366pub use crate::algorithms::operators::even_tarjan::{EvenTarjanResult, even_tarjan_reduction};
367pub use crate::algorithms::operators::induced_subgraph::{InducedSubgraphResult, induced_subgraph};
368pub use crate::algorithms::operators::induced_subgraph_edges::induced_subgraph_edges;
369pub use crate::algorithms::operators::intersection::{intersection, intersection_many};
370pub use crate::algorithms::operators::is_same_graph::is_same_graph;
371pub use crate::algorithms::operators::join::join;
372pub use crate::algorithms::operators::permute_vertices::{invert_permutation, permute_vertices};
373pub use crate::algorithms::operators::products::{
374    GraphProductType, cartesian_product, graph_product, lexicographic_product, modular_product,
375    rooted_product, strong_product, tensor_product,
376};
377pub use crate::algorithms::operators::residual_graph::{
378    ResidualGraphResult, residual_graph, reverse_residual_graph,
379};
380pub use crate::algorithms::operators::reverse::{reverse, reverse_edges};
381pub use crate::algorithms::operators::rewire::rewire;
382pub use crate::algorithms::operators::rewire_edges::{
383    RewireDirectedMode, rewire_directed_edges, rewire_edges,
384};
385pub use crate::algorithms::operators::simplify::simplify;
386pub use crate::algorithms::operators::subgraph_from_edges::{
387    SubgraphFromEdgesResult, subgraph_from_edges,
388};
389pub use crate::algorithms::operators::to_directed::{ToDirectedMode, to_directed};
390pub use crate::algorithms::operators::to_undirected::{ToUndirectedMode, to_undirected};
391pub use crate::algorithms::operators::union::{union, union_many};
392pub use crate::algorithms::paths::all_shortest_paths::{
393    AllShortestPaths, AllShortestPathsMode, get_all_shortest_paths,
394    get_all_shortest_paths_with_mode,
395};
396pub use crate::algorithms::paths::astar::a_star_path;
397pub use crate::algorithms::paths::bellman_ford::{
398    BellmanFordPathEntry, bellman_ford_distances, bellman_ford_distances_with_mode,
399    bellman_ford_path_to, bellman_ford_path_to_with_mode, bellman_ford_paths,
400    bellman_ford_paths_with_mode,
401};
402pub use crate::algorithms::paths::dijkstra::{
403    DijkstraAllPaths, DijkstraMode, DijkstraPaths, dijkstra_all_shortest_paths, dijkstra_distances,
404    dijkstra_distances_cutoff, dijkstra_distances_cutoff_with_mode, dijkstra_distances_multi,
405    dijkstra_distances_multi_with_mode, dijkstra_distances_with_mode, dijkstra_path_to,
406    dijkstra_path_to_with_mode, dijkstra_paths, dijkstra_paths_with_mode,
407};
408pub use crate::algorithms::paths::distances::distances;
409pub use crate::algorithms::paths::distances_all::{
410    DistancesMode, distances_all, distances_all_with_mode,
411};
412pub use crate::algorithms::paths::distances_cutoff::{
413    DistancesCutoffMode, distances_cutoff, distances_cutoff_multi, distances_cutoff_with_mode,
414};
415pub use crate::algorithms::paths::distances_from::{
416    DistancesFromMode, distances_from, distances_from_with_mode,
417};
418pub use crate::algorithms::paths::edge_path_to_vertex_path::{
419    WalkMode, vertex_path_from_edge_path,
420};
421pub use crate::algorithms::paths::eulerian::{EulerianClassification, is_eulerian};
422pub use crate::algorithms::paths::eulerian_construct::{eulerian_cycle, eulerian_path};
423pub use crate::algorithms::paths::floyd_warshall::floyd_warshall_distances;
424pub use crate::algorithms::paths::get_all_shortest_paths_dijkstra::{
425    AllShortestPathsDijkstra, get_all_shortest_paths_dijkstra,
426    get_all_shortest_paths_dijkstra_with_mode,
427};
428pub use crate::algorithms::paths::get_shortest_path::{ShortestPath, get_shortest_path};
429pub use crate::algorithms::paths::get_shortest_path_astar::{
430    AstarHeuristic, get_shortest_path_astar,
431};
432pub use crate::algorithms::paths::get_shortest_paths_dijkstra::{
433    ShortestPathsDijkstra, get_shortest_paths_dijkstra, get_shortest_paths_dijkstra_with_mode,
434};
435pub use crate::algorithms::paths::graph_center::{
436    PseudoDiameterResult, graph_center, pseudo_diameter,
437};
438pub use crate::algorithms::paths::histogram::{PathLengthHistResult, path_length_hist};
439pub use crate::algorithms::paths::johnson::johnson_distances;
440pub use crate::algorithms::paths::k_shortest_paths::{KShortestPath, k_shortest_paths};
441pub use crate::algorithms::paths::radii::{
442    EccMode, diameter, diameter_weighted, diameter_weighted_with_mode, diameter_with_mode,
443    eccentricity, eccentricity_weighted, eccentricity_weighted_with_mode, eccentricity_with_mode,
444    radius, radius_weighted, radius_weighted_with_mode, radius_with_mode,
445};
446pub use crate::algorithms::paths::random_walk::random_walk;
447pub use crate::algorithms::paths::shortest_paths::{
448    ShortestPathMode, get_shortest_paths, get_shortest_paths_with_mode,
449};
450pub use crate::algorithms::paths::simple_paths::{SimplePathMode, all_simple_paths};
451pub use crate::algorithms::paths::spanner::spanner;
452pub use crate::algorithms::paths::voronoi::{VoronoiPartition, VoronoiTiebreaker, voronoi};
453pub use crate::algorithms::paths::widest_path::{
454    WidestPathResult, WidestPaths, widest_path, widest_path_widths,
455    widest_path_widths_floyd_warshall, widest_path_widths_floyd_warshall_with_mode,
456    widest_path_widths_with_mode, widest_path_with_mode, widest_paths, widest_paths_to,
457    widest_paths_to_with_mode, widest_paths_with_mode,
458};
459pub use crate::algorithms::properties::adjacency::{AdjacencyType, LoopHandling, get_adjacency};
460pub use crate::algorithms::properties::are_adjacent::are_adjacent;
461pub use crate::algorithms::properties::assortativity::{
462    assortativity_degree, assortativity_degree_directed,
463};
464pub use crate::algorithms::properties::assortativity_nominal::assortativity_nominal;
465pub use crate::algorithms::properties::assortativity_values::assortativity;
466pub use crate::algorithms::properties::assortativity_weighted::{
467    assortativity_degree_directed_weighted, assortativity_degree_weighted,
468};
469pub use crate::algorithms::properties::basic::{density, mean_degree, mean_distance};
470pub use crate::algorithms::properties::betweenness::betweenness;
471pub use crate::algorithms::properties::betweenness_cutoff::betweenness_cutoff;
472pub use crate::algorithms::properties::betweenness_subset::betweenness_subset;
473pub use crate::algorithms::properties::betweenness_weighted::betweenness_weighted;
474pub use crate::algorithms::properties::centralization::{
475    CentralizationMode, CentralizationResult, LoopMode, centralization,
476    centralization_betweenness_tmax, centralization_betweenness_wrapper,
477    centralization_closeness_tmax, centralization_closeness_wrapper, centralization_degree_tmax,
478    centralization_degree_wrapper, centralization_eigenvector_tmax,
479    centralization_eigenvector_wrapper,
480};
481pub use crate::algorithms::properties::closeness::closeness;
482pub use crate::algorithms::properties::closeness_cutoff::{
483    ClosenessCutoffResult, closeness_cutoff,
484};
485pub use crate::algorithms::properties::closeness_weighted::closeness_weighted;
486pub use crate::algorithms::properties::constraint::constraint;
487pub use crate::algorithms::properties::convergence_degree::{
488    convergence_degree, convergence_degree_full,
489};
490pub use crate::algorithms::properties::coreness::{CorenessMode, coreness, coreness_with_mode};
491pub use crate::algorithms::properties::degree::{
492    DegreeMode, degree_sequence, max_degree, max_degree_vertex, min_degree,
493};
494pub use crate::algorithms::properties::degree_correlation::degree_correlation_vector;
495pub use crate::algorithms::properties::degree_distribution::degree_distribution;
496pub use crate::algorithms::properties::ecc::ecc;
497pub use crate::algorithms::properties::edge_betweenness::edge_betweenness;
498pub use crate::algorithms::properties::edge_betweenness_cutoff::edge_betweenness_cutoff;
499pub use crate::algorithms::properties::edge_betweenness_subset::edge_betweenness_subset;
500pub use crate::algorithms::properties::edge_betweenness_weighted::edge_betweenness_weighted;
501pub use crate::algorithms::properties::edgelist::get_edgelist;
502pub use crate::algorithms::properties::efficiency::{
503    average_local_efficiency, global_efficiency, local_efficiency,
504};
505pub use crate::algorithms::properties::eigenvector::{
506    EigenvectorMode, EigenvectorScores, eigenvector_centrality, eigenvector_centrality_directed,
507    eigenvector_centrality_directed_weighted, eigenvector_centrality_full,
508    eigenvector_centrality_weighted,
509};
510pub use crate::algorithms::properties::get_biadjacency::{
511    GetBiadjacencyResult, get_biadjacency_matrix,
512};
513pub use crate::algorithms::properties::get_biadjacency_weighted::{
514    GetBiadjacencyWeightedResult, get_biadjacency_weighted,
515};
516pub use crate::algorithms::properties::get_eids::get_eids;
517pub use crate::algorithms::properties::girth::girth;
518pub use crate::algorithms::properties::graphicality::{
519    EdgeTypeFilter, is_bigraphical, is_graphical,
520};
521pub use crate::algorithms::properties::harmonic::harmonic_centrality;
522pub use crate::algorithms::properties::harmonic_cutoff::harmonic_centrality_cutoff;
523pub use crate::algorithms::properties::harmonic_weighted::harmonic_centrality_weighted;
524pub use crate::algorithms::properties::hits::{
525    HitsScores, hub_and_authority_scores, hub_and_authority_scores_weighted,
526};
527pub use crate::algorithms::properties::is_acyclic::is_acyclic;
528pub use crate::algorithms::properties::is_apex_forest::is_apex_forest;
529pub use crate::algorithms::properties::is_apex_tree::is_apex_tree;
530pub use crate::algorithms::properties::is_banner_free::is_banner_free;
531pub use crate::algorithms::properties::is_biclique::is_biclique;
532pub use crate::algorithms::properties::is_bipartite::{BipartiteResult, is_bipartite};
533pub use crate::algorithms::properties::is_biregular::is_biregular;
534pub use crate::algorithms::properties::is_block::is_block_graph;
535pub use crate::algorithms::properties::is_bowtie_free::is_bowtie_free;
536pub use crate::algorithms::properties::is_bull_free::is_bull_free;
537pub use crate::algorithms::properties::is_c4_free::is_c4_free;
538pub use crate::algorithms::properties::is_c5_free::is_c5_free;
539pub use crate::algorithms::properties::is_cactus::is_cactus_graph;
540pub use crate::algorithms::properties::is_caterpillar::is_caterpillar;
541pub use crate::algorithms::properties::is_chain_graph::is_chain_graph;
542pub use crate::algorithms::properties::is_chordal_bipartite::is_chordal_bipartite;
543pub use crate::algorithms::properties::is_claw_free::is_claw_free;
544pub use crate::algorithms::properties::is_clique::{is_clique, is_independent_vertex_set};
545pub use crate::algorithms::properties::is_cluster::is_cluster_graph;
546pub use crate::algorithms::properties::is_co_bipartite::is_co_bipartite;
547pub use crate::algorithms::properties::is_co_chordal::is_co_chordal;
548pub use crate::algorithms::properties::is_cograph::is_cograph;
549pub use crate::algorithms::properties::is_complete::is_complete;
550pub use crate::algorithms::properties::is_complete_bipartite::is_complete_bipartite;
551pub use crate::algorithms::properties::is_complete_multipartite::is_complete_multipartite;
552pub use crate::algorithms::properties::is_cricket_free::is_cricket_free;
553pub use crate::algorithms::properties::is_cubic::is_cubic;
554pub use crate::algorithms::properties::is_cycle::is_cycle;
555pub use crate::algorithms::properties::is_dag::is_dag;
556pub use crate::algorithms::properties::is_dart_free::is_dart_free;
557pub use crate::algorithms::properties::is_diamond_free::is_diamond_free;
558pub use crate::algorithms::properties::is_distance_hereditary::is_distance_hereditary;
559pub use crate::algorithms::properties::is_forest::is_forest;
560pub use crate::algorithms::properties::is_fork_free::is_fork_free;
561pub use crate::algorithms::properties::is_gem_free::is_gem_free;
562pub use crate::algorithms::properties::is_geodetic::is_geodetic;
563pub use crate::algorithms::properties::is_house_free::is_house_free;
564pub use crate::algorithms::properties::is_k_degenerate::{degeneracy, is_k_degenerate};
565pub use crate::algorithms::properties::is_lobster::is_lobster;
566pub use crate::algorithms::properties::is_net_free::is_net_free;
567pub use crate::algorithms::properties::is_outerplanar::is_outerplanar;
568pub use crate::algorithms::properties::is_p5_free::is_p5_free;
569pub use crate::algorithms::properties::is_path::is_path;
570pub use crate::algorithms::properties::is_paw_free::is_paw_free;
571pub use crate::algorithms::properties::is_proper_interval::is_proper_interval;
572pub use crate::algorithms::properties::is_pseudo_forest::is_pseudo_forest;
573pub use crate::algorithms::properties::is_ptolemaic::is_ptolemaic;
574pub use crate::algorithms::properties::is_regular::{is_regular, regularity};
575pub use crate::algorithms::properties::is_self_complementary::is_self_complementary;
576pub use crate::algorithms::properties::is_semicomplete::is_semicomplete;
577pub use crate::algorithms::properties::is_series_parallel::is_series_parallel;
578pub use crate::algorithms::properties::is_simple::{SimpleMode, is_simple, is_simple_with_mode};
579pub use crate::algorithms::properties::is_spider::is_spider;
580pub use crate::algorithms::properties::is_split::is_split_graph;
581pub use crate::algorithms::properties::is_star::is_star;
582pub use crate::algorithms::properties::is_strongly_chordal::is_strongly_chordal;
583pub use crate::algorithms::properties::is_strongly_regular::{
584    StronglyRegularParams, is_strongly_regular,
585};
586pub use crate::algorithms::properties::is_threshold::is_threshold_graph;
587pub use crate::algorithms::properties::is_tournament::is_tournament;
588pub use crate::algorithms::properties::is_tree::is_tree;
589pub use crate::algorithms::properties::is_triangle_free::is_triangle_free;
590pub use crate::algorithms::properties::is_trivially_perfect::is_trivially_perfect;
591pub use crate::algorithms::properties::is_unicyclic::is_unicyclic;
592pub use crate::algorithms::properties::is_weakly_chordal::is_weakly_chordal;
593pub use crate::algorithms::properties::is_well_covered::is_well_covered;
594pub use crate::algorithms::properties::is_wheel::is_wheel;
595pub use crate::algorithms::properties::is_windmill::is_windmill;
596pub use crate::algorithms::properties::joint_degree_distribution::joint_degree_distribution;
597pub use crate::algorithms::properties::joint_degree_matrix::joint_degree_matrix;
598pub use crate::algorithms::properties::joint_type_distribution::joint_type_distribution;
599pub use crate::algorithms::properties::knn::{
600    avg_nearest_neighbor_degree, avg_nearest_neighbor_degree_weighted, knnk, knnk_weighted,
601};
602pub use crate::algorithms::properties::laplacian::{LaplacianNormalization, get_laplacian};
603pub use crate::algorithms::properties::list_triangles::list_triangles;
604pub use crate::algorithms::properties::local_scan::{
605    local_scan_0, local_scan_0_them, local_scan_1, local_scan_1_ecount, local_scan_1_ecount_them,
606    local_scan_subset_ecount,
607};
608pub use crate::algorithms::properties::local_scan_k::{
609    local_scan_k, local_scan_k_ecount, local_scan_k_ecount_them,
610};
611pub use crate::algorithms::properties::mean_distance_weighted::mean_distance_weighted;
612pub use crate::algorithms::properties::multiplicity::{
613    count_loops, count_multiple, count_multiple_1, has_loop, has_multiple, is_loop, is_multiple,
614};
615pub use crate::algorithms::properties::mutual::{count_mutual, has_mutual, is_mutual};
616pub use crate::algorithms::properties::neighborhood::{
617    NeighborhoodMode, neighborhood, neighborhood_graphs, neighborhood_graphs_with_mode,
618    neighborhood_size, neighborhood_size_with_mode, neighborhood_with_mode,
619};
620pub use crate::algorithms::properties::pagerank::pagerank;
621pub use crate::algorithms::properties::pagerank_linsys::pagerank_linsys;
622pub use crate::algorithms::properties::pagerank_weighted::pagerank_weighted;
623pub use crate::algorithms::properties::perfect::is_perfect;
624pub use crate::algorithms::properties::personalized_pagerank::{
625    personalized_pagerank, personalized_pagerank_default, personalized_pagerank_vs,
626};
627pub use crate::algorithms::properties::power_law_fit::{PowerLawFitResult, power_law_fit};
628pub use crate::algorithms::properties::reciprocity::{
629    ReciprocityMode, reciprocity, reciprocity_with_mode,
630};
631pub use crate::algorithms::properties::rich_club::rich_club_sequence;
632pub use crate::algorithms::properties::running_mean::{expand_path_to_pairs, running_mean};
633pub use crate::algorithms::properties::satisfies_dirac::satisfies_dirac;
634pub use crate::algorithms::properties::satisfies_ore::satisfies_ore;
635pub use crate::algorithms::properties::similarity::{
636    bibcoupling, cocitation, similarity_dice, similarity_dice_es, similarity_dice_pairs,
637    similarity_inverse_log_weighted, similarity_inverse_log_weighted_pairs, similarity_jaccard,
638    similarity_jaccard_es, similarity_jaccard_pairs,
639};
640pub use crate::algorithms::properties::sort_by_degree::{SortOrder, sort_vertices_by_degree};
641pub use crate::algorithms::properties::stochastic::get_stochastic;
642pub use crate::algorithms::properties::strength::{
643    StrengthMode, diversity, strength, strength_with_mode,
644};
645pub use crate::algorithms::properties::topological_sorting::topological_sorting;
646pub use crate::algorithms::properties::triangles::{
647    TransitivityMode, count_adjacent_triangles, count_triangles, transitivity_avglocal_undirected,
648    transitivity_barrat, transitivity_local_undirected, transitivity_undirected,
649};
650pub use crate::algorithms::properties::trussness::trussness;
651pub use crate::algorithms::properties::unfold_tree::{UnfoldTreeResult, unfold_tree};
652pub use crate::algorithms::simple_cycles::{SimpleCycle, SimpleCycleMode, simple_cycles};
653pub use crate::algorithms::spanning::mst::{MstAlgorithm, minimum_spanning_tree};
654pub use crate::algorithms::spanning::random_spanning_tree::random_spanning_tree;
655pub use crate::algorithms::spatial::beta_weighted_gabriel_graph::{
656    BetaWeightedGabriel, beta_weighted_gabriel_graph,
657};
658pub use crate::algorithms::spatial::circle_beta_skeleton::circle_beta_skeleton;
659pub use crate::algorithms::spatial::convex_hull::{ConvexHullResult, convex_hull_2d};
660pub use crate::algorithms::spatial::delaunay::delaunay_graph;
661pub use crate::algorithms::spatial::edge_lengths::{DistanceMetric, spatial_edge_lengths};
662pub use crate::algorithms::spatial::gabriel_graph::gabriel_graph;
663pub use crate::algorithms::spatial::lune_beta_skeleton::lune_beta_skeleton;
664pub use crate::algorithms::spatial::nearest_neighbor_graph::nearest_neighbor_graph;
665pub use crate::algorithms::spatial::relative_neighborhood_graph::relative_neighborhood_graph;
666pub use crate::algorithms::traversal::bfs::{
667    BfsMode, BfsSimple, BfsTree, bfs, bfs_simple, bfs_tree,
668};
669pub use crate::algorithms::traversal::dfs::{
670    DfsMode, DfsSimple, DfsTree, dfs, dfs_simple, dfs_tree,
671};
672pub use crate::algorithms::vertex_cover::{is_vertex_cover, minimum_vertex_cover};
673pub use crate::core::cache::CachedProperty;
674pub use crate::core::error::{IgraphError, IgraphResult};
675pub use crate::core::graph::{Graph, VertexId};