Graph Implementation#

Graph Implementation#

view_edge_list()

Display the edge list.

delete_edge_list()

Delete the edge list.

view_adj_list()

Display the adjacency list.

view_transposed_adj_list()

Display the transposed adjacency list.

delete_adj_list()

Delete the adjacency list.

enable_batch()

get_two_hop_neighbors([start_vertices])

Compute vertex pairs that are two hops apart.

number_of_vertices()

Get the number of nodes in the graph.

number_of_nodes()

An alias of number_of_vertices().

number_of_edges([directed_edges])

Get the number of edges in the graph.

in_degree([vertex_subset])

Compute vertex in-degree.

out_degree([vertex_subset])

Compute vertex out-degree.

degree([vertex_subset])

Compute vertex degree, which is the total number of edges incident to a vertex (both in and out edges).

degrees([vertex_subset])

Compute vertex in-degree and out-degree.

has_edge(u, v)

Returns True if the graph contains the edge (u,v).

has_node(n)

Returns True if the graph contains the node n.

has_self_loop()

Returns True if the graph has self loop.

edges()

Returns all the edges in the graph as a cudf.DataFrame containing sources and destinations.

nodes()

Returns all the nodes in the graph as a cudf.Series, in order of appearance in the edgelist (source column first, then destination column).

neighbors(n)

vertex_column_size()