algorithms#

Description

Algorithmic functions that can be run on Raphtory graphs

Classes

Matching

A Matching (i.e., a set of edges that do not share any nodes)

Infected

Functions

dijkstra_single_source_shortest_paths(graph, ...)

Finds the shortest paths from a single source to multiple targets in a graph.

global_reciprocity(graph)

Reciprocity - measure of the symmetry of relationships in a graph, the global reciprocity of the entire graph.

betweenness_centrality(graph[, k, normalized])

Computes the betweenness centrality for nodes in a given graph.

all_local_reciprocity(graph)

Local reciprocity - measure of the symmetry of relationships associated with a node

triplet_count(graph)

Computes the number of connected triplets within a graph

local_triangle_count(graph, v)

Implementations of various graph algorithms that can be run on a graph.

average_degree(graph)

The average (undirected) degree of all nodes in the graph.

directed_graph_density(graph)

Graph density - measures how dense or sparse a graph is.

degree_centrality(graph)

Computes the degree centrality of all nodes in the graph.

max_degree(graph)

Returns the largest degree found in the graph

min_degree(graph)

Returns the smallest degree found in the graph

max_out_degree(graph)

The maximum out degree of any node in the graph.

max_in_degree(graph)

The maximum in degree of any node in the graph.

min_out_degree(graph)

The minimum out degree of any node in the graph.

min_in_degree(graph)

The minimum in degree of any node in the graph.

pagerank(graph[, iter_count, max_diff, ...])

Pagerank -- pagerank centrality value of the nodes in a graph

single_source_shortest_path(graph, source[, ...])

Calculates the single source shortest paths from a given source node.

global_clustering_coefficient(graph)

Computes the global clustering coefficient of a graph.

temporally_reachable_nodes(graph, max_hops, ...)

Temporally reachable nodes -- the nodes that are reachable by a time respecting path followed out from a set of seed nodes at a starting time.

temporal_bipartite_graph_projection(graph, ...)

Projects a temporal bipartite graph into an undirected temporal graph over the pivot node type.

local_clustering_coefficient(graph, v)

Local clustering coefficient - measures the degree to which nodes in a graph tend to cluster together.

local_clustering_coefficient_batch(graph, v)

weakly_connected_components(graph[, iter_count])

Weakly connected components -- partitions the graph into node sets which are mutually reachable by an undirected path

strongly_connected_components(graph)

Strongly connected components

in_components(graph)

In components -- Finding the "in-component" of a node in a directed graph involves identifying all nodes that can be reached following only incoming edges.

in_component(node)

In component -- Finding the "in-component" of a node in a directed graph involves identifying all nodes that can be reached following only incoming edges.

out_components(graph)

Out components -- Finding the "out-component" of a node in a directed graph involves identifying all nodes that can be reached following only outgoing edges.

out_component(node)

Out component -- Finding the "out-component" of a node in a directed graph involves identifying all nodes that can be reached following only outgoing edges.

fast_rp(graph, embedding_dim, ...[, seed, ...])

Computes embedding vectors for each vertex of an undirected/bidirectional graph according to the Fast RP algorithm.

global_temporal_three_node_motif(graph, delta)

Computes the number of three edge, up-to-three node delta-temporal motifs in the graph, using the algorithm of Paranjape et al, Motifs in Temporal Networks (2017).

global_temporal_three_node_motif_multi(...)

Computes the global counts of three-edge up-to-three node temporal motifs for a range of timescales.

local_temporal_three_node_motifs(graph, delta)

Computes the number of each type of motif that each node participates in.

hits(graph[, iter_count, threads])

HITS (Hubs and Authority) Algorithm:

balance(graph[, name, direction])

Sums the weights of edges in the graph based on the specified direction.

label_propagation(graph[, seed])

Computes components using a label propagation algorithm

temporal_SEIR(graph, seeds, infection_prob, ...)

Simulate an SEIR dynamic on the network

louvain(graph[, resolution, weight_prop, tol])

Louvain algorithm for community detection

fruchterman_reingold(graph[, iterations, ...])

Fruchterman Reingold layout algorithm

cohesive_fruchterman_reingold(graph[, ...])

Cohesive version of fruchterman_reingold that adds virtual edges between isolated nodes :param graph: A reference to the graph :type graph: GraphView :param iter_count: The number of iterations to run.

max_weight_matching(graph[, weight_prop, ...])

Compute a maximum-weighted matching in the general undirected weighted graph given by "edges".