OpenBI Docs Buy

All functions

Every function, type and macro of Open Graph, 1,162 entries, in one list: its name opens its entry, with the signature, parameters, errors and how it is checked.

The names are shown without the og_ prefix of their C names. Filter by a word of the name or the line, by a C name or by an igraph name (pagerank, og_pagerank and igraph_pagerank all find it); narrow it to one page, to how the entries are checked, or to those that use threads or SIMD.

1,162 entries

Name and pageCheckedWhat it does
abi_error_clearBinary interfaceUnit tests ExtensionForgets the error kept on this thread.
abi_error_handlerBinary interfaceUnit tests ExtensionAn error handler that keeps the latest error's text on its thread, for hosts that cannot take a callback.
abi_error_lastBinary interfaceUnit tests ExtensionWhat abi_error_handler kept on this thread: the reason, code, file and line.
abi_offsetofBinary interfaceUnit tests ExtensionThe offset in bytes of a field of a public struct.
abi_sizeofBinary interfaceUnit tests ExtensionThe size in bytes of a public type, looked up by its C name.
abi_typeBinary interfaceUnit tests ExtensionThe names of the public types abi_sizeof knows, one by one.
ABI_VERSIONBinary interfaceUnit tests ExtensionThe version of Open Graph's binary interface, for bindings in other languages.
abi_versionBinary interfaceUnit tests ExtensionThe version of the binary interface the library was built with.
abi_warning_handlerBinary interfaceUnit tests ExtensionA warning handler that keeps the warnings on their thread, for hosts that cannot take a callback.
abi_warningsBinary interfaceUnit tests ExtensionThe warnings kept on this thread, one per line.
abi_warnings_clearBinary interfaceUnit tests ExtensionForgets the warnings kept on this thread.
add_edgeGraph basicsUnit testsAdds one edge.
add_edgesGraph basicsExactAdds a batch of edges.
add_verticesGraph basicsUnit testsAdds isolated vertices.
adhesionFlows, cuts and traversalExactAdhesion of a graph, which is its edge connectivity.
adjacencyDeterministic generatorsExactBuilds a graph from a square matrix of edge counts.
adjacency_spectral_embeddingLinear algebra and embeddingsWithin tolerance SIMDPlaces the vertices in n dimensions using the leading eigenvectors (undirected) or singular vectors (directed) of the adjacency matrix.
adjlistDeterministic generatorsUnit testsTurns an adjacency list, one neighbour list per vertex, into a graph.
adjlist_clearString vectors, lists and bit setsUnit testsEmpties every vertex's vector and keeps the number of vertices.
adjlist_destroyString vectors, lists and bit setsUnit testsReleases an adjacency list with all its vectors.
adjlist_getString vectors, lists and bit setsExactGives the neighbour vector of a vertex in an adjacency list.
adjlist_initString vectors, lists and bit setsExactBuilds a list of every vertex's neighbours.
adjlist_init_complementerString vectors, lists and bit setsExactBuilds, for each vertex, the list of vertices it is not joined to.
adjlist_init_emptyString vectors, lists and bit setsUnit testsCreates an adjacency list of n vertices with no neighbours.
adjlist_init_from_inclistString vectors, lists and bit setsExactTurns an incidence list into an adjacency list that lines up with it.
adjlist_simplifyString vectors, lists and bit setsUnit testsRemoves self-references and repeated entries from every vertex's vector.
adjlist_sizeString vectors, lists and bit setsExactTells how many vertices an adjacency list covers.
adjlist_sortString vectors, lists and bit setsExactSorts every vertex's vector in increasing order.
all_minimal_st_separatorsCliques, independent sets and colouringExactLists every vertex set that minimally separates some pair of vertices.
all_st_cutsFlows, cuts and traversalExactLists every minimal s-t edge cut of a directed graph.
all_st_mincutsFlows, cuts and traversalExactLists every minimum-capacity s-t edge cut of a directed graph.
almost_equalsSpatial graphs and numbersUnit testsTells whether two doubles are equal within a relative tolerance.
are_adjacentComponents and structureExactTells whether there is an edge from one vertex to another.
arpack_function_tLinear algebra and embeddingsUnit testsThe callback type through which the iterative eigensolvers multiply by the matrix.
arpack_options_initLinear algebra and embeddingsUnit testsFills an arpack_options_t with the default settings.
arpack_options_tLinear algebra and embeddingsUnit testsSettings and run statistics of the iterative eigensolvers arpack_rssolve and arpack_rnsolve.
arpack_rnsolveLinear algebra and embeddingsWithin tolerance SIMDFinds a few eigenvalues and eigenvectors of a real non-symmetric matrix that is given only as a matrix-vector product.
arpack_rssolveLinear algebra and embeddingsWithin tolerance SIMDFinds a few eigenvalues and eigenvectors of a real symmetric matrix that is given only as a matrix-vector product.
arpack_storage_destroyLinear algebra and embeddingsUnit testsFrees the memory of an arpack_storage_t.
arpack_storage_initLinear algebra and embeddingsUnit testsAllocates reusable work memory for the iterative eigensolvers.
arpack_storage_tLinear algebra and embeddingsUnit testsWork memory for arpack_rssolve and arpack_rnsolve that can be reused across calls.
arpack_unpack_complexLinear algebra and embeddingsUnit testsRewrites arpack_rnsolve's output so that every eigenvalue has its own complex eigenvector.
ARRAY3Matrices, stacks, queues and heapsUnit testsUnchecked access to element (i, j, k) of any three-dimensional array.
array3_destroyMatrices, stacks, queues and heapsUnit testsFrees the storage of a three-dimensional array.
array3_fillMatrices, stacks, queues and heapsUnit testsSets every element of a three-dimensional array to one value.
array3_initMatrices, stacks, queues and heapsUnit testsCreates an n1 x n2 x n3 array with every element zero.
array3_n1Matrices, stacks, queues and heapsUnit testsReturns the first dimension of a three-dimensional array.
array3_n2Matrices, stacks, queues and heapsUnit testsReturns the second dimension of a three-dimensional array.
array3_n3Matrices, stacks, queues and heapsUnit testsReturns the third dimension of a three-dimensional array.
array3_nullMatrices, stacks, queues and heapsUnit testsSets every element of a three-dimensional array to zero.
array3_resizeMatrices, stacks, queues and heapsUnit testsChanges the dimensions of a three-dimensional array.
array3_scaleMatrices, stacks, queues and heapsUnit testsMultiplies every element of a three-dimensional array by a constant.
array3_sizeMatrices, stacks, queues and heapsUnit testsReturns the number of elements, n1 n2 n3.
array3_sumMatrices, stacks, queues and heapsUnit testsReturns the sum of all elements of a three-dimensional array.
array3_tMatrices, stacks, queues and heapsUnit testsA dense three-dimensional array of real numbers.
array3_updateMatrices, stacks, queues and heapsUnit testsMakes an existing three-dimensional array a copy of another.
articulation_pointsComponents and structureExactLists the vertices whose removal splits their component.
assortativitySimilarity, transitivity and mixingExactMeasures the correlation of a vertex value across the ends of the edges.
assortativity_degreeSimilarity, transitivity and mixingExactMeasures whether vertices connect to vertices of similar degree.
assortativity_nominalSimilarity, transitivity and mixingExactMeasures whether edges tend to join vertices of the same category.
astar_heuristic_func_tPaths and distancesUnit testsCallback type for the A* distance estimate.
asymmetric_preference_gameRandom graphsSame qualityDraws a directed graph in which each vertex has an out-type and an in-type.
atlasDeterministic generatorsExactBuilds graph number k of An Atlas of Graphs: every graph with up to 7 vertices.
attribute_combinationAttributesUnit testsCreates a list of combination rules from a variable argument list.
attribute_combination_addAttributesExactAdds a rule saying how one attribute, or every other attribute, is combined.
attribute_combination_destroyAttributesUnit testsFrees a list of combination rules.
attribute_combination_initAttributesExactCreates an empty list of combination rules.
attribute_combination_removeAttributesUnit testsRemoves the rule for a name from a combination list.
attribute_combination_type_tAttributesExactHow the values of merged vertices or edges are turned into one value.
attribute_elemtype_tAttributesUnit testsSays whether an attribute belongs to the graph, to its vertices or to its edges.
attribute_record_destroyAttributesUnit testsReleases everything an attribute record owns: name, values and default.
attribute_record_initAttributesUnit testsSets up a record with a name, a type and no values yet.
attribute_record_init_copyAttributesUnit testsCreates a deep copy of an attribute record.
attribute_record_resizeAttributesUnit testsChanges the number of values of a record, filling new slots with its default.
attribute_record_set_default_booleanAttributesUnit testsSets the value that new slots of a Boolean record receive.
attribute_record_set_default_numericAttributesUnit testsSets the value that new slots of a numeric record receive.
attribute_record_set_default_stringAttributesUnit testsSets the string that new slots of a string record receive.
attribute_record_set_nameAttributesUnit testsRenames an attribute record.
attribute_record_set_typeAttributesUnit testsChanges the type of a record, dropping its values.
attribute_record_sizeAttributesUnit testsReturns the number of values in an attribute record.
attribute_record_tAttributesUnit testsA named attribute: its type, its values and a default value.
attribute_table_tAttributesUnit testsThe callbacks through which an attribute handler keeps values for graphs, vertices and edges.
attribute_type_tAttributesUnit testsThe kind of value an attribute holds.
automorphism_groupIsomorphismExactReturns permutations that generate the automorphism group of a graph.
automorphism_group_blissIsomorphismExactReturns generators of the automorphism group, with a chosen heuristic and run statistics.
average_local_efficiencyPaths and distancesExactThe mean local efficiency over all vertices.
average_path_lengthPaths and distancesExact ThreadsMean shortest-path length over the ordered pairs of distinct vertices that are connected.
avg_nearest_neighbor_degreeSimilarity, transitivity and mixingExactComputes the average degree of each vertex's neighbours, and its average per degree.
barabasi_aging_gameRandom graphsSame qualityGrows a graph by preferential attachment with aging: attractiveness also depends on a vertex's age.
barabasi_gameRandom graphsSame qualityGrows a graph by preferential attachment (Barabási-Albert and its generalisations).
beta_weighted_gabriel_graphSpatial graphs and numbersUnit testsBuilds the Gabriel graph and gives each edge the beta at which it leaves the lune-based beta-skeleton.
betweennessCentralityExact ThreadsVertex betweenness: how many shortest paths between other vertices pass through each vertex.
betweenness_cutoffCentralityExact ThreadsVertex betweenness counting only shortest paths no longer than a cutoff.
betweenness_subsetCentralityExact ThreadsVertex betweenness counting only shortest paths from chosen sources to chosen targets.
bfsFlows, cuts and traversalExactBreadth-first search with several roots, a restricted vertex set and an optional callback.
bfs_simpleFlows, cuts and traversalExactBreadth-first search from one vertex: visiting order, distance layers and parents.
bfshandler_tFlows, cuts and traversalUnit testsType of the bfs callback.
biadjacencyOperators and bipartite graphsExactBuilds a bipartite graph from its biadjacency matrix.
bibcouplingSimilarity, transitivity and mixingExactCounts, for pairs of vertices, how many vertices both of them point to.
biconnected_componentsComponents and structureExactFinds the biconnected components of a graph and its articulation points.
bipartite_game_gnmOperators and bipartite graphsSame qualityRandom bipartite graph with exactly m edges, G(n1, n2, m).
bipartite_game_gnpOperators and bipartite graphsSame qualityRandom bipartite graph in which each possible edge appears with probability p, G(n1, n2, p).
bipartite_iea_gameOperators and bipartite graphsSame qualityRandom bipartite multigraph from m independently placed edges.
bipartite_projectionOperators and bipartite graphsExactThe two one-mode projections of a bipartite graph.
bipartite_projection_sizeOperators and bipartite graphsExactVertex and edge counts of the two one-mode projections, without building them.
bitset_andString vectors, lists and bit setsUnit tests SIMDCombines two bitsets bit by bit with AND, writing the result into a third.
bitset_capacityString vectors, lists and bit setsUnit testsReturns how many bits fit before the bitset must reallocate.
bitset_countl_oneString vectors, lists and bit setsUnit testsCounts the one bits from the highest bit (bit size-1) downward, up to the first zero bit.
bitset_countl_zeroString vectors, lists and bit setsUnit testsCounts the zero bits from the highest bit (bit size-1) downward, up to the first one bit.
bitset_countr_oneString vectors, lists and bit setsUnit testsCounts the one bits from bit 0 upward, up to the first zero bit.
bitset_countr_zeroString vectors, lists and bit setsUnit testsCounts the zero bits from bit 0 upward, up to the first one bit.
bitset_destroyString vectors, lists and bit setsUnit testsFrees a bitset.
bitset_fillString vectors, lists and bit setsUnit testsSets every bit of a bitset to the same value.
bitset_initString vectors, lists and bit setsUnit testsCreates a bitset of size bits, all zero.
bitset_init_copyString vectors, lists and bit setsUnit testsCreates a bitset with the same size and bits as another.
bitset_is_all_oneString vectors, lists and bit setsUnit testsTells whether every bit of a bitset is set.
bitset_is_all_zeroString vectors, lists and bit setsUnit testsTells whether no bit of a bitset is set.
bitset_is_any_oneString vectors, lists and bit setsUnit testsTells whether at least one bit of a bitset is set.
bitset_is_any_zeroString vectors, lists and bit setsUnit testsTells whether at least one bit of a bitset is clear.
bitset_notString vectors, lists and bit setsUnit testsWrites a bitset with every bit flipped.
bitset_nullString vectors, lists and bit setsUnit testsSets every bit of a bitset to zero.
bitset_orString vectors, lists and bit setsUnit tests SIMDCombines two bitsets bit by bit with OR, writing the result into a third.
bitset_popcountString vectors, lists and bit setsUnit tests SIMDCounts the bits that are set.
bitset_reserveString vectors, lists and bit setsUnit testsAllocates storage for at least capacity bits.
bitset_resizeString vectors, lists and bit setsUnit testsChanges the number of bits of a bitset; new bits are zero.
bitset_sizeString vectors, lists and bit setsUnit testsTells how many bits a bitset holds.
bitset_tVectorsUnit testsAn array of bits stored in 64-bit words.
bitset_updateString vectors, lists and bit setsUnit testsMakes one bitset a copy of another, size included.
bitset_xorString vectors, lists and bit setsUnit tests SIMDCombines two bitsets bit by bit with exclusive OR, writing the result into a third.
blas_ddotLinear algebra and embeddingsWithin tolerance SIMDComputes the dot product of two real vectors of equal length.
blas_dgemmLinear algebra and embeddingsWithin tolerance SIMDComputes C = alpha op(A) op(B) + beta C, where op is the matrix itself or its transpose.
blas_dgemvLinear algebra and embeddingsWithin tolerance SIMDComputes y = alpha A x + beta y, or the same with A transposed.
blas_dgemv_arrayLinear algebra and embeddingsWithin tolerance SIMDThe product of blas_dgemv with plain arrays for x and y.
blas_dnrm2Linear algebra and embeddingsWithin tolerance SIMDReturns the Euclidean norm of a real vector, without needless overflow or underflow.
bliss_info_tIsomorphismUnit testsStatistics of one canonical labelling run, with the exact order of the automorphism group.
bliss_sh_tIsomorphismUnit testsHow the canonical labelling search chooses the cell to split at each search node.
bond_percolationComponents and structureUnit testsAdds edges one by one and records the size of the largest component after each.
bridgesComponents and structureExactLists the edges whose removal splits their component.
callaway_traits_gameRandom graphsSame qualityGrows a graph in which random vertex pairs connect with a probability set by their types.
callocGraph basicsUnit testsAllocates zero-filled memory for an array.
canonical_permutationIsomorphismUnit testsComputes a canonical relabelling: isomorphic graphs relabelled this way become identical.
canonical_permutation_blissIsomorphismUnit testsComputes a canonical relabelling with a chosen heuristic and run statistics.
cattribute_EABAttributesExactReturns the Boolean value one edge has for an attribute.
cattribute_EAB_setAttributesExactStores a Boolean value for one edge, creating the attribute when missing.
cattribute_EAB_setvAttributesExactFills the Boolean attribute of every edge from a vector, one value each.
cattribute_EABVAttributesUnit testsCopies the Boolean values of an attribute for selected edges into a vector.
cattribute_EANAttributesExactReturns the numeric value one edge has for an attribute.
cattribute_EAN_setAttributesExactStores a numeric value for one edge, creating the attribute when missing.
cattribute_EAN_setvAttributesExactFills the numeric attribute of every edge from a vector, one value each.
cattribute_EANVAttributesUnit testsCopies the numeric values of an attribute for selected edges into a vector.
cattribute_EASAttributesExactReturns the string value one edge has for an attribute.
cattribute_EAS_setAttributesExactStores a string value for one edge, creating the attribute when missing.
cattribute_EAS_setvAttributesExactFills the string attribute of every edge from a vector, one value each.
cattribute_EASVAttributesUnit testsCopies the string values of an attribute for selected edges into a vector.
cattribute_GABAttributesExactReturns the value of a Boolean attribute of the graph.
cattribute_GAB_setAttributesExactStores a Boolean value as a graph attribute, creating it when missing.
cattribute_GANAttributesExactReturns the value of a numeric attribute of the graph.
cattribute_GAN_setAttributesExactStores a numeric value as a graph attribute, creating it when missing.
cattribute_GASAttributesExactReturns the value of a string attribute of the graph.
cattribute_GAS_setAttributesExactStores a string value as a graph attribute, creating it when missing.
cattribute_has_attrAttributesExactTells whether a graph has an attribute of a given kind and name.
cattribute_listAttributesExactLists the names and types of a graph's attributes.
cattribute_remove_allAttributesExactDeletes every attribute of the chosen kinds: graph, vertex and/or edge.
cattribute_remove_eAttributesExactDeletes the edge attribute of a given name.
cattribute_remove_gAttributesExactDeletes the graph attribute of a given name.
cattribute_remove_vAttributesExactDeletes the vertex attribute of a given name.
cattribute_VABAttributesExactReturns the Boolean value one vertex has for an attribute.
cattribute_VAB_setAttributesExactStores a Boolean value for one vertex, creating the attribute when missing.
cattribute_VAB_setvAttributesExactFills the Boolean attribute of every vertex from a vector, one value each.
cattribute_VABVAttributesUnit testsCopies the Boolean values of an attribute for selected vertices into a vector.
cattribute_VANAttributesExactReturns the numeric value one vertex has for an attribute.
cattribute_VAN_setAttributesExactStores a numeric value for one vertex, creating the attribute when missing.
cattribute_VAN_setvAttributesExactFills the numeric attribute of every vertex from a vector, one value each.
cattribute_VANVAttributesUnit testsCopies the numeric values of an attribute for selected vertices into a vector.
cattribute_VASAttributesExactReturns the string value one vertex has for an attribute.
cattribute_VAS_setAttributesExactStores a string value for one vertex, creating the attribute when missing.
cattribute_VAS_setvAttributesExactFills the string attribute of every vertex from a vector, one value each.
cattribute_VASVAttributesUnit testsCopies the string values of an attribute for selected vertices into a vector.
centralizationCentralityExactFreeman centralization of a score vector: the total gap between the top score and every score.
centralization_betweennessCentralityExact ThreadsBetweenness of every vertex and the graph's betweenness centralization.
centralization_betweenness_tmaxCentralityExactThe largest betweenness centralization a graph of the given size can have.
centralization_closenessCentralityExact ThreadsNormalised closeness of every vertex and the graph's closeness centralization.
centralization_closeness_tmaxCentralityExactThe largest closeness centralization a graph of the given size can have.
centralization_degreeCentralityExactDegree of every vertex and the graph's degree centralization.
centralization_degree_tmaxCentralityExactThe largest degree centralization a graph of the given size can have.
centralization_eigenvector_centralityCentralityWithin tolerance SIMDEigenvector centrality of every vertex and the graph's eigenvector centralization.
centralization_eigenvector_centrality_tmaxCentralityExactThe largest eigenvector centralization a graph of the given size can have.
chung_lu_gameRandom graphsSame qualityDraws a random graph with given expected degrees (the Chung-Lu model and two variants).
circle_beta_skeletonSpatial graphs and numbersUnit testsBuilds the circle-based beta-skeleton of a planar point set.
circulantDeterministic generatorsExactBuilds a circulant graph: every vertex joined to the vertices a fixed set of offsets away.
cited_type_gameRandom graphsSame qualityGrows a citation graph in which the chance of being cited depends on the cited vertex's type.
citing_cited_type_gameRandom graphsSame qualityGrows a citation graph in which the chance of a citation depends on both vertices' types.
clique_handler_tCliques, independent sets and colouringUnit testsType of the function that receives cliques from the callback searches.
clique_numberCliques, independent sets and colouringExactSize of the largest clique.
clique_size_histCliques, independent sets and colouringExactCounts the cliques of each size.
cliquesCliques, independent sets and colouringExactLists every clique whose size lies in a given range.
cliques_callbackCliques, independent sets and colouringExactPasses every clique in a size range to a function instead of storing it.
closenessCentralityExact ThreadsCloseness centrality: the inverse of the total distance from each vertex to the vertices it reaches.
closeness_cutoffCentralityExact ThreadsCloseness that only counts vertices within a given distance.
cmp_epsilonSpatial graphs and numbersUnit testsCompares two doubles with a relative tolerance and returns -1, 0 or 1.
cocitationSimilarity, transitivity and mixingExactCounts, for pairs of vertices, how many vertices point to both of them.
cohesionFlows, cuts and traversalExactCohesion of a graph, which is its vertex connectivity.
cohesive_blocksFlows, cuts and traversalExactHierarchy of cohesive blocks of an undirected simple graph (Moody and White 2003).
coloring_greedy_tCliques, independent sets and colouringUnit testsWhich uncoloured vertex vertex_coloring_greedy takes next.
community_eb_get_mergesCommunity detectionExactBuilds the dendrogram, bridges, modularity values and best membership from an edge removal order.
community_edge_betweennessCommunity detectionExactGirvan-Newman method: removes the edge of highest betweenness again and again and records the dendrogram.
community_fastgreedyCommunity detectionSame quality PartialClauset-Newman-Moore greedy modularity optimisation: merges the adjacent pair of communities that raises modularity most, step by step.
community_fluid_communitiesCommunity detectionSame qualityFluid communities: k communities spread over the graph like competing fluids until they settle.
community_infomapCommunity detectionSame quality ThreadsInfomap: finds the partition that gives the shortest description of a random walk (the map equation).
community_label_propagationCommunity detectionExactLabel propagation: each vertex repeatedly takes the label that dominates among its neighbours.
community_leading_eigenvectorCommunity detectionWithin toleranceNewman's leading eigenvector method: splits communities in two by the signs of the leading eigenvector of their modularity matrix.
community_leading_eigenvector_callback_tCommunity detectionUnit testsThe function type community_leading_eigenvector calls after each eigenvector computation.
community_leidenCommunity detectionExactLeiden algorithm: optimises a modularity-type quality with explicit vertex weights and guarantees well-connected communities.
community_leiden_simpleCommunity detectionSame qualityLeiden algorithm with a named objective (modularity, CPM or Erdos-Renyi) instead of explicit vertex weights.
community_multilevelCommunity detectionExactLouvain method: raises modularity by local vertex moves, then collapses communities and repeats.
community_optimal_modularityCommunity detectionExactFinds a partition with the largest possible modularity by exact branch and cut.
community_spinglassCommunity detectionSame qualitySpin-glass community detection: simulated annealing of a Potts model whose lowest energy is a generalised modularity optimum.
community_spinglass_singleCommunity detectionUnit testsFinds the community of one vertex by greedy growth under the spin-glass model and reports its cohesion and adhesion.
community_to_membershipCommunity detectionExactCuts a dendrogram after a given number of merges and gives the cluster of every leaf.
community_voronoiCommunity detectionExactVoronoi communities: picks dense generator vertices and assigns every vertex to its nearest generator.
community_walktrapCommunity detectionExactWalktrap: agglomerative clustering by distances between short random walks.
compare_communitiesCommunity detectionExactMeasures the distance or similarity of two partitions of the same elements.
complementerOperators and bipartite graphsExactComplement graph: the vertex pairs that are not joined.
complex_almost_equalsSpatial graphs and numbersUnit testsTells whether two complex numbers are equal within a relative tolerance.
composeOperators and bipartite graphsExactRelational composition of two graphs.
connect_neighborhoodOperators and bipartite graphsExactJoins every vertex to all vertices within a given distance, in place.
connected_componentsComponents and structureExactFinds the weakly or strongly connected components of a graph.
constraintCentralityExactBurt's constraint: how strongly each vertex's contacts are tied to one another.
contract_verticesOperators and bipartite graphsExactMerges vertices according to a mapping, in place.
convergence_degreeCentralityExactConvergence degree of each edge: whether shortest paths funnel into it or fan out from it.
convex_hull_2dSpatial graphs and numbersExactFinds the corners of the convex hull of a planar point set, in clockwise order.
copyGraph basicsExactDuplicates a graph into a new, independent graph object.
corenessComponents and structureExactComputes the k-core index (shell index) of every vertex.
correlated_gameRandom graphsSame qualityDraws a random graph correlated with a given simple graph.
correlated_pair_gameRandom graphsSame qualityDraws two correlated G(n, p) graphs.
count_adjacent_trianglesCycles, motifs and epidemicsExactCounts, for each selected vertex, the triangles it belongs to.
count_automorphismsIsomorphismExactCounts the automorphisms of a graph, optionally keeping vertex colours fixed.
count_automorphisms_blissIsomorphismExactCounts automorphisms exactly, with a chosen heuristic; the group order comes back as a decimal string.
count_isomorphisms_vf2IsomorphismExactCounts all isomorphisms between two graphs with VF2.
count_loopsComponents and structureExactCounts the self-loops of a graph.
count_multipleComponents and structureExactGives, for each selected edge, how many edges are parallel to it (itself included).
count_multiple_1Components and structureExactGives the multiplicity of a single edge.
count_reachableComponents and structureExact SIMDCounts, for every vertex, how many vertices it can reach.
count_subisomorphisms_vf2IsomorphismExactCounts the occurrences of graph2 as a subgraph of graph1 with VF2.
count_trianglesCycles, motifs and epidemicsExactCounts the triangles of the graph.
createDeterministic generatorsExactBuilds a graph from a flat vector of edge endpoints.
create_bipartiteOperators and bipartite graphsExactBuilds a graph from vertex kinds and an edge list, checking that every edge joins the two kinds.
cycle_graphDeterministic generatorsExactBuilds the cycle on n vertices.
cycle_handler_tCycles, motifs and epidemicsExactThe type of the function simple_cycles_callback calls for each cycle.
de_bruijnDeterministic generatorsExactBuilds the de Bruijn graph of strings of length n over m letters.
decomposeComponents and structureExactSplits a graph into its connected components, each as a graph of its own.
degreeGraph basicsExactThe degrees of a set of vertices.
degree_1Graph basicsExactDegree of one vertex, returned through a pointer.
degree_correlation_vectorSimilarity, transitivity and mixingExactComputes the mean neighbour degree as a function of a vertex's degree, over all edges.
degree_sequence_gameRandom graphsSame qualityDraws a random graph with exactly the given degree sequence.
delaunay_graphSpatial graphs and numbersExactBuilds the Delaunay graph of a point set, in any dimension.
delete_edgesGraph basicsExactRemoves the edges an edge selector names.
delete_verticesGraph basicsExactRemoves vertices together with every edge that touches them.
delete_vertices_mapGraph basicsUnit testsRemoves vertices like delete_vertices and reports where every vertex went.
densityComponents and structureExactComputes the density: edges present over edges possible.
destroyGraph basicsUnit testsFrees everything a graph owns.
dfsFlows, cuts and traversalExactDepth-first search with discovery and finishing orders and optional callbacks.
dfshandler_tFlows, cuts and traversalUnit testsType of the dfs callbacks.
diameterPaths and distancesExact ThreadsThe longest shortest-path length in the graph, with its end points and one path between them.
differenceOperators and bipartite graphsExactEdges of one graph that are not in another, on shared vertex ids.
dim_selectLinear algebra and embeddingsExactChooses how many leading values of a decreasing sequence (a scree plot) stand apart from the rest, by Zhu and Ghodsi's profile likelihood.
disjoint_unionOperators and bipartite graphsExactPuts two graphs side by side in one graph.
disjoint_union_manyOperators and bipartite graphsExactPuts any number of graphs side by side in one graph.
distancesPaths and distancesExact ThreadsShortest-path lengths from a set of source vertices to a set of target vertices, with the algorithm chosen from the weights.
distances_bellman_fordPaths and distancesExactShortest-path lengths that allow negative weights, by the Bellman-Ford algorithm.
distances_cutoffPaths and distancesExact ThreadsShortest-path lengths as distances, but paths longer than a cutoff are not followed.
distances_dijkstraPaths and distancesExact ThreadsShortest-path lengths with non-negative weights, by Dijkstra's algorithm from each source.
distances_dijkstra_cutoffPaths and distancesExact ThreadsDijkstra shortest-path lengths that stop at a given path length.
distances_floyd_warshallPaths and distancesExactAll-pairs shortest-path lengths by the Floyd-Warshall algorithm, original or tree variant.
distances_johnsonPaths and distancesExact ThreadsShortest-path lengths with negative weights, by Johnson's reweighting and one Dijkstra search per source.
diversityComponents and structureExactComputes the structural diversity of vertices: the evenness of their edge weights.
dominator_treeFlows, cuts and traversalExactImmediate dominators of a directed flowgraph, and its dominator tree.
dot_product_gameRandom graphsSame qualityDraws a graph in which each pair connects with the dot product of the two vertices' latent vectors as its probability.
dqueue_backMatrices, stacks, queues and heapsUnit testsReturns the last element (the newest) without removing it.
dqueue_clearMatrices, stacks, queues and heapsUnit testsEmpties a double-ended queue but keeps its storage.
dqueue_destroyMatrices, stacks, queues and heapsUnit testsFrees the storage of a double-ended queue.
dqueue_emptyMatrices, stacks, queues and heapsUnit testsTells whether a double-ended queue has no elements.
dqueue_fullMatrices, stacks, queues and heapsUnit testsTells whether the next push will have to grow the storage.
dqueue_getMatrices, stacks, queues and heapsUnit testsReturns the element at a given position counted from the head.
dqueue_headMatrices, stacks, queues and heapsUnit testsReturns the first element (the oldest) without removing it.
dqueue_initMatrices, stacks, queues and heapsUnit testsCreates an empty double-ended queue with room for a given number of elements.
dqueue_popMatrices, stacks, queues and heapsUnit testsRemoves the head element (the oldest) and returns it.
dqueue_pop_backMatrices, stacks, queues and heapsUnit testsRemoves the back element (the newest) and returns it.
dqueue_pushMatrices, stacks, queues and heapsUnit testsAppends an element at the back of a double-ended queue.
dqueue_sizeMatrices, stacks, queues and heapsUnit testsTells how many elements a double-ended queue holds.
dqueue_tMatrices, stacks, queues and heapsUnit testsA double-ended queue of real numbers in a ring buffer.
dyad_censusCycles, motifs and epidemicsExactCounts the mutual, asymmetric and unconnected pairs of vertices.
eccSimilarity, transitivity and mixingExactComputes the edge clustering coefficient of selected edges.
eccentricityPaths and distancesExact ThreadsEccentricity of the chosen vertices: the distance to the farthest vertex each one reaches.
ecountGraph basicsExactHow many edges the graph has.
edgeGraph basicsUnit testsThe two endpoints of one edge.
edge_betweennessCentralityExact ThreadsEdge betweenness: how many shortest paths run along each edge.
edge_betweenness_cutoffCentralityExact ThreadsEdge betweenness counting only shortest paths no longer than a cutoff.
edge_betweenness_subsetCentralityExact ThreadsEdge betweenness counting only shortest paths from chosen sources to chosen targets.
edge_connectivityFlows, cuts and traversalExactSmallest number of edges whose removal disconnects the graph.
edge_disjoint_pathsFlows, cuts and traversalExactLargest number of source-target paths that share no edge.
edge_type_sw_tRandom graphsUnit testsBit switches saying which non-simple edges a function may create.
edgelist_percolationComponents and structureUnit testsBond percolation on a plain list of vertex pairs, without building a graph.
edgesGraph basicsExactThe endpoints of the edges an edge selector names, as one integer vector.
eigenvector_centralityCentralityWithin tolerance SIMDEigenvector centrality: each score a fixed multiple of the neighbours' summed scores, scaled so the largest is 1.
eit_createGraph basicsUnit testsResolves an edge selector against a graph into an iterator.
eit_destroyGraph basicsUnit testsReleases any id list an edge iterator built.
emptyGraph basicsExactMakes a graph with n vertices, numbered 0 to n - 1, and no edges.
empty_attrsGraph basicsUnit testsSame as empty, and hands a list of graph-attribute records to the attribute handler.
enter_safelocaleReading and writing filesUnit testsSwitches the calling thread to the C numeric locale, so that numbers are read and written with a decimal point.
erdos_renyi_game_gnmRandom graphsSame qualityDraws a uniformly random graph with n vertices and exactly m edges, G(n, m).
erdos_renyi_game_gnpRandom graphsSame qualityDraws a random graph in which every vertex pair is joined independently with probability p, G(n, p).
errorGraph basicsUnit testsHands an error code and message to the current error handler.
error_handler_abortGraph basicsUnit testsThe default error handler: prints the error and stops the process.
error_handler_ignoreGraph basicsUnit testsError handler that frees the failing call's temporary objects and lets the error code reach the caller.
error_handler_printignoreGraph basicsUnit testsLike error_handler_ignore, but prints the error first.
error_handler_tGraph basicsUnit testsFunction type for the routine that receives every reported error.
error_tGraph basicsUnit testsThe return type of every Open Graph function that can fail.
error_type_tGraph basicsUnit testsThe enumeration of Open Graph's error codes.
errorfGraph basicsUnit testsReports an error with a printf-style message.
es_1Graph basicsUnit testsSelector naming exactly one edge id.
es_allGraph basicsUnit testsEdge selector for every edge, in a chosen order.
es_all_betweenGraph basicsUnit testsEdge selector for all edges between two vertices.
es_as_vectorGraph basicsUnit testsThe edge ids a selector resolves to, as a vector.
es_copyGraph basicsUnit testsCopies an edge selector.
es_destroyGraph basicsUnit testsFrees what an edge selector owns.
es_incidentGraph basicsUnit testsEdge selector for the edges incident on one vertex.
es_is_allGraph basicsUnit testsTells whether a selector is the all-edges selector in id order.
es_noneGraph basicsUnit testsSelector that resolves to no edge at all.
es_pairsGraph basicsUnit testsEdge selector for the edges between given vertex pairs.
es_pairs_smallGraph basicsUnit testsEdge selector for vertex pairs given as int arguments ending in -1.
es_pathGraph basicsUnit testsEdge selector for the edges along a vertex path.
es_rangeGraph basicsUnit testsEdge selector for the ids start, start + 1, ..., end - 1.
es_sizeGraph basicsUnit testsThe number of edges a selector resolves to in a graph.
es_typeGraph basicsUnit testsReports which variant (all, pairs, path, ...) an edge selector is.
es_vectorGraph basicsUnit testsEdge selector that borrows the caller's vector of edge ids.
es_vector_copyGraph basicsUnit testsEdge selector that keeps its own copy of a vector of edge ids.
ess_1Graph basicsUnit testsImmediate selector for a single edge.
ess_allGraph basicsUnit testsImmediate selector for every edge, in a chosen order.
ess_noneGraph basicsUnit testsImmediate selector for no edges.
ess_rangeGraph basicsUnit testsImmediate selector for the edge ids start .. end - 1.
ess_vectorGraph basicsUnit testsImmediate selector that borrows a vector of edge ids.
establishment_gameRandom graphsSame qualityGrows a graph in which each new vertex tries k earlier vertices and links by type preference.
eulerian_cycleCycles, motifs and epidemicsExactReturns an Eulerian cycle: a closed walk that uses every edge exactly once.
eulerian_pathCycles, motifs and epidemicsExactReturns an Eulerian path: a walk that uses every edge exactly once.
even_tarjan_reductionCliques, independent sets and colouringUnit testsBuilds the split directed graph whose maximum flows count vertex-disjoint paths.
executor_tThreadsUnit tests Threads ExtensionA host's way of running Open Graph's tasks on its own thread pool.
exit_safelocaleReading and writing filesUnit testsRestores the numeric locale that enter_safelocale replaced.
expand_path_to_pairsGraph basicsUnit testsTurns a vertex path into the list of its consecutive vertex pairs, in place.
extended_chordal_ringDeterministic generatorsExactBuilds an extended chordal ring: a cycle plus chords from a periodic offset table.
famousDeterministic generatorsExactBuilds a named graph from a built-in collection of well-known graphs.
fatalGraph basicsUnit testsStops on an unrecoverable condition through the fatal handler; never returns.
fatal_handler_abortGraph basicsUnit testsThe default fatal-error handler: prints the message and aborts.
fatal_handler_tGraph basicsUnit testsFunction type for the routine called on unrecoverable internal failures.
fatalfGraph basicsUnit testsReports a fatal error with a printf-style message; never returns.
feedback_arc_setCycles, motifs and epidemicsExact PartialFinds a set of edges whose removal leaves the graph without cycles, exactly or with the Eades heuristic.
feedback_vertex_setCycles, motifs and epidemicsWithin toleranceFinds a minimum-weight set of vertices that meets every cycle.
find_cycleCycles, motifs and epidemicsUnit testsReturns one cycle of the graph, or two empty vectors when it has none.
forest_fire_gameRandom graphsSame qualityGrows a graph by the forest fire model.
freeGraph basicsUnit testsFrees a block from malloc, calloc or realloc.
from_hrg_dendrogramHierarchical random graphs and progressExactTurns an HRG's dendrogram into a directed tree graph.
from_pruferDeterministic generatorsExactBuilds the labelled tree that a Prüfer sequence encodes.
fullDeterministic generatorsExactBuilds the complete graph on n vertices.
full_bipartiteOperators and bipartite graphsExactComplete bipartite graph K(n1, n2).
full_citationDeterministic generatorsExactBuilds the complete citation graph: every vertex points to all earlier vertices.
full_multipartiteDeterministic generatorsExactBuilds the complete multipartite graph for given part sizes.
fundamental_cyclesCycles, motifs and epidemicsExactReturns the cycles closed by the non-tree edges of a breadth-first tree: a cycle basis.
gabriel_graphSpatial graphs and numbersUnit testsBuilds the Gabriel graph: two points are joined when no other point lies in the ball that has them as a diameter.
generalized_petersenDeterministic generatorsExactBuilds the generalized Petersen graph GP(n, k).
get_adjacencyComponents and structureExactBuilds the dense adjacency matrix of a graph.
get_adjacency_sparseComponents and structureExactBuilds the adjacency matrix of a graph in sparse form.
get_all_eids_betweenGraph basicsUnit testsLists the ids of all edges between two vertices, parallel edges included.
get_all_shortest_pathsPaths and distancesExactEvery shortest path from one source to the chosen targets, and the number of shortest paths to each vertex.
get_all_shortest_paths_dijkstraPaths and distancesExactEvery shortest path from one source to the chosen targets, with non-negative weights.
get_all_simple_pathsPaths and distancesExactEvery simple path (no vertex twice) from a source to the chosen targets.
get_biadjacencyOperators and bipartite graphsExactBiadjacency matrix of a bipartite graph.
get_edgelistComponents and structureExactReturns the edges as a flat list of vertex pairs.
get_eidGraph basicsExactFinds the id of an edge between two vertices.
get_eidsGraph basicsExactLooks up the edge ids for a list of vertex pairs.
get_executorThreadsUnit tests Threads ExtensionReturns the installed executor, or NULL for Open Graph's own threads.
get_isomorphisms_vf2IsomorphismExactLists every isomorphism between two graphs with VF2.
get_isomorphisms_vf2_callbackIsomorphismExactRuns the VF2 isomorphism search and calls a function for every mapping found.
get_k_shortest_pathsPaths and distancesExactThe k shortest paths without repeated vertices between two vertices, by Yen's algorithm.
get_laplacianSimilarity, transitivity and mixingExactBuilds the Laplacian matrix of a graph, plain or normalized.
get_laplacian_sparseSimilarity, transitivity and mixingExactBuilds the Laplacian matrix in sparse form.
get_num_procsThreadsUnit tests ExtensionReturns the number of logical processors of the machine.
get_num_threadsThreadsUnit tests Threads ExtensionReturns the number of threads the parallel kernels may use.
get_shortest_pathPaths and distancesExactA shortest route from a given source to a given target.
get_shortest_path_astarPaths and distancesExactA shortest route from a given source to a given target by A* search, guided by an estimate of the remaining distance.
get_shortest_path_bellman_fordPaths and distancesExactA shortest route from a given source to a given target, negative weights allowed (Bellman-Ford).
get_shortest_path_dijkstraPaths and distancesExactA shortest route from a given source to a given target, non-negative weights (Dijkstra).
get_shortest_pathsPaths and distancesExactOne shortest path from a source to each target, as vertex lists and edge lists.
get_shortest_paths_bellman_fordPaths and distancesExactOne shortest path from a source to each target, negative weights allowed (Bellman-Ford).
get_shortest_paths_dijkstraPaths and distancesExactOne shortest path from a source to each target with non-negative weights (Dijkstra).
get_stochasticComponents and structureExactBuilds the transition matrix of the random walk on a graph.
get_stochastic_sparseComponents and structureExactBuilds the random-walk transition matrix in sparse form.
get_subisomorphisms_vf2IsomorphismExactLists every occurrence of graph2 as a subgraph of graph1 with VF2.
get_subisomorphisms_vf2_callbackIsomorphismExactRuns the VF2 subgraph search and calls a function for every match found.
get_widest_pathPaths and distancesUnit testsA path between two vertices whose narrowest edge is as wide as possible.
get_widest_pathsPaths and distancesUnit testsA widest path from a source to each target, with the tree of widest paths.
girthPaths and distancesExactGirth: how many edges the shortest cycle has, and one such cycle.
global_efficiencyPaths and distancesExact ThreadsMean inverse shortest-path length over all ordered pairs of distinct vertices.
gomory_hu_treeFlows, cuts and traversalExactGomory-Hu tree: a tree holding the minimum cut value of every vertex pair.
graph_centerPaths and distancesExact ThreadsThe vertices of smallest eccentricity.
graph_countIsomorphismExactNumber of unlabelled graphs on n vertices.
graph_powerOperators and bipartite graphsExactGraph power: joins every pair of vertices at most k steps apart.
graphletsCycles, motifs and epidemicsWithin toleranceDecomposes a weighted graph into weighted cliques (graphlets).
graphlets_candidate_basisCycles, motifs and epidemicsExactFinds the candidate cliques for a graphlet decomposition, each with its threshold.
graphlets_projectCycles, motifs and epidemicsWithin toleranceFits weights to given cliques so that together they explain the edge weights.
grg_gameRandom graphsSame qualityDraws a random geometric graph: points in the unit square joined when closer than a radius.
growing_random_gameRandom graphsSame qualityGrows a graph by adding one vertex and m uniformly random edges per step.
harmonic_centralityCentralityExact ThreadsHarmonic centrality: the sum of the inverse distances from each vertex to all others.
harmonic_centrality_cutoffCentralityExact ThreadsHarmonic centrality that only counts vertices within a given distance.
has_loopComponents and structureExactTells whether a graph has at least one self-loop.
has_multipleComponents and structureExactTells whether a graph has at least one pair of parallel edges.
has_mutualComponents and structureExactTells whether a directed graph has at least one pair of opposite edges.
heap_clearMatrices, stacks, queues and heapsUnit testsEmpties a heap but keeps its storage.
heap_delete_topMatrices, stacks, queues and heapsUnit testsRemoves the top element of a heap and returns it.
heap_destroyMatrices, stacks, queues and heapsUnit testsFrees the storage of a heap.
heap_emptyMatrices, stacks, queues and heapsUnit testsTells whether a heap has no elements.
heap_initMatrices, stacks, queues and heapsUnit testsCreates an empty binary heap with room for a given number of elements.
heap_init_arrayMatrices, stacks, queues and heapsUnit testsCreates a heap holding a copy of a C array.
heap_min_tMatrices, stacks, queues and heapsUnit testsA binary minimum heap of real numbers.
heap_popMatrices, stacks, queues and heapsUnit testsRemoves the top element of a heap and returns it (another name for heap_delete_top).
heap_pushMatrices, stacks, queues and heapsUnit testsAdds an element to a heap.
heap_reserveMatrices, stacks, queues and heapsUnit testsMakes room for at least a given number of elements.
heap_sizeMatrices, stacks, queues and heapsUnit testsTells how many elements a heap holds.
heap_tMatrices, stacks, queues and heapsUnit testsA binary maximum heap of real numbers.
heap_topMatrices, stacks, queues and heapsUnit testsReturns the top element (the largest, or the smallest for heap_min_t) without removing it.
hexagonal_latticeDeterministic generatorsExactBuilds a honeycomb lattice of hexagons in one of three outlines.
hrg_consensusHierarchical random graphs and progressSame qualityBuilds the majority consensus tree of dendrograms sampled in proportion to their likelihood.
hrg_createHierarchical random graphs and progressUnit testsBuilds an HRG from a directed binary tree graph and per-vertex probabilities.
hrg_dendrogramHierarchical random graphs and progressExactDeprecated: from_hrg_dendrogram without the probabilities.
hrg_destroyHierarchical random graphs and progressUnit testsReleases the memory of an HRG.
hrg_fitHierarchical random graphs and progressSame qualityFits an HRG to a graph by Markov chain Monte Carlo over dendrograms.
hrg_gameHierarchical random graphs and progressSame qualityDraws one random graph from an HRG (hrg_sample with the arguments swapped).
hrg_initHierarchical random graphs and progressUnit testsInitialises an HRG with room for n vertices, all entries zero.
hrg_predictHierarchical random graphs and progressSame qualityScores the unconnected pairs of vertices as possible missing edges.
hrg_resizeHierarchical random graphs and progressUnit testsChanges the number of leaves of an HRG.
hrg_sampleHierarchical random graphs and progressSame qualityDraws one random graph from an HRG.
hrg_sizeHierarchical random graphs and progressUnit testsReturns the number of vertices (leaves) of an HRG.
hrg_tHierarchical random graphs and progressExactAn HRG: a dendrogram with a connection probability at each internal node.
hsbm_gameRandom graphsSame qualityDraws a hierarchical stochastic block model: equal blocks sharing one internal cluster structure.
hsbm_list_gameRandom graphsSame qualityDraws a hierarchical stochastic block model whose blocks have their own sizes and cluster structures.
hub_and_authority_scoresCentralityWithin tolerance SIMDHub and authority scores (Kleinberg's HITS) of a directed graph.
hypercubeDeterministic generatorsExactBuilds the hypercube of dimension n: 2^n vertices, one per n-bit number.
iea_gameRandom graphsSame qualityPlaces m edges independently on uniformly random vertex pairs (independent edge assignment).
incidentGraph basicsExactLists the ids of the edges incident on one vertex.
inclist_clearString vectors, lists and bit setsUnit testsEmpties every vertex's vector and keeps the number of vertices.
inclist_destroyString vectors, lists and bit setsUnit testsReleases an incidence list with all its vectors.
inclist_getString vectors, lists and bit setsExactGives the incident-edge vector of a vertex in an incidence list.
inclist_initString vectors, lists and bit setsExactBuilds a list of every vertex's incident edges.
inclist_sizeString vectors, lists and bit setsUnit testsTells how many vertices an incidence list covers.
independence_numberCliques, independent sets and colouringExactIndependence number: how many vertices a maximum independent set has.
independent_vertex_setsCliques, independent sets and colouringExactLists every independent vertex set in a size range.
induced_subgraphOperators and bipartite graphsExactSubgraph made of the selected vertices and every edge between them.
induced_subgraph_edgesOperators and bipartite graphsExactIds of the edges whose two endpoints are both selected.
induced_subgraph_mapOperators and bipartite graphsExactInduced subgraph, also returning how vertex ids map between the graph and the result.
intersectionOperators and bipartite graphsExactIntersection of two graphs on shared vertex ids.
intersection_manyOperators and bipartite graphsExactIntersection of any number of graphs on shared vertex ids.
invalidate_cacheGraph basicsUnit testsForgets every cached whole-graph property.
invert_permutationIsomorphismUnit testsComputes the inverse of a permutation.
is_acyclicCycles, motifs and epidemicsExactTells whether the graph has no cycle at all, directed or undirected.
is_biconnectedComponents and structureExactTells whether a graph is biconnected.
is_bigraphicalComponents and structureExactTells whether two degree sequences can be the sides of a bipartite graph.
is_bipartiteOperators and bipartite graphsExactTests whether the vertices split into two kinds with every edge between the kinds, and returns such a split.
is_bipartite_coloringCliques, independent sets and colouringUnit testsChecks that a two-colouring puts the ends of every edge on different sides, and tells which way the edges run.
is_chordalComponents and structureExactTells whether a graph is chordal, and gives the edges that would make it chordal.
is_cliqueCliques, independent sets and colouringExactTests whether the selected vertices are pairwise adjacent.
is_completeCliques, independent sets and colouringExactTells whether every pair of distinct vertices is joined by an edge.
is_connectedComponents and structureExactTells whether a graph is weakly or strongly connected.
is_dagCycles, motifs and epidemicsExactTests for a DAG: a directed graph without directed cycles.
is_directedGraph basicsExactTells whether a graph is directed.
is_edge_coloringCliques, independent sets and colouringUnit testsChecks that edges sharing a vertex have different colours.
is_eulerianCycles, motifs and epidemicsExactTells whether the graph has an Eulerian path and whether it has an Eulerian cycle.
is_forestComponents and structureExactTells whether a graph is a forest, and lists one root per tree.
is_graphicalComponents and structureExactTells whether a degree sequence can be realized by a graph with the allowed edge types.
is_independent_vertex_setCliques, independent sets and colouringExactTests whether no two of the selected vertices are adjacent.
is_loopComponents and structureExactTells, for each selected edge, whether it is a self-loop.
is_matchingSimilarity, transitivity and mixingExactTells whether a vector describes a valid matching of the graph.
is_maximal_matchingSimilarity, transitivity and mixingExactTells whether a matching is maximal: no edge could be added to it.
is_minimal_separatorCliques, independent sets and colouringExactTests whether a vertex set separates the graph while no proper subset of it does.
is_multipleComponents and structureExactTells, for each selected edge, whether it repeats an earlier parallel edge.
is_mutualComponents and structureExactTells, for each selected edge, whether its reverse edge exists too.
is_perfectCliques, independent sets and colouringUnit testsTests whether a simple undirected graph is perfect.
is_same_graphGraph basicsUnit testsChecks whether two graphs have the same directedness, vertex count and edge multiset.
is_separatorCliques, independent sets and colouringExactTests whether removing a vertex set disconnects vertices that were connected.
is_simpleComponents and structureExactTells whether a graph has no self-loops and no multi-edges.
is_treeComponents and structureExactTells whether a graph is a tree, and finds its root.
is_vertex_coloringCliques, independent sets and colouringUnit testsChecks that no edge joins two vertices of the same colour.
isoclassIsomorphismExactReturns the isomorphism class of a graph with 3 to 6 vertices (undirected) or 3 to 4 vertices (directed).
isoclass_createIsomorphismExactBuilds a graph of a given isomorphism class.
isoclass_subgraphIsomorphismExactReturns the isomorphism class of the subgraph induced by a few chosen vertices.
isocompat_tIsomorphismUnit testsType of the compatibility tests the VF2 functions accept for vertex and edge pairs.
isohandler_tIsomorphismUnit testsType of the function called by the VF2 searches for every mapping found.
isomorphicIsomorphismExactDecides whether two graphs are isomorphic, choosing the method itself.
isomorphic_blissIsomorphismExactDecides isomorphism by canonical labelling and returns a mapping when the graphs are isomorphic.
isomorphic_vf2IsomorphismExactDecides isomorphism with VF2, with optional vertex and edge colours and custom compatibility tests, and returns the first mapping.
jacobian_betweenness_marginsJacobianUnit tests Threads ExtensionTells how far each edge weight can move before any betweenness can change.
jacobian_columnJacobianWithin tolerance Threads ExtensionReturns how every vertex's centrality responds to the weight of one edge.
jacobian_fullJacobianWithin tolerance Threads ExtensionReturns the whole Jacobian: every vertex's response to every edge weight.
jacobian_measure_from_nameJacobianExact ExtensionParses a measure name, ignoring case.
jacobian_measure_nameJacobianExact ExtensionReturns the name of a measure.
jacobian_measure_tJacobianExact ExtensionThe centrality measures whose sensitivity to edge weights og_jacobian_* compute.
jacobian_method_tJacobianExact ExtensionHow the derivatives are computed: exactly, or by finite differences.
jacobian_options_initJacobianExact ExtensionFills an options structure with the defaults.
jacobian_options_tJacobianExact ExtensionThe options of every Jacobian operation: measure, method, step and the measure's own settings.
jacobian_rowJacobianWithin tolerance Threads ExtensionReturns how one vertex's centrality responds to the weight of every edge.
jacobian_smoothnessJacobianExact ExtensionReturns the smoothness class of a measure.
jacobian_smoothness_tJacobianExact ExtensionHow smoothly a measure depends on the edge weights.
jacobian_top_kJacobianWithin tolerance Threads ExtensionReturns the k edges whose weights move one vertex's centrality the most.
jacobian_warningJacobianExact ExtensionReturns a short warning text for the measures that are not smooth.
joinOperators and bipartite graphsUnit testsDisjoint union of two graphs plus every edge between them.
joint_degree_distributionSimilarity, transitivity and mixingExactBuilds the joint distribution of the degrees at the two ends of the edges.
joint_degree_matrixSimilarity, transitivity and mixingExactBuilds the joint degree matrix: edge counts by the degrees of their two ends.
joint_type_distributionSimilarity, transitivity and mixingExactBuilds the mixing matrix of vertex categories across the edges.
k_regular_gameRandom graphsSame qualityDraws a random k-regular graph.
kary_treeDeterministic generatorsExactBuilds a tree in which every vertex has up to k children, numbered breadth first.
kautzDeterministic generatorsExactBuilds the Kautz graph: strings of length n+1 over m+1 letters with no letter repeated in a row.
lapack_dgeevLinear algebra and embeddingsWithin tolerance SIMDComputes the eigenvalues and, optionally, the left and right eigenvectors of a general real square matrix.
lapack_dgeevxLinear algebra and embeddingsWithin tolerance SIMDlapack_dgeev with a choice of balancing, the balancing details and reciprocal condition numbers.
lapack_dgesvLinear algebra and embeddingsWithin toleranceSolves the square linear system A X = B by LU factorisation with partial pivoting.
lapack_dgetrfLinear algebra and embeddingsExactFactors a general m x n matrix as P A = L U by Gaussian elimination with partial pivoting, in place.
lapack_dgetrsLinear algebra and embeddingsWithin toleranceSolves A X = B or A^T X = B with the LU factors from lapack_dgetrf.
lapack_dsyevrLinear algebra and embeddingsWithin tolerance SIMDEigen-decomposition of a real symmetric matrix: every eigenvalue or a chosen subset, with their eigenvectors when asked for.
laplacian_normalization_tSimilarity, transitivity and mixingExactChooses how get_laplacian() scales D - A.
laplacian_spectral_embeddingLinear algebra and embeddingsWithin tolerance SIMDPlaces the vertices in n dimensions using the leading eigenvectors (undirected) or singular vectors (directed) of a Laplacian of the graph.
largest_cliquesCliques, independent sets and colouringExactFinds all cliques of the largest size.
largest_independent_vertex_setsCliques, independent sets and colouringExactEvery independent vertex set of maximum size.
largest_weighted_cliquesCliques, independent sets and colouringUnit testsFinds the cliques of the largest total vertex weight.
lastcit_gameRandom graphsSame qualityGrows a citation graph in which a vertex's attractiveness depends on how long ago it was last cited.
layout_alignLayoutsExactCentres a layout on the origin and turns it so that its main directions lie along the axes.
layout_bipartiteLayoutsSame qualityDraws a two-mode graph as two horizontal rows and orders each row to reduce edge crossings.
layout_circleLayoutsExactPuts the vertices of a selection on the unit circle at equal angles, in the selection's order.
layout_davidson_harelLayoutsSame qualityDavidson-Harel layout: simulated annealing on an energy that rewards spread, short edges and few crossings.
layout_drlLayoutsSame quality SIMDDrL force-directed layout for large graphs: a density grid and staged annealing.
layout_drl_3dLayoutsSame quality SIMDDrL force-directed layout in three dimensions.
layout_drl_default_tLayoutsUnit testsNames of the ready-made DrL parameter sets.
layout_drl_options_initLayoutsUnit testsFills a DrL parameter struct from one of the ready-made sets.
layout_drl_options_tLayoutsUnit testsParameters of the DrL layout: the edge-cut level and six annealing stages.
layout_fruchterman_reingoldLayoutsWithin tolerance SIMDFruchterman-Reingold force-directed layout in 2D: edges attract, all vertex pairs repel, under a falling temperature.
layout_fruchterman_reingold_3dLayoutsWithin toleranceFruchterman-Reingold force-directed layout in 3D.
layout_gemLayoutsSame qualityGEM layout (Frick, Ludwig and Mehldau): vertices move one at a time, each with its own temperature.
layout_graphoptLayoutsWithin toleranceForce-directed layout after Michael Schmuhl's graphopt: charged vertices repel each other and edges act as springs.
layout_gridLayoutsExactPlaces the vertices on a square grid, row after row.
layout_grid_3dLayoutsExactPlaces the vertices on a 3D grid, filling layer after layer.
layout_kamada_kawaiLayoutsWithin tolerance Threads SIMDKamada-Kawai spring layout: the drawn distance between two vertices follows their graph distance.
layout_kamada_kawai_3dLayoutsWithin tolerance ThreadsKamada-Kawai spring layout in 3D.
layout_lglLayoutsSame qualityLarge Graph Layout: grows the drawing outward from a root, one breadth-first level at a time.
layout_mdsLayoutsWithin tolerance SIMDClassical multidimensional scaling: drawn distances approximate given or shortest-path distances.
layout_merge_dlaLayoutsSame qualityJoins several 2D layouts into one, packing them around each other by diffusion-limited aggregation.
layout_randomLayoutsSame qualityPlaces every vertex at a uniformly random point of the square [-1, 1] x [-1, 1].
layout_random_3dLayoutsSame qualityPlaces every vertex at a uniformly random point of the cube [-1, 1]^3.
layout_reingold_tilfordLayoutsExact ThreadsTidy tree drawing (Reingold-Tilford): one row per level, subtrees packed side by side as tightly as their outlines allow.
layout_reingold_tilford_circularLayoutsExact ThreadsThe Reingold-Tilford tree drawing bent into a circle: the root in the centre, each level on a ring.
layout_sphereLayoutsExactPlaces the vertices on the unit sphere along a spiral from the south pole to the north pole.
layout_starLayoutsExactPuts one vertex at the origin and the others evenly on the unit circle around it.
layout_sugiyamaLayoutsSame qualityLayered drawing of a hierarchy (Sugiyama): vertices on horizontal layers, long edges bent through extra points, few crossings.
layout_umapLayoutsSame qualityUMAP layout of a neighbour graph: graph neighbours stay close, random pairs are pushed apart.
layout_umap_3dLayoutsSame qualityUMAP layout of a neighbour graph in 3D.
layout_umap_compute_weightsLayoutsExactTurns the edge distances of a neighbour graph into UMAP membership weights.
lazy_adjlist_clearString vectors, lists and bit setsUnit testsForgets every stored neighbour vector of a lazy adjacency list.
lazy_adjlist_destroyString vectors, lists and bit setsUnit testsReleases a lazy adjacency list and whatever vectors it stored.
lazy_adjlist_getString vectors, lists and bit setsExactReturns a vertex's neighbour vector, reading it from the graph on first use.
lazy_adjlist_hasString vectors, lists and bit setsUnit testsTells whether a vertex's neighbours have been read already.
lazy_adjlist_initString vectors, lists and bit setsExactSets up an adjacency list that reads a vertex's neighbours only when first asked.
lazy_adjlist_sizeString vectors, lists and bit setsUnit testsTells how many vertices a lazy adjacency list covers.
lazy_inclist_clearString vectors, lists and bit setsUnit testsForgets every stored incident-edge vector of a lazy incidence list.
lazy_inclist_destroyString vectors, lists and bit setsUnit testsReleases a lazy incidence list and whatever vectors it stored.
lazy_inclist_getString vectors, lists and bit setsExactReturns a vertex's incident-edge vector, reading it from the graph on first use.
lazy_inclist_hasString vectors, lists and bit setsUnit testsTells whether a vertex's incident edges have been read already.
lazy_inclist_initString vectors, lists and bit setsExactSets up an incidence list that reads a vertex's incident edges only when first asked.
lazy_inclist_sizeString vectors, lists and bit setsUnit testsTells how many vertices a lazy incidence list covers.
lcfDeterministic generatorsExactBuilds a graph from its LCF notation: a Hamiltonian cycle plus chords.
lcf_smallDeterministic generatorsUnit testsLCF notation with the shifts and the repeat count passed as int arguments.
le_community_to_membershipCommunity detectionUnit testsCuts the leading eigenvector dendrogram, whose leaves are communities rather than vertices.
linegraphOperators and bipartite graphsExactLine graph: one vertex per edge, joined when the edges meet.
list_trianglesCycles, motifs and epidemicsExactLists every triangle of the graph, three vertex ids each.
local_efficiencyPaths and distancesExactFor each chosen vertex, how well its neighbours reach one another when the vertex is taken out.
local_scan_0CentralityExactScan statistic of order 0: the degree of every vertex, or its strength with weights.
local_scan_0_themCentralityExactOrder-0 scan statistic of the graph them, restricted to the edges the graph us has too.
local_scan_1_ecountCentralityExactScan statistic of order 1: the edges (or their weight) among each vertex and its neighbours.
local_scan_1_ecount_themCentralityExactOrder-1 scan statistic with the neighbourhoods taken from us and the edges counted in them.
local_scan_k_ecountCentralityExactScan statistic of order k: the edges (or weight) of the subgraph induced by each vertex's k-step neighbourhood.
local_scan_k_ecount_themCentralityExactOrder-k scan statistic with the neighbourhoods taken from us and the edges counted in them.
local_scan_neighborhood_ecountCentralityExactEdges (or their weight) among given vertex lists, one list per vertex.
local_scan_subset_ecountCentralityExactEdges (or their weight) of the subgraph induced by each given vertex subset.
loops_tComponents and structureExactTells a function how to count self-loops.
lune_beta_skeletonSpatial graphs and numbersUnit testsBuilds the lune-based beta-skeleton of a point set: A and B are joined when a lune-shaped region built on AB holds no other point.
mallocGraph basicsUnit testsAllocates memory the way Open Graph does.
MATRIXMatrices, stacks, queues and heapsUnit testsUnchecked access to element (i, j) of any matrix type.
matrix_addMatrices, stacks, queues and heapsUnit testsAdds a second matrix to the first, element by element.
matrix_add_colsMatrices, stacks, queues and heapsUnit testsAdds columns of zeros at the right.
matrix_add_constantMatrices, stacks, queues and heapsUnit testsIncreases every element by the same amount.
matrix_add_rowsMatrices, stacks, queues and heapsUnit testsAdds rows of zeros at the bottom.
matrix_all_almost_eMatrices, stacks, queues and heapsUnit testsTells whether two real matrices are equal within a relative tolerance.
matrix_all_eMatrices, stacks, queues and heapsUnit testsTells whether two matrices have the same shape and equal elements.
matrix_all_gMatrices, stacks, queues and heapsUnit testsTells whether every element of the first matrix is larger than the matching element of the second.
matrix_all_geMatrices, stacks, queues and heapsUnit testsTells whether every element of the first matrix is at least the matching element of the second.
matrix_all_lMatrices, stacks, queues and heapsUnit testsTells whether every element of the first matrix is smaller than the matching element of the second.
matrix_all_leMatrices, stacks, queues and heapsUnit testsTells whether every element of the first matrix is at most the matching element of the second.
matrix_as_sparsematSparse matricesUnit testsConverts a dense matrix into a sparse matrix, dropping elements close to zero.
matrix_capacityMatrices, stacks, queues and heapsUnit testsReturns how many elements the storage has room for.
matrix_cbindMatrices, stacks, queues and heapsUnit testsAppends the columns of one matrix to the right of another.
matrix_colsumMatrices, stacks, queues and heapsUnit testsComputes the sum of each column.
matrix_complex_all_almost_eMatrices, stacks, queues and heapsUnit testsTells whether two complex matrices are equal within a relative tolerance.
matrix_complex_createMatrices, stacks, queues and heapsUnit testsBuilds a complex matrix from two real matrices: real parts and imaginary parts.
matrix_complex_create_polarMatrices, stacks, queues and heapsUnit testsBuilds a complex matrix from moduli and angles in radians.
matrix_complex_imagMatrices, stacks, queues and heapsUnit testsCopies the imaginary parts of a complex matrix into a real matrix.
matrix_complex_realMatrices, stacks, queues and heapsUnit testsCopies the real parts of a complex matrix into a real matrix.
matrix_complex_realimagMatrices, stacks, queues and heapsUnit testsCopies the real and the imaginary parts of a complex matrix into two real matrices.
matrix_complex_zapsmallMatrices, stacks, queues and heapsUnit testsSets the real or imaginary parts that are very close to zero to exactly zero.
matrix_containsMatrices, stacks, queues and heapsUnit testsTells whether a value occurs in a matrix.
matrix_copy_toMatrices, stacks, queues and heapsUnit testsCopies the elements of a matrix into a plain C array, row by row or column by column.
matrix_destroyMatrices, stacks, queues and heapsUnit testsFrees the storage of a matrix.
matrix_div_elementsMatrices, stacks, queues and heapsUnit testsDivides a matrix by another, element by element.
matrix_emptyMatrices, stacks, queues and heapsUnit testsTells whether a matrix has no elements.
matrix_fillMatrices, stacks, queues and heapsUnit testsSets every element to the same value.
matrix_getMatrices, stacks, queues and heapsUnit testsReturns element (row, col).
matrix_get_colMatrices, stacks, queues and heapsUnit testsCopies one column of a matrix into a vector.
matrix_get_ptrMatrices, stacks, queues and heapsUnit testsReturns a pointer to element (row, col).
matrix_get_rowMatrices, stacks, queues and heapsUnit testsCopies one row of a matrix into a vector.
matrix_initMatrices, stacks, queues and heapsUnit testsCreates an nrow by ncol matrix with every element zero.
matrix_init_arrayMatrices, stacks, queues and heapsUnit testsCreates a matrix from a plain C array given row by row or column by column.
matrix_init_copyMatrices, stacks, queues and heapsUnit testsCreates a new matrix holding a copy of another.
MATRIX_INIT_FINALLYMatrices, stacks, queues and heapsUnit testsInitialises a matrix and registers it on the cleanup stack in one step.
matrix_is_symmetricMatrices, stacks, queues and heapsUnit testsTells whether a matrix is square and equal to its transpose.
matrix_isnullMatrices, stacks, queues and heapsUnit testsTells whether every element is zero.
matrix_maxMatrices, stacks, queues and heapsUnit testsReturns the largest element.
matrix_maxdifferenceMatrices, stacks, queues and heapsUnit testsReturns the largest absolute difference between matching elements of two matrices.
matrix_minMatrices, stacks, queues and heapsUnit testsReturns the smallest element.
matrix_minmaxMatrices, stacks, queues and heapsUnit testsReturns the smallest and the largest element in one pass.
matrix_mul_elementsMatrices, stacks, queues and heapsUnit testsMultiplies two matrices element by element.
matrix_ncolMatrices, stacks, queues and heapsUnit testsReturns the number of columns.
matrix_nrowMatrices, stacks, queues and heapsUnit testsReturns the number of rows.
matrix_nullMatrices, stacks, queues and heapsUnit testsSets every element to zero.
matrix_prodMatrices, stacks, queues and heapsUnit testsReturns the product of all elements.
matrix_rbindMatrices, stacks, queues and heapsUnit testsAppends the rows of one matrix below another.
matrix_remove_colMatrices, stacks, queues and heapsUnit testsDeletes one column.
matrix_remove_rowMatrices, stacks, queues and heapsUnit testsDeletes one row.
matrix_resizeMatrices, stacks, queues and heapsUnit testsChanges the shape of a matrix.
matrix_resize_minMatrices, stacks, queues and heapsUnit testsGives back the spare storage, so that the capacity equals the number of elements.
matrix_rowsumMatrices, stacks, queues and heapsUnit testsComputes the sum of each row.
matrix_scaleMatrices, stacks, queues and heapsUnit testsScales every element by the same factor.
matrix_searchMatrices, stacks, queues and heapsUnit testsFinds the next occurrence of a value, scanning from a position in storage order.
matrix_select_colsMatrices, stacks, queues and heapsUnit testsBuilds a matrix from chosen columns of another, in the order given.
matrix_select_rowsMatrices, stacks, queues and heapsUnit testsBuilds a matrix from chosen rows of another, in the order given.
matrix_select_rows_colsMatrices, stacks, queues and heapsUnit testsBuilds a matrix from chosen rows and columns of another.
matrix_setMatrices, stacks, queues and heapsUnit testsSets element (row, col) to a value.
matrix_set_colMatrices, stacks, queues and heapsUnit testsOverwrites one column with the elements of a vector.
matrix_set_rowMatrices, stacks, queues and heapsUnit testsOverwrites one row with the elements of a vector.
matrix_sizeMatrices, stacks, queues and heapsUnit testsReturns the number of elements, nrow * ncol.
matrix_storage_tMatrices, stacks, queues and heapsUnit testsHow a plain C array lays out a matrix: by rows or by columns.
matrix_subMatrices, stacks, queues and heapsUnit testsSubtracts a second matrix from the first, element by element.
matrix_sumMatrices, stacks, queues and heapsUnit testsReturns the sum of all elements.
matrix_swapMatrices, stacks, queues and heapsUnit testsExchanges the contents of two matrices.
matrix_swap_colsMatrices, stacks, queues and heapsUnit testsExchanges two columns in place.
matrix_swap_rowsMatrices, stacks, queues and heapsUnit testsExchanges two rows in place.
matrix_tMatrices, stacks, queues and heapsUnit testsA dense matrix of real numbers, stored column by column.
matrix_transposeMatrices, stacks, queues and heapsUnit testsTransposes a matrix in place.
matrix_updateMatrices, stacks, queues and heapsUnit testsMakes an existing matrix an exact copy of another.
matrix_viewMatrices, stacks, queues and heapsUnit testsWraps an existing column-major C array as a matrix, without copying.
matrix_view_from_vectorMatrices, stacks, queues and heapsUnit testsWraps the elements of a vector as a matrix with a given number of rows, without copying.
matrix_which_maxMatrices, stacks, queues and heapsUnit testsFinds the row and column of the largest element.
matrix_which_minMatrices, stacks, queues and heapsUnit testsFinds the row and column of the smallest element.
matrix_which_minmaxMatrices, stacks, queues and heapsUnit testsFinds the positions of the smallest and the largest element in one pass.
matrix_zapsmallMatrices, stacks, queues and heapsUnit testsSets the elements that are very close to zero to exactly zero.
maxdegreeCentralityExactThe largest degree among the chosen vertices.
maxflowFlows, cuts and traversalExactMaximum flow from a source to a target, with the flow on every edge and a minimum cut.
maxflow_stats_tFlows, cuts and traversalUnit testsOperation counts of the push-relabel solver.
maxflow_valueFlows, cuts and traversalExactValue of a maximum flow between two vertices.
maximal_cliquesCliques, independent sets and colouringExactLists the cliques that no further vertex can join.
maximal_cliques_callbackCliques, independent sets and colouringExactPasses every maximal clique in a size range to a function instead of storing it.
maximal_cliques_countCliques, independent sets and colouringExactCounts the maximal cliques in a size range without listing them.
maximal_cliques_fileCliques, independent sets and colouringExactWrites the maximal cliques to an open file, one per line.
maximal_cliques_histCliques, independent sets and colouringExactHistogram of maximal clique sizes.
maximal_cliques_subsetCliques, independent sets and colouringUnit testsRuns the maximal clique search from chosen start vertices only.
maximal_independent_vertex_setsCliques, independent sets and colouringExactLists the independent vertex sets that no further vertex can join.
maximum_bipartite_matchingSimilarity, transitivity and mixingWithin toleranceFinds a maximum matching, or a maximum-weight matching, of a bipartite graph.
maximum_cardinality_searchComponents and structureExactOrders the vertices by maximum cardinality search, the first step of a chordality test.
mean_degreeComponents and structureExactComputes the average degree of the vertices.
metric_tSpatial graphs and numbersUnit testsSelects the distance used by the spatial functions: Euclidean or Manhattan.
mincutFlows, cuts and traversalExactMinimum edge cut of the whole graph.
mincut_valueFlows, cuts and traversalExactTotal capacity of a minimum edge cut of the whole graph.
minimum_cycle_basisCycles, motifs and epidemicsExactReturns a cycle basis of the smallest total length (lengths in edges).
minimum_size_separatorsCliques, independent sets and colouringExactLists every vertex separator of the smallest possible size.
minimum_spanning_treeComponents and structureExactFinds a minimum spanning forest and returns its edge ids.
modularityCommunity detectionExactComputes the modularity of a partition of the vertices, with optional weights, resolution and directed form.
modularity_matrixCommunity detectionExactBuilds the modularity matrix: the adjacency matrix minus the null model's expected edge weights.
motifs_handler_tCycles, motifs and epidemicsExactThe type of the function motifs_randesu_callback calls for each motif.
motifs_randesuCycles, motifs and epidemicsExact ThreadsCounts the motifs (connected induced subgraphs) of a given size in each isomorphism class.
motifs_randesu_callbackCycles, motifs and epidemicsExactHands every motif found, with its vertices and its isomorphism class, to a handler.
motifs_randesu_estimateCycles, motifs and epidemicsExact ThreadsEstimates the number of connected subgraphs of a given size from a sample of start vertices.
motifs_randesu_noCycles, motifs and epidemicsExact ThreadsCounts all connected induced subgraphs of a given size, without classifying them.
mycielski_graphDeterministic generatorsExactBuilds Mycielski's triangle-free graph M_k, whose chromatic number is k.
mycielskianOperators and bipartite graphsExactApplies the Mycielski construction k times.
nearest_neighbor_graphSpatial graphs and numbersExactJoins every point to its k nearest neighbours, optionally only those closer than a cutoff.
neighborhoodPaths and distancesExactThe vertices within a given number of steps of each chosen vertex.
neighborhood_graphsPaths and distancesUnit testsThe subgraph induced by each chosen vertex's neighbourhood.
neighborhood_sizePaths and distancesExactHow many vertices lie within a given number of steps of each chosen vertex.
neighborsGraph basicsExactLists the neighbours of one vertex.
neimode_tComponents and structureExactChooses which edges of a directed graph a function follows.
pagerankCentralityWithin tolerancePageRank scores of the vertices (Brin and Page), summing to 1.
pagerank_algo_tCentralityUnit testsNames the PageRank solver; in Open Graph both values give the same scores.
path_graphDeterministic generatorsExactBuilds the path on n vertices.
path_length_histPaths and distancesExact ThreadsHistogram of the unweighted shortest-path lengths between connected pairs.
permute_verticesIsomorphismExactRelabels the vertices of a graph.
personalized_pagerankCentralityWithin tolerancePageRank in which the random jumps follow a given distribution.
personalized_pagerank_vsCentralityWithin tolerancePageRank in which the random jumps go to a chosen set of vertices.
plfit_result_calculate_p_valueSpatial graphs and numbersSame qualityEstimates the p-value of a power-law fit by a semi-parametric bootstrap.
plfit_result_tSpatial graphs and numbersUnit testsThe result of power_law_fit: the fitted power law and how well it fits.
power_law_fitSpatial graphs and numbersWithin toleranceFits a power-law distribution to samples by maximum likelihood, choosing the lower cutoff xmin by the Kolmogorov-Smirnov distance.
preference_gameRandom graphsSame qualityDraws a graph whose vertices get random types and connect with a type-dependent probability.
productOperators and bipartite graphsExactCartesian, lexicographic, strong, tensor or modular product of two graphs.
product_tOperators and bipartite graphsUnit testsThe graph products of product.
progressHierarchical random graphs and progressUnit testsReports progress to the calling thread's progress handler.
progress_handler_stderrHierarchical random graphs and progressUnit testsA ready-made progress handler that prints to stderr.
progress_handler_tHierarchical random graphs and progressUnit testsThe type of a function that receives progress reports from long computations.
progressfHierarchical random graphs and progressUnit testsReports progress with a printf-style message.
pseudo_diameterPaths and distancesUnit testsA quick lower bound of the diameter from repeated farthest-vertex sweeps.
psumtree_destroyString vectors, lists and bit setsUnit testsFrees a prefix sum tree.
psumtree_getString vectors, lists and bit setsUnit testsReturns the value of one item.
psumtree_initString vectors, lists and bit setsUnit testsCreates a prefix sum tree over size items, all with value zero.
psumtree_resetString vectors, lists and bit setsUnit testsSets every value of a prefix sum tree to zero.
psumtree_searchString vectors, lists and bit setsUnit testsMaps a number in [0, total) to the item whose share of the running total contains it.
psumtree_sizeString vectors, lists and bit setsUnit testsTells how many items a prefix sum tree holds.
psumtree_sumString vectors, lists and bit setsUnit testsReturns the total of all item values.
psumtree_updateString vectors, lists and bit setsUnit testsGives one item a new value and refreshes the sums above it.
radiusPaths and distancesExact ThreadsThe smallest eccentricity in the graph.
random_sampleSpatial graphs and numbersSame qualityDraws length distinct integers from the range [l, h], uniformly at random, in increasing order.
random_spanning_treeComponents and structureSame qualityDraws a spanning tree uniformly at random.
random_walkFlows, cuts and traversalSame qualityRandom walk of a given number of steps from a start vertex.
random_walk_stuck_tFlows, cuts and traversalUnit testsWhat random_walk does at a vertex it cannot leave.
reachabilityComponents and structureExact SIMDComputes, for every component, the set of vertices it can reach, as bitsets.
read_graph_dimacs_flowReading and writing filesExactReads a DIMACS network-flow file: a maximum-flow problem with source, target and capacities, or an edge problem with vertex labels.
read_graph_dlReading and writing filesExactReads a UCINET DL file in full-matrix, edge-list or node-list form.
read_graph_edgelistReading and writing filesExactBuilds a graph from a text stream of whitespace-separated vertex id pairs.
read_graph_gmlReading and writing filesExactReads the first graph of a GML file, with its simple-valued attributes.
read_graph_graphdbReading and writing filesExactReads a graph in the binary format of the graph database of De Santo, Foggia, Sansone and Vento (2003).
read_graph_graphmlReading and writing filesExactReads one graph of a GraphML document, with its graph, vertex and edge attributes.
read_graph_lglReading and writing filesExactReads the LGL format, where a "# name" line opens a block that lists that vertex's neighbours.
read_graph_ncolReading and writing filesExactReads a named edge list in the NCOL format of the LGL package: one "name name [weight]" line per edge.
read_graph_pajekReading and writing filesExactReads a Pajek .net file, including two-mode networks, vertex coordinates and drawing parameters.
realize_bipartite_degree_sequenceDeterministic generatorsExactBuilds one bipartite graph with exactly the given degrees on its two sides.
realize_degree_sequenceDeterministic generatorsExactBuilds one graph with exactly the given degrees, by a deterministic greedy construction.
reallocGraph basicsUnit testsChanges the size of a block from malloc, calloc or realloc.
recent_degree_aging_gameRandom graphsSame qualityGrows a graph by recent-degree attachment combined with aging.
recent_degree_gameRandom graphsSame qualityGrows a graph by attachment to vertices that gained many edges recently.
reciprocityComponents and structureExactMeasures how often directed edges are returned.
regular_treeDeterministic generatorsUnit testsBuilds a tree of height h whose inner vertices all have degree k (a finite Bethe lattice).
reindex_membershipCommunity detectionExactRenumbers community ids to 0, 1, 2, ... in order of first appearance.
relative_neighborhood_graphSpatial graphs and numbersUnit testsBuilds the relative neighbourhood graph: two points are joined unless a third point is closer to both of them than they are to each other.
reverse_edgesOperators and bipartite graphsExactReverses the direction of the selected edges, in place.
rewireRandom graphsSame qualityRandomly rewires a graph in place while keeping every vertex's degree.
rewire_directed_edgesRandom graphsSame qualityMoves one chosen endpoint of each directed edge to a random vertex with a given probability, in place.
rewire_edgesRandom graphsSame qualityMoves edge endpoints to uniformly random vertices with a given probability, in place.
rich_club_sequenceSimilarity, transitivity and mixingExactGives the edge count or density of what is left as vertices are removed one by one.
ringDeterministic generatorsExactBuilds a path or a cycle on n vertices.
rng_bitsGraph basicsUnit testsHow many bits one raw draw of the generator holds.
rng_defaultGraph basicsUnit testsReturns the generator that randomised functions use on this thread.
rng_destroyGraph basicsUnit testsFrees a generator's state.
rng_get_binomGraph basicsSame qualityA binomial random count: successes in n independent trials of probability p.
rng_get_boolGraph basicsSame qualityA random true or false, each with probability one half.
rng_get_expGraph basicsSame qualityAn exponentially distributed random real with the given rate.
rng_get_gammaGraph basicsSame qualityA gamma-distributed random real with the given shape and scale.
rng_get_geomGraph basicsSame qualityA geometric random count: failures before the first success, with success probability p.
rng_get_integerGraph basicsExactA uniform random integer between l and h, both included.
rng_get_normalGraph basicsSame qualityA normally distributed random real with mean m and standard deviation s.
rng_get_poisGraph basicsSame qualityA Poisson random count with the given mean.
rng_get_unifGraph basicsSame qualityA uniform random real in [l, h).
rng_get_unif01Graph basicsSame qualityA uniform random real in [0, 1).
rng_initGraph basicsUnit testsCreates a generator of a given type.
rng_maxGraph basicsUnit testsThe largest raw value the generator produces.
rng_nameGraph basicsUnit testsThe name of the generator's type.
rng_sample_dirichletSpatial graphs and numbersSame qualityDraws n samples from the Dirichlet distribution with parameter vector alpha.
rng_sample_sphere_surfaceSpatial graphs and numbersSame qualityDraws points uniformly on the surface of a sphere centred at the origin, in any dimension.
rng_sample_sphere_volumeSpatial graphs and numbersSame qualityDraws points uniformly inside a ball centred at the origin, in any dimension.
rng_seedGraph basicsUnit testsRestarts a generator's stream from a given seed value.
rng_set_defaultGraph basicsUnit testsMakes another generator the calling thread's default.
rngtype_glibc2Graph basicsExactGenerator type: the additive feedback generator behind glibc's random(), 31 bits per draw.
rngtype_mt19937Graph basicsExactGenerator type: the Mersenne Twister MT19937, 32 bits per draw.
rngtype_pcg32Graph basicsExactGenerator type: PCG32 (XSH-RR 64/32), the default generator.
rngtype_pcg64Graph basicsExactGenerator type: PCG64 (XSL-RR 128/64), 64 bits per draw.
rollupRollupWithin tolerance Threads ExtensionMultiplies along every path from the starts and adds the paths up: bills of materials, ownership through chains, reciprocal allocation, Leontief input-output.
ROLLUP_IN_LOOPRollupExact ExtensionThe level rollup gives a vertex inside a solved loop.
rollup_info_tRollupExact ExtensionWhat rollup found on its way, also when it stops with an error.
rollup_loops_tRollupExact ExtensionWhat rollup does when the links it follows loop back.
rollup_options_initRollupExact ExtensionFills the rollup's options with their defaults.
rollup_options_tRollupExact ExtensionThe choices rollup takes.
rooted_productOperators and bipartite graphsExactRooted product: a copy of g2 hung on every vertex of g1 by its root.
roots_for_tree_layoutLayoutsExact ThreadsChooses one root per component for a tree layout.
running_meanSpatial graphs and numbersExactComputes the mean of every window of binwidth consecutive values.
sbm_gameRandom graphsSame qualityDraws a random graph with block structure: blocks of consecutive vertices and one connection probability per block pair (stochastic block model).
set_attribute_tableAttributesUnit testsAttaches an attribute handler for the whole process and returns the previous one.
set_error_handlerGraph basicsUnit testsInstalls the process-wide error handler.
set_executorThreadsUnit tests Threads ExtensionLends a host's thread pool to Open Graph, or restores Open Graph's own threads.
set_fatal_handlerGraph basicsUnit testsReplaces the routine fatal calls, for the whole process.
set_num_threadsThreadsUnit tests Threads ExtensionSets how many threads Open Graph's parallel kernels may use, process-wide.
set_progress_handlerHierarchical random graphs and progressUnit testsInstalls a progress handler for the calling thread, or removes it.
set_status_handlerHierarchical random graphs and progressUnit testsInstalls a status handler for the calling thread, or removes it.
set_warning_handlerGraph basicsUnit testsChooses which routine receives warnings, for the whole process.
setupGraph basicsUnit testsOptional start-up call that reseeds the calling thread's default random number generator from the clock.
simd_featuresSIMDUnit tests SIMD ExtensionReports what the CPU detection saw and which path it chose.
simd_pathSIMDUnit tests SIMD ExtensionReturns the name of the vector-instruction path Open Graph's kernels run on.
similarity_diceSimilarity, transitivity and mixingExact Threads SIMDComputes the Dice similarity of the neighbourhoods of two sets of vertices.
similarity_dice_esSimilarity, transitivity and mixingExact ThreadsComputes the Dice similarity of the two endpoints of each selected edge.
similarity_dice_pairsSimilarity, transitivity and mixingExact ThreadsComputes the Dice similarity for a list of vertex pairs.
similarity_inverse_log_weightedSimilarity, transitivity and mixingExactAdamic-Adar similarity: shared neighbours, each weighted by one over the log of its degree.
similarity_jaccardSimilarity, transitivity and mixingExact Threads SIMDComputes the Jaccard similarity of the neighbourhoods of two sets of vertices.
similarity_jaccard_esSimilarity, transitivity and mixingExact ThreadsComputes the Jaccard similarity of the two endpoints of each selected edge.
similarity_jaccard_pairsSimilarity, transitivity and mixingExact ThreadsComputes the Jaccard similarity for a list of vertex pairs.
simple_cyclesCycles, motifs and epidemicsExactLists every simple cycle of the graph, as vertex lists, edge lists or both.
simple_cycles_callbackCycles, motifs and epidemicsExactCalls a function for every simple cycle instead of collecting them.
simple_interconnected_islands_gameRandom graphsSame qualityDraws a graph of equal random islands joined by a few random edges.
simplifyOperators and bipartite graphsExactRemoves parallel edges, self-loops or both, in place.
simplify_and_colorizeIsomorphismExactTurns a multigraph into a simple graph whose colours record the self-loops and edge multiplicities.
sirCycles, motifs and epidemicsSame qualitySimulates the SIR epidemic model on the graph, no_sim times.
sir_destroyCycles, motifs and epidemicsUnit testsReleases the four vectors of one sir_t.
sir_tCycles, motifs and epidemicsExactOne simulated SIR epidemic: event times and compartment sizes.
site_percolationComponents and structureUnit testsAdds vertices one by one and records the size of the largest component after each.
smallDeterministic generatorsUnit testsBuilds a small graph from endpoints passed directly as int arguments.
spannerComponents and structureSame qualityPicks a sparse subset of edges that keeps every distance within a stretch factor.
sparse_adjacencyDeterministic generatorsUnit testsTurns a sparse matrix of edge counts into a graph.
sparse_weighted_adjacencyDeterministic generatorsUnit testsBuilds a weighted graph from a sparse matrix, one edge per non-zero entry.
sparsemat_addSparse matricesWithin toleranceComputes the linear combination alpha A + beta B of two sparse matrices.
sparsemat_add_colsSparse matricesUnit testsAdds empty columns at the right of a sparse matrix.
sparsemat_add_rowsSparse matricesUnit testsAdds empty rows at the bottom of a sparse matrix.
sparsemat_arpack_rnsolveSparse matricesWithin toleranceFinds selected eigenpairs of a general, non-symmetric sparse matrix.
sparsemat_arpack_rssolveSparse matricesWithin toleranceFinds selected eigenpairs of a symmetric sparse matrix.
sparsemat_as_matrixSparse matricesWithin toleranceExpands a sparse matrix into an ordinary dense matrix_t.
sparsemat_cholsolSparse matricesWithin toleranceSolves A x = b for a symmetric positive definite sparse matrix by Cholesky decomposition.
sparsemat_colsumsSparse matricesWithin toleranceComputes the sum of each column of a sparse matrix.
sparsemat_compressSparse matricesExactBuilds the column-compressed form of a triplet sparse matrix.
sparsemat_count_nonzeroSparse matricesExactCounts the stored elements that are not zero.
sparsemat_count_nonzerotolSparse matricesExactCounts the stored elements whose magnitude is above a tolerance.
sparsemat_destroySparse matricesUnit testsFrees the storage of a sparse matrix.
sparsemat_droptolSparse matricesExactRemoves the elements whose magnitude is at most a tolerance.
sparsemat_dropzerosSparse matricesExactRemoves the elements that are exactly zero.
sparsemat_duplSparse matricesExactSums the pieces stored for the same position of a column-compressed matrix.
sparsemat_entrySparse matricesUnit testsAdds one entry to a sparse matrix in triplet form.
sparsemat_fkeepSparse matricesUnit testsKeeps only the stored entries a callback function accepts.
sparsemat_gaxpySparse matricesWithin toleranceAdds the product of a sparse matrix and a vector to a vector: res = res + A x.
sparsemat_getSparse matricesWithin toleranceReturns element (row, col) of a sparse matrix.
sparsemat_getelementsSparse matricesExactCopies the stored entries of a sparse matrix into three vectors.
sparsemat_getelements_sortedSparse matricesExactCopies the stored entries into three vectors, ordered by column and then by row.
sparsemat_indexSparse matricesWithin toleranceExtracts a submatrix with chosen rows and columns.
sparsemat_initSparse matricesUnit testsCreates an empty sparse matrix in triplet form, ready for entries.
sparsemat_init_copySparse matricesUnit testsCreates a new sparse matrix holding a copy of another.
sparsemat_init_diagSparse matricesUnit testsCreates a square diagonal sparse matrix from a vector of diagonal values.
sparsemat_init_eyeSparse matricesUnit testsCreates an n by n sparse matrix with the same value on every diagonal position.
SPARSEMAT_INIT_FINALLYSparse matricesUnit testsInitialises a sparse matrix and registers it on the cleanup stack in one step.
sparsemat_is_ccSparse matricesExactTrue when a sparse matrix uses the column-compressed layout.
sparsemat_is_symmetricSparse matricesExactTells whether a sparse matrix is square and equal to its transpose.
sparsemat_is_tripletSparse matricesExactTrue when a sparse matrix uses the triplet layout.
sparsemat_iterator_colSparse matricesUnit testsColumn index of the entry the iterator points at.
sparsemat_iterator_endSparse matricesUnit testsTells whether an iterator has passed the last stored entry.
sparsemat_iterator_getSparse matricesUnit testsStored value of the entry the iterator points at.
sparsemat_iterator_idxSparse matricesUnit testsReturns the position of the iterator's current entry in the storage arrays.
sparsemat_iterator_initSparse matricesUnit testsStarts an iterator over the stored entries of a sparse matrix.
sparsemat_iterator_nextSparse matricesUnit testsAdvances an iterator to the next stored entry.
sparsemat_iterator_resetSparse matricesUnit testsMoves an iterator back to the first stored entry.
sparsemat_iterator_rowSparse matricesUnit testsRow index of the entry the iterator points at.
sparsemat_iterator_tSparse matricesUnit testsAn iterator over the stored entries of a sparse matrix.
sparsemat_lsolveSparse matricesWithin toleranceSolves L x = b for a lower triangular sparse matrix L.
sparsemat_ltsolveSparse matricesWithin toleranceSolves L' x = b for a lower triangular sparse matrix L (using its transpose).
sparsemat_luSparse matricesWithin toleranceComputes the LU decomposition P A Q = L U of a square sparse matrix.
sparsemat_luresolSparse matricesWithin toleranceSolves A x = b with an LU decomposition computed earlier.
sparsemat_lusolSparse matricesWithin toleranceSolves A x = b for a square sparse matrix by LU decomposition.
sparsemat_maxSparse matricesExactReturns the largest stored element of a sparse matrix.
sparsemat_minSparse matricesExactReturns the smallest stored element of a sparse matrix.
sparsemat_minmaxSparse matricesExactReturns the smallest and the largest stored element in one pass.
sparsemat_multiplySparse matricesWithin toleranceComputes the matrix product A B of two sparse matrices.
sparsemat_ncolSparse matricesExactReturns the number of columns of a sparse matrix.
sparsemat_nonzero_storageSparse matricesExactCounts the stored entries, pieces and explicit zeros included.
sparsemat_nrowSparse matricesExactReturns the number of rows of a sparse matrix.
sparsemat_numeric_destroySparse matricesUnit testsFrees the result of sparsemat_lu or sparsemat_qr.
sparsemat_numeric_tSparse matricesUnit testsThe result of a numeric factorization (sparsemat_lu or sparsemat_qr).
sparsemat_permuteSparse matricesWithin toleranceReorders the rows and columns of a sparse matrix by two permutations.
sparsemat_printSparse matricesUnit testsWrites the non-zero entries of a sparse matrix to a stream as text.
sparsemat_qrSparse matricesWithin toleranceComputes the Householder QR decomposition of a sparse matrix.
sparsemat_qrresolSparse matricesWithin toleranceSolves a linear system with a QR decomposition computed earlier: least squares or minimum norm.
sparsemat_reallocSparse matricesUnit testsChanges the room a sparse matrix has for entries.
sparsemat_resizeSparse matricesUnit testsReplaces a sparse matrix by an empty one of a new shape.
sparsemat_rowsumsSparse matricesWithin toleranceComputes the sum of each row of a sparse matrix.
sparsemat_scaleSparse matricesUnit testsMultiplies every stored value by a constant.
sparsemat_solve_tSparse matricesUnit testsWhich factorization sparsemat_arpack_rssolve uses for the shifted system in mode 3.
sparsemat_sortSparse matricesExactCreates a copy of a sparse matrix with its entries ordered by column, then by row.
sparsemat_symbluSparse matricesWithin tolerancePrepares an LU decomposition: chooses the column order of a square sparse matrix.
sparsemat_symbolic_destroySparse matricesUnit testsFrees the result of sparsemat_symblu or sparsemat_symbqr.
sparsemat_symbolic_tSparse matricesUnit testsThe result of a symbolic analysis (sparsemat_symblu or sparsemat_symbqr).
sparsemat_symbqrSparse matricesWithin tolerancePrepares a QR decomposition: column order, column elimination tree and row placement.
sparsemat_tSparse matricesUnit testsA sparse real matrix, in triplet or column-compressed form.
sparsemat_transposeSparse matricesWithin toleranceComputes the transpose of a sparse matrix.
sparsemat_typeSparse matricesExactTells which of the two layouts a sparse matrix uses.
sparsemat_type_tSparse matricesUnit testsThe two layouts of a sparse matrix.
sparsemat_usolveSparse matricesWithin toleranceSolves U x = b for an upper triangular sparse matrix U.
sparsemat_utsolveSparse matricesWithin toleranceSolves U' x = b for an upper triangular sparse matrix U (using its transpose).
spatial_edge_lengthsSpatial graphs and numbersUnit testsComputes the length of every edge from the coordinates of its end points.
split_join_distanceCommunity detectionExactGives the two projection distances between two partitions; their sum is the split-join distance.
square_latticeDeterministic generatorsExactBuilds a square grid lattice in any number of dimensions, optionally periodic.
st_edge_connectivityFlows, cuts and traversalExactSmallest number of edges whose removal leaves no path from the source to the target.
st_mincutFlows, cuts and traversalExactMinimum s-t cut: the cheapest edge set whose removal separates the target from the source.
st_mincut_valueFlows, cuts and traversalExactCapacity of a minimum cut between two vertices.
st_vertex_connectivityFlows, cuts and traversalExactSmallest number of vertices whose removal leaves no path from the source to the target.
stack_clearMatrices, stacks, queues and heapsUnit testsEmpties a stack but keeps its storage.
stack_destroyMatrices, stacks, queues and heapsUnit testsFrees the storage of a stack.
stack_emptyMatrices, stacks, queues and heapsUnit testsTells whether a stack has no elements.
stack_initMatrices, stacks, queues and heapsUnit testsCreates an empty stack with room for a given number of elements.
stack_popMatrices, stacks, queues and heapsUnit testsRemoves the top element of a stack and returns it.
stack_pushMatrices, stacks, queues and heapsUnit testsPushes an element; it becomes the new top of the stack.
stack_reserveMatrices, stacks, queues and heapsUnit testsMakes room for at least a given number of elements.
stack_sizeMatrices, stacks, queues and heapsUnit testsTells how many elements a stack holds.
stack_tMatrices, stacks, queues and heapsUnit testsA last-in, first-out stack of real numbers.
stack_topMatrices, stacks, queues and heapsUnit testsReturns the top element of a stack without removing it.
starDeterministic generatorsExactBuilds a star: one center vertex joined to every other vertex.
static_fitness_gameRandom graphsSame qualityDraws a graph with a fixed number of edges whose endpoints are chosen in proportion to vertex fitness.
static_power_law_gameRandom graphsSame qualityDraws a graph with a power-law degree distribution through the static fitness model.
statusHierarchical random graphs and progressUnit testsReports a status message to the calling thread's status handler.
status_handler_stderrHierarchical random graphs and progressUnit testsA ready-made status handler that writes to stderr.
status_handler_tHierarchical random graphs and progressUnit testsThe type of a function that receives status messages.
statusfHierarchical random graphs and progressUnit testsReports a status message with a printf-style template.
strengthCentralityExactWeighted degree: the total weight of the edges at each chosen vertex.
strerrorGraph basicsUnit testsA short English text for an error code.
strvector_appendString vectors, lists and bit setsUnit testsAppends copies of all strings of one vector to another.
strvector_capacityString vectors, lists and bit setsUnit testsReturns how many entries fit before the vector must reallocate.
strvector_clearString vectors, lists and bit setsUnit testsRemoves every entry and keeps the allocated capacity.
strvector_destroyString vectors, lists and bit setsUnit testsReleases a string vector together with all its strings.
strvector_getString vectors, lists and bit setsUnit testsReturns the string at a position; an empty entry reads as "".
strvector_initString vectors, lists and bit setsUnit testsCreates a string vector holding size empty strings.
strvector_init_copyString vectors, lists and bit setsUnit testsCreates a string vector that is a deep copy of another.
strvector_mergeString vectors, lists and bit setsUnit testsHands all strings of one vector over to another, appending them without copying.
strvector_push_backString vectors, lists and bit setsUnit testsAppends a copy of a string at the end.
strvector_push_back_lenString vectors, lists and bit setsUnit testsAppends at most len bytes of a string at the end.
strvector_removeString vectors, lists and bit setsUnit testsRemoves one entry and moves the later entries down by one.
strvector_remove_sectionString vectors, lists and bit setsUnit testsRemoves the entries at positions from .. to-1.
strvector_reserveString vectors, lists and bit setsUnit testsAllocates room for at least capacity entries.
strvector_resizeString vectors, lists and bit setsUnit testsGrows or shrinks a string vector to a given number of entries.
strvector_resize_minString vectors, lists and bit setsUnit testsShrinks the allocated storage to the current number of entries.
strvector_setString vectors, lists and bit setsUnit testsReplaces the string at a position with a copy of value.
strvector_set_lenString vectors, lists and bit setsUnit testsReplaces the string at a position with at most len bytes of value.
strvector_sizeString vectors, lists and bit setsUnit testsTells how many entries a string vector holds.
strvector_swapString vectors, lists and bit setsUnit testsExchanges what two string vectors hold.
strvector_swap_elementsString vectors, lists and bit setsUnit testsExchanges two entries of a string vector.
strvector_updateString vectors, lists and bit setsUnit testsOverwrites a string vector with a copy of another.
subcomponentComponents and structureExactLists the vertices reachable from a vertex, in breadth-first order.
subgraph_from_edgesOperators and bipartite graphsExactSubgraph made of the selected edges.
subgraph_implementation_tOperators and bipartite graphsUnit testsHow induced_subgraph builds its result.
subisomorphicIsomorphismExactDecides whether graph2 occurs as a subgraph of graph1.
subisomorphic_ladIsomorphismExactFinds copies of a pattern graph in a target graph with Solnon's LAD algorithm, optionally induced and with candidate lists per vertex.
subisomorphic_vf2IsomorphismExactDecides with VF2 whether graph2 occurs as a subgraph of graph1, and returns the first match.
symmetric_treeDeterministic generatorsUnit testsBuilds a tree whose number of children is set level by level.
task_fn_tThreadsUnit tests Threads ExtensionOne task of a parallel kernel: runs part task of the kernel's work.
to_directedComponents and structureExactTurns an undirected graph into a directed one, in place.
to_pruferComponents and structureExactEncodes a labelled tree as its Pruefer sequence.
to_undirectedComponents and structureExactTurns a directed graph into an undirected one, in place.
topological_sortingCycles, motifs and epidemicsExactOrders the vertices of a DAG so that every edge points the same way along the order.
transitive_closureComponents and structureUnit tests SIMDBuilds the graph with an edge from every vertex to every vertex it can reach.
transitivity_avglocal_undirectedSimilarity, transitivity and mixingExactComputes the average of the local clustering coefficients.
transitivity_barratSimilarity, transitivity and mixingExactComputes the weighted local clustering coefficient of Barrat et al.
transitivity_local_undirectedSimilarity, transitivity and mixingExactComputes the local clustering coefficient of selected vertices.
transitivity_undirectedSimilarity, transitivity and mixingExactComputes the global clustering coefficient: the share of connected triples that are closed.
tree_from_parent_vectorDeterministic generatorsExactTurns a vector of parent ids into a tree or forest.
tree_gameRandom graphsSame qualityDraws a uniformly random labelled tree on n vertices.
triad_censusCycles, motifs and epidemicsExact ThreadsCounts the triads of a directed graph in each of the 16 isomorphism classes.
triangular_latticeDeterministic generatorsExactBuilds a lattice of triangles in one of three outlines.
trussnessComponents and structureExactComputes the trussness of every edge.
turanDeterministic generatorsExactBuilds the Turán graph T(n, r): the complete r-partite graph with parts as equal as possible.
unfold_treePaths and distancesExactUnfolds a graph into a forest by a breadth-first walk from given roots, copying vertices that are reached more than once.
unionOperators and bipartite graphsExactUnion of two graphs on shared vertex ids.
union_manyOperators and bipartite graphsExactUnion of any number of graphs on shared vertex ids.
vconn_nei_tFlows, cuts and traversalUnit testsWhat st_vertex_connectivity does when source and target are adjacent.
vcountGraph basicsExactHow many vertices the graph has.
vector_addVectorsUnit testsAdds a second vector element by element: v1[i] += v2[i].
vector_add_constantVectorsUnit testsAdds the same value to every element.
vector_all_almost_eVectorsUnit testsTells whether two real vectors agree element by element within a relative tolerance.
vector_all_eVectorsUnit testsTells whether two vectors have the same size and equal elements.
vector_all_gVectorsUnit testsTells whether lhs[i] > rhs[i] at every position.
vector_all_geVectorsUnit testsTells whether lhs[i] >= rhs[i] at every position.
vector_all_lVectorsUnit testsTells whether lhs[i] < rhs[i] at every position.
vector_all_leVectorsUnit testsTells whether lhs[i] <= rhs[i] at every position.
vector_appendVectorsUnit testsAppends the elements of one vector to the end of another.
vector_binsearchVectorsUnit testsBinary search in a sorted vector.
vector_binsearch_sliceVectorsUnit testsBinary search within positions start .. end - 1 of a sorted vector.
vector_capacityVectorsUnit testsThe number of elements the allocated storage can hold.
vector_clearVectorsUnit testsRemoves all elements and keeps the storage.
vector_colex_cmpVectorsUnit testsCompares two vectors colexicographically: from the last element backwards.
vector_colex_cmp_untypedVectorsUnit testsvector_colex_cmp in the form a qsort-style sort expects.
vector_complex_all_almost_eVectorsUnit testsTells whether two complex vectors agree element by element within a relative tolerance.
vector_complex_createVectorsUnit testsMakes a new complex vector by pairing two real vectors as components.
vector_complex_create_polarVectorsUnit testsBuilds a complex vector from magnitudes and angles.
vector_complex_imagVectorsUnit testsCopies out the imaginary component of each complex entry.
vector_complex_realVectorsUnit testsCopies out the real component of each complex entry.
vector_complex_realimagVectorsUnit testsCopies out both components of each complex entry in a single call.
vector_complex_zapsmallVectorsUnit testsZeroes tiny real and imaginary parts, each part on its own.
vector_containsVectorsUnit testsTells whether a value occurs in a vector.
vector_contains_sortedVectorsUnit testsTells whether a value occurs in a sorted vector, by binary search.
vector_copy_toVectorsUnit testsCopies all elements into a C array.
vector_destroyVectorsUnit testsFrees a vector's storage.
vector_difference_and_intersection_sortedVectorsUnit testsThe v1-only, v2-only and shared elements of two ascending vectors, from one merge pass.
vector_difference_sortedVectorsUnit testsWhat remains of ascending v1 after taking away the elements of ascending v2, multiplicities subtracted.
vector_divVectorsUnit testsDivides by a second vector element by element: v1[i] /= v2[i].
vector_emptyVectorsUnit testsTells whether a vector has no elements.
vector_fillVectorsUnit testsSets every element to the same value.
vector_floorVectorsUnit testsRounds every element of a real vector down into an integer vector.
vector_getVectorsUnit testsReads one element.
vector_get_ptrVectorsUnit testsThe address of one element.
vector_indexVectorsUnit testsBuilds a vector from chosen elements of another: newv[i] = v[idx[i]].
vector_index_in_placeVectorsUnit testsReplaces a vector by chosen elements of itself: v[i] becomes the old v[idx[i]].
vector_initVectorsUnit testsCreates a vector of a given length with every element zero.
vector_init_arrayVectorsUnit testsCreates a vector holding a copy of the values of a C array.
vector_init_copyVectorsUnit testsCreates a vector with the same elements as another.
vector_init_rangeVectorsUnit testsCreates a vector holding start, start + 1, ..., up to but not including end.
vector_insertVectorsUnit testsInserts a value at a position, moving the later elements one place to the right.
vector_intersect_sortedVectorsUnit testsCommon elements of two ascending vectors, counted with multiplicity.
vector_intersection_size_sortedVectorsUnit testsThe size of the multiset intersection of two sorted vectors, without building it.
vector_is_all_finiteVectorsUnit testsTells whether every element is finite (neither infinite nor NaN).
vector_is_any_nanVectorsUnit testsTrue if at least one entry is not a number.
vector_is_equalVectorsUnit testsTells whether two vectors are equal; the same test as vector_all_e.
vector_is_nanVectorsUnit testsMarks which elements are NaN.
vector_isinintervalVectorsUnit testsTells whether every element lies between low and high, both included.
vector_lex_cmpVectorsUnit testsCompares two vectors lexicographically.
vector_lex_cmp_untypedVectorsUnit testsvector_lex_cmp in the form a qsort-style sort expects.
vector_list_capacityString vectors, lists and bit setsUnit testsReturns how many items fit before the list must reallocate.
vector_list_clearString vectors, lists and bit setsUnit testsDestroys all items and keeps the allocated capacity.
vector_list_destroyString vectors, lists and bit setsUnit testsDestroys every item of a list and frees the list.
vector_list_discardString vectors, lists and bit setsUnit testsDestroys the item at a position and closes the gap.
vector_list_discard_backString vectors, lists and bit setsUnit testsDestroys the last item of a list, if there is one.
vector_list_discard_fastString vectors, lists and bit setsUnit testsDestroys the item at a position; the last item fills its place.
vector_list_emptyString vectors, lists and bit setsUnit testsTells whether a list has no items.
vector_list_get_ptrString vectors, lists and bit setsUnit testsReturns a pointer to the item at a position.
vector_list_initString vectors, lists and bit setsUnit testsCreates a list of size new, empty items.
vector_list_init_copyString vectors, lists and bit setsUnit testsCreates a list holding deep copies of another list's items.
vector_list_insertString vectors, lists and bit setsUnit testsInserts the caller's item at a position, taking ownership of it.
vector_list_insert_copyString vectors, lists and bit setsUnit testsInserts a deep copy of an item at a position.
vector_list_insert_newString vectors, lists and bit setsUnit testsInserts a new, empty item at a position and can return a pointer to it.
vector_list_permuteString vectors, lists and bit setsUnit testsReorders a list: new position i receives the item at old position index[i].
vector_list_pop_backString vectors, lists and bit setsUnit testsTakes the last item off a list and returns it; the caller then owns it.
vector_list_push_backString vectors, lists and bit setsUnit testsAppends the caller's item to the list, taking ownership of it.
vector_list_push_back_copyString vectors, lists and bit setsUnit testsAppends a deep copy of an item.
vector_list_push_back_newString vectors, lists and bit setsUnit testsAppends a new, empty item and can return a pointer to it.
vector_list_removeString vectors, lists and bit setsUnit testsTakes the item at a position out of the list and hands it to the caller.
vector_list_remove_fastString vectors, lists and bit setsUnit testsTakes an item out of the list in constant time; the last item fills its place.
vector_list_replaceString vectors, lists and bit setsUnit testsExchanges the item at a position with the caller's item.
vector_list_reserveString vectors, lists and bit setsUnit testsAllocates room for at least capacity items without changing the list.
vector_list_resizeString vectors, lists and bit setsUnit testsChanges the number of items of a list.
vector_list_setString vectors, lists and bit setsUnit testsPuts the caller's item at a position and destroys the item that was there.
vector_list_sizeString vectors, lists and bit setsUnit testsReturns the number of items in a list.
vector_list_sortString vectors, lists and bit setsUnit testsSorts the items of a list in place with a comparison function.
vector_list_sort_indString vectors, lists and bit setsUnit testsWrites the positions of a list's items in sorted order, without moving them.
vector_list_swapString vectors, lists and bit setsUnit testsExchanges the contents of two lists of the same type.
vector_list_swap_elementsString vectors, lists and bit setsUnit testsExchanges two items of a list.
vector_list_tVectorsUnit testsA growable list of real vectors that owns its items.
vector_list_tail_ptrString vectors, lists and bit setsUnit testsReturns a pointer to the last item, or NULL for an empty list.
vector_maxVectorsUnit testsThe largest element.
vector_maxdifferenceVectorsUnit testsThe largest absolute difference between corresponding elements of two vectors.
vector_minVectorsUnit testsThe smallest element.
vector_minmaxVectorsUnit testsThe smallest and the largest element in one pass.
vector_mulVectorsUnit testsMultiplies by a second vector element by element: v1[i] *= v2[i].
vector_nullVectorsUnit testsOverwrites all elements with the zero value of the element type.
vector_permuteVectorsUnit testsReorders a vector by an index vector: position i receives the old element index[i].
vector_pop_backVectorsUnit testsTakes the final entry off the vector and hands it back.
vector_prodVectorsUnit testsMultiplies all entries together.
vector_ptr_capacityVectorsUnit testsThe number of pointers the allocated storage can hold.
vector_ptr_clearVectorsUnit testsRemoves all elements, running the item destructor on each one that is not NULL.
vector_ptr_destroyVectorsUnit testsFrees a pointer vector, running the item destructor on its elements.
vector_ptr_destroy_allVectorsUnit testsFrees every element and then the vector itself.
vector_ptr_free_allVectorsUnit testsDestroys and frees every element, leaving NULL in each slot.
vector_ptr_getVectorsUnit testsReads one pointer.
vector_ptr_get_item_destructorVectorsUnit testsReports which function, if any, runs on elements when they are destroyed.
vector_ptr_initVectorsUnit testsCreates a pointer vector of size NULL pointers.
vector_ptr_init_copyVectorsUnit testsCreates a shallow copy of a pointer vector.
vector_ptr_insertVectorsUnit testsInserts a pointer at a position, moving the later ones one place to the right.
vector_ptr_permuteVectorsUnit testsReorders a pointer vector by an index vector: position i receives the old element index[i].
vector_ptr_pop_backVectorsUnit testsTakes the final pointer off the vector and hands it back.
vector_ptr_push_backVectorsUnit testsAppends one pointer.
vector_ptr_reserveVectorsUnit testsMakes room for at least capacity pointers without changing the size.
vector_ptr_resizeVectorsUnit testsChanges the number of elements of a pointer vector.
vector_ptr_resize_minVectorsUnit testsReleases unused storage: the capacity becomes equal to the size.
vector_ptr_setVectorsUnit testsStores a pointer at a position.
vector_ptr_set_item_destructorVectorsUnit testsSets the function that destroy, clear and free_all run on each element.
vector_ptr_sizeVectorsUnit testsCount of slots in a pointer vector.
vector_ptr_sortVectorsUnit testsSorts the pointers with a comparison function.
vector_ptr_sort_indVectorsUnit testsThe permutation that sorts a pointer vector by a comparison function.
vector_push_backVectorsUnit testsGrows the vector by one, storing a value at the new end.
vector_rangeVectorsUnit testsFills a vector with start, start + 1, ..., up to but not including end.
vector_removeVectorsUnit testsRemoves the element at a position, moving the later elements one place to the left.
vector_remove_sectionVectorsUnit testsRemoves the elements at positions from .. to - 1.
vector_reserveVectorsUnit testsMakes room for at least capacity elements without changing the size.
vector_resizeVectorsUnit testsChanges the number of elements.
vector_resize_minVectorsUnit testsReleases unused storage: the capacity becomes equal to the size.
vector_reverseVectorsUnit testsReverses the order of the elements.
vector_reverse_sectionVectorsUnit testsReverses the elements at positions from .. to - 1.
vector_reverse_sortVectorsUnit testsPuts the entries in decreasing order, in place.
vector_rotate_leftVectorsUnit testsCyclic shift: moves every element n positions towards the front, wrapping around.
vector_scaleVectorsUnit testsMultiplies every element by the same value.
vector_searchVectorsUnit testsFinds the first position at or after from that holds a value.
vector_setVectorsUnit testsWrites one element.
vector_shuffleVectorsSame qualityPuts the elements in a uniformly random order.
vector_sizeVectorsUnit testsThe number of elements.
vector_sortVectorsUnit testsPuts the entries in increasing order, in place (introsort).
vector_sort_indVectorsUnit testsThe permutation that sorts a vector, leaving the vector itself unchanged.
vector_subVectorsUnit testsSubtracts a second vector element by element: v1[i] -= v2[i].
vector_sumVectorsUnit testsAdds up all entries.
vector_swapVectorsUnit testsExchanges the contents of two vectors.
vector_swap_elementsVectorsUnit testsExchanges two elements.
vector_tVectorsUnit testsA growable array of reals; the template for the integer, bool, char, complex and pointer vectors.
vector_tailVectorsUnit testsReads the final entry without removing it.
vector_updateVectorsUnit testsMakes one vector an element-by-element copy of another.
vector_viewVectorsUnit testsWraps an existing C array as a vector, without copying.
vector_which_maxVectorsUnit testsIndex where the maximum sits (the first one on ties).
vector_which_minVectorsUnit testsIndex where the minimum sits (the first one on ties).
vector_which_minmaxVectorsUnit testsThe positions of the smallest and the largest element in one pass.
vector_zapsmallVectorsUnit testsSnaps near-zero entries to exactly 0 using an absolute threshold.
versionSpatial graphs and numbersUnit testsReports the version of the Open Graph library.
vertex_coloring_greedyCliques, independent sets and colouringSame qualityColours the vertices greedily so that adjacent vertices get different colours.
vertex_connectivityFlows, cuts and traversalExactSmallest number of vertices whose removal disconnects the graph.
vertex_disjoint_pathsFlows, cuts and traversalExactLargest number of source-target paths that share no vertex apart from their ends.
vertex_path_from_edge_pathPaths and distancesExactConverts a walk given as edge ids into the sequence of vertices it visits.
vit_createGraph basicsUnit testsResolves a vertex selector against a graph into an iterator.
vit_destroyGraph basicsUnit testsReleases any id list a vertex iterator built.
voronoiPaths and distancesExactAssigns each vertex to its nearest generator vertex (a graph Voronoi partition).
vs_1Graph basicsUnit testsSelector naming exactly one vertex id.
vs_adjGraph basicsUnit testsVertex selector for the neighbours of one vertex.
vs_allGraph basicsUnit testsVertex selector for every vertex of the graph.
vs_copyGraph basicsUnit testsCopies a vertex selector.
vs_destroyGraph basicsUnit testsFrees what a vertex selector owns.
vs_is_allGraph basicsUnit testsTells whether a selector is the all-vertices selector.
vs_nonadjGraph basicsUnit testsVertex selector for the vertices not adjacent to one vertex.
vs_noneGraph basicsUnit testsSelector that resolves to no vertex at all.
vs_rangeGraph basicsUnit testsVertex selector for the ids start, start + 1, ..., end - 1.
vs_sizeGraph basicsUnit testsThe number of vertices a selector resolves to in a graph.
vs_typeGraph basicsUnit testsReports which variant (all, range, vector, ...) a vertex selector is.
vs_vectorGraph basicsUnit testsVertex selector that borrows the caller's vector of vertex ids.
vs_vector_copyGraph basicsUnit testsVertex selector that keeps its own copy of a vector of vertex ids.
vs_vector_smallGraph basicsUnit testsVertex selector from int arguments ending in -1.
vss_1Graph basicsUnit testsImmediate selector for a single vertex.
vss_allGraph basicsUnit testsImmediate selector for every vertex.
vss_noneGraph basicsUnit testsImmediate selector for no vertices.
vss_rangeGraph basicsUnit testsImmediate selector for the ids start .. end - 1.
vss_vectorGraph basicsUnit testsImmediate selector that borrows a vector of vertex ids.
warningGraph basicsUnit testsPasses a warning message to the installed warning handler.
warning_handler_ignoreGraph basicsUnit testsWarning handler that does nothing.
warning_handler_printGraph basicsUnit testsThe default warning handler: prints the warning to stderr.
warning_handler_tGraph basicsUnit testsFunction type for the routine that receives warnings.
warningfGraph basicsUnit testsRaises a warning with a printf-style message.
watts_strogatz_gameRandom graphsSame qualityDraws a small-world graph: a periodic lattice whose edges are rewired at random (Watts-Strogatz).
weighted_adjacencyDeterministic generatorsExactBuilds a weighted graph from a square matrix, one edge per non-zero entry.
weighted_biadjacencyOperators and bipartite graphsExactBuilds a weighted bipartite graph from a biadjacency matrix.
weighted_clique_numberCliques, independent sets and colouringUnit testsLargest total vertex weight of a clique.
weighted_cliquesCliques, independent sets and colouringUnit testsLists cliques, or maximal cliques, whose total vertex weight lies in a range.
wheelDeterministic generatorsExactBuilds a wheel: a star whose outer vertices also form a cycle.
widest_path_widths_dijkstraPaths and distancesExactWidest-path widths from a set of sources to a set of targets.
widest_path_widths_floyd_warshallPaths and distancesExactWidest-path widths between all pairs, by the bottleneck form of Floyd-Warshall.
write_graph_dimacs_flowReading and writing filesExactWrites a maximum-flow problem in the DIMACS format.
write_graph_dotReading and writing filesExactWrites the graph and its attributes in the Graphviz DOT language.
write_graph_edgelistReading and writing filesExactWrites every edge as one line holding the two vertex ids.
write_graph_gmlReading and writing filesExactWrites the graph and its attributes in the GML format.
write_graph_graphmlReading and writing filesExactWrites the graph and all its graph, vertex and edge attributes as a GraphML document.
write_graph_ledaReading and writing filesExactWrites the graph in LEDA's native graph format, with at most one vertex and one edge attribute as data.
write_graph_lglReading and writing filesExactWrites the graph in the LGL format, one "# vertex" block per vertex that has edges starting at it.
write_graph_ncolReading and writing filesExactWrites the edges as "name name [weight]" lines in the NCOL format.
write_graph_pajekReading and writing filesExactWrites the graph as a Pajek .net file, with names, coordinates, weights and the drawing parameters Pajek knows.

Last updated · Open Graph 0.1.0 · OpenBI Studio 0.3.78