Expand description
Graph properties — invariants and metrics. Phase 1 entries:
ALGO-PR-001 (girth), ALGO-PR-002 (triangles + global/local
transitivity), ALGO-PR-003 (density + mean distance), ALGO-PR-004
(reciprocity), ALGO-PR-005 (avg nearest-neighbour degree),
ALGO-PR-006 (degree assortativity).
Structs§
- Bipartite
Result - Result of bipartiteness check.
- Centralization
Result - Result of a centralization convenience wrapper.
- Closeness
Cutoff Result - Result of
closeness_cutoff. - Eccentricity
Classes - Result of
eccentricity_classes. - Eigenvector
Scores - Output of
eigenvector_centrality_full: the normalised centrality vector and the dominant eigenvalue of the (possibly shifted-back) adjacency matrix. - GetBiadjacency
Result - Result of
get_biadjacency_matrix. - GetBiadjacency
Weighted Result - Result of
get_biadjacency_weighted. - Graph
Summary - Result of
graph_summarycontaining precomputed graph statistics. - Hits
Scores - Output of
hub_and_authority_scores: scaled hub and authority vectors and the dominant eigenvalue ofA·Aᵀ. - Label
Spread Result - Result of label spreading prediction.
- Power
LawFit Result - Result of fitting a power-law distribution to a sample.
- Strongly
Regular Params - Result of strongly regular graph recognition.
- Structural
Features - Per-vertex structural feature vector.
- Unfold
Tree Result - Result of unfolding a graph into a tree.
Enums§
- Adjacency
Type - Which triangle of the adjacency matrix to fill (undirected graphs only).
- AggMode
- Aggregation mode for neighborhood operations.
- Centralization
Mode - Whether centralization considers in-degree, out-degree, or total.
- Coreness
Mode - Direction-handling for
coreness_with_mode. - Degree
Mode - Direction mode for degree computation in directed graphs.
- Edge
Type Filter - What kinds of edges are allowed when testing graphicality.
- Eigenvector
Mode - How to consider edge directions for
eigenvector_centrality_fulland friends. Mirrors upstream’sIGRAPH_OUT/IGRAPH_IN/IGRAPH_ALL. - Laplacian
Normalization - Laplacian normalization mode.
- Loop
Handling - How to count self-loop edges in the adjacency matrix diagonal.
- Loop
Mode - How loops are counted when computing degree centralization.
- Neighborhood
Mode - Direction mode for
neighborhood_size_with_modeon directed graphs. Ignored on undirected graphs — every mode reduces toNeighborhoodMode::All. - Reciprocity
Mode - Reciprocity formula choice. Counterpart of upstream’s
igraph_reciprocity_t(IGRAPH_RECIPROCITY_DEFAULT/IGRAPH_RECIPROCITY_RATIO). - Simple
Mode - Direction-handling for
is_simple_with_mode. Counterpart of upstream’sdirectedboolean parameter. - Sort
Order - Sort order for vertex degree sorting.
- Strength
Mode - Direction mode for
strength_with_modeon directed graphs. Ignored on undirected graphs. - Transitivity
Mode - How to handle vertices with degree < 2 when averaging local transitivity.
Functions§
- abc_
entropy - Compute the ABC entropy.
- abc_
index - Compute the atom-bond connectivity (ABC) index.
- albertson_
coindex - Compute the Albertson coindex.
- albertson_
index - Compute the Albertson index (edge irregularity).
- algebraic_
connectivity - Compute the algebraic connectivity of a graph.
- are_
adjacent - Check whether two vertices are connected by at least one edge.
- arithmetic_
geometric_ index - Compute the arithmetic-geometric index.
- 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.
- 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_
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).
- bertz_
complexity_ index - Compute the Bertz complexity index.
- 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.
- bibcoupling
- Computes bibliographic coupling scores between all pairs of vertices.
- bipartiteness_
ratio - Compute the bipartiteness ratio
(2 - μ_n) / 2. - bipartivity_
index - Compute the bipartivity index.
- bridge_
ratio - Compute the bridge ratio of the graph.
- 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.
- 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.
- clustering_
path_ ratio - Compute the clustering-path ratio.
- cocitation
- Computes the cocitation scores between all pairs of vertices.
- collatz_
sinogowitz - Compute the Collatz–Sinogowitz irregularity.
- communicability_
matrix - Compute the communicability matrix between all pairs of vertices.
- component_
ratio - Compute the component ratio.
- conductance
- Compute the conductance of a partition.
- 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.
- convergence_
degree - Per-edge convergence degree.
- convergence_
degree_ full - Convergence degree along with the per-edge
In(e)/Out(e)counts. - 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_
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_
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.
- 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.
- density
- Edge density of
graph. Counterpart ofigraph_density(_, NULL_weights, _, /*loops=*/false). - diameter_
radius_ ratio - Compute the diameter-radius ratio.
- diameter_
vulnerability - Compute the diameter vulnerability.
- dirichlet_
energy - Compute the Dirichlet energy of a signal on a graph.
- 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.
- diversity
- Structural diversity index for all vertices in an undirected graph.
- 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_
classes - Classify each vertex by its eccentricity class.
- edge_
adamic_ adar_ sum - Compute the sum of Adamic–Adar indices across all edges.
- edge_
betweenness - Per-edge unweighted betweenness centrality.
- 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_ 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_
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.
- 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.
- 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.
- ev_
degree_ randic - Compute the ev-degree Randić index.
- even_
odd_ walk_ ratio - Compute the even-odd walk ratio.
- 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.
- 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)². - 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.
- frustration_
ratio - Compute the frustration ratio.
- 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_
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_
laplacian - Compute the Laplacian matrix of a graph.
- get_
stochastic - Compute the stochastic adjacency matrix of a graph.
- 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. - gordon_
scantlebury_ index - Compute the Gordon-Scantlebury index (path-of-length-2 count).
- graovac_
ghorbani_ index - Compute the Graovac-Ghorbani index.
- 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_
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_
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.
- 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.
- 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_
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_
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_
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_
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_
self_ complementary - Check whether a graph is self-complementary.
- is_
semicomplete - Check whether a directed graph is semicomplete.
- 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.
- 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).
- kirchhoff_
index - Compute the Kirchhoff index of a graph.
- label_
propagate_ predict - Predict labels using simple majority voting from labeled neighbors.
- 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.
- leaf_
to_ hub_ ratio - Compute the leaf-to-hub ratio.
- 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.
- 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.
- 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.
- 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.
- 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.
- navigability_
ratio - Compute the navigability ratio.
- neighbor_
aggregate - Aggregate a signal over each vertex’s neighborhood.
- neighbor_
degree_ disparity - Compute the average neighbor degree ratio.
- 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.
- odd_
cycle_ density - Compute the odd cycle density.
- 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. - pendant_
edge_ ratio - Compute the pendant edge ratio.
- 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. - randic_
entropy - Compute the Randić entropy.
- randic_
index - Compute the Randić connectivity index.
- ratio_
cut - Compute the ratio cut of a partition.
- 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. - resistance_
centrality - Compute resistance centrality for all vertices.
- revised_
szeged_ index - Compute the revised Szeged index of a graph.
- rich_
club_ density - Compute the rich club density.
- rich_
club_ sequence - Per-vertex rich-club coefficient sequence for
graph. - 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).
- 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.
- smallworld_
omega - Compute the small-world omega estimate.
- smallworld_
sigma - Compute the small-world sigma estimate.
- 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.
- spanning_
tree_ count - Count the number of spanning trees using Kirchhoff’s theorem.
- 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.
- square_
clustering_ ratio - Compute the square clustering ratio.
- square_
density - Compute the square (4-cycle) density of the graph.
- strength
- Weighted vertex degree for all vertices.
- strength_
with_ mode - Weighted vertex degree with direction mode and loop control.
- structural_
feature_ vectors - Compute structural feature vectors for all vertices.
- subgraph_
centrality - Compute subgraph centrality for all vertices.
- 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.
- 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.
- 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.
- transitivity_
avglocal_ undirected - Average local transitivity (clustering coefficient).
- 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.
- unfold_
tree - Unfold a graph into a tree by BFS, replicating multiply-visited vertices.
- 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_ ratio - Compute the vertex connectivity ratio.
- vertex_
resilience - Compute vertex resilience
κ(G) / n. - von_
neumann_ entropy - Approximate Von Neumann entropy of the graph.
- walk_
entropy - Compute the walk entropy of the graph.
- walk_
regularity - Compute the walk regularity index of the graph.
- wiener_
index - Compute the Wiener index of a connected graph.
- wiener_
polarity_ index - Compute the Wiener polarity index of a graph.