Graph Classes#
Constructors#
|
A GPU Graph Object (Base class of other graph types) |
|
A Multigraph; a Graph containing more than one edge between vertex pairs. |
|
A Bipartite Graph |
Adding Data#
|
Initialize a graph from the adjacency list. |
|
Initialize a graph from the edge list. |
|
Initializes the distributed graph from the dask_cudf.DataFrame edgelist. |
Initializes the graph from pandas adjacency matrix. |
|
|
Initialize a graph from the edge list. |
|
Initializes the graph from numpy array containing adjacency matrix. |
|
Initializes the graph from numpy matrix containing adjacency matrix. |
|
Given a DataFrame containing external vertex ids in the identified columns, return a DataFrame containing the internal vertex ids as the specified column name. |
|
Add nodes information to the Graph. |
Empty the graph. |
|
|
Given a DataFrame containing internal vertex ids in the identified column, replace this with external vertex ids. |
Checks#
Returns True if the graph has isolated vertices. |
|
Checks if Graph is bipartite. |
|
Returns True if the graph is a directed graph. |
|
Returns True if the graph is a multigraph. |
|
Checks if Graph is multipartite. |
|
Returns True if the graph is renumbered. |
|
Returns True if the graph has edge weights. |
|
|
Given a DataFrame containing external vertex ids in the identified columns, or a Series containing external vertex ids, return a Series with the internal vertex ids. |
Return a directed representation of the graph. |
|
Return an undirected copy of the graph. |
Symmetrize#
|
Take a dataframe of source destination pairs along with associated values stored in a single GPU or distributed create a COO set of source destination pairs along with values where all edges exist in both directions. |
|
Take a COO stored in a distributed DataFrame, and the column names of the source and destination columns and create a new data frame using the same column names that symmetrize the graph so that all edges appear in both directions. |
|
Take a COO stored in a DataFrame, along with the column names of the source and destination columns and create a new data frame using the same column names that symmetrize the graph so that all edges appear in both directions. |
Conversion from Other Formats#
|
Initializes the graph from cuDF or Pandas Series representing adjacency matrix CSR data and returns a new cugraph.Graph object. |
|
Return a new graph created from the edge list representaion. |
|
Return a new graph created from the edge list representaion. |
|
Initializes the graph from numpy array containing adjacency matrix. |
|
Initializes the graph from numpy matrix containing adjacency matrix. |
|
Initializes the graph from pandas adjacency matrix. |
|
Initialize a graph from the edge list. |
Returns the graph adjacency matrix as a NumPy array. |
|
Returns the graph adjacency matrix as a NumPy matrix. |
|
Returns the graph adjacency matrix as a Pandas DataFrame. |
|
|
Returns the graph edge list as a Pandas DataFrame. |
NumberMap#
|
Methods |
|
Methods |
|
Methods |
Given a collection of internal vertex ids, return a DataFrame of the external vertex ids |
|
Given a collection of external vertex ids, return the internal vertex ids |
|
Given a collection of external vertex ids, return the internal vertex ids combined with the input data. |
|
Helper function to compute internal column names based on external column names |
|
Helper function to compute internal column names and types |
|
|
Helper function to generate an unused column name |
|
|
Given an input dataframe with its column names, this function returns the renumbered dataframe(if renumbering occured) along with a mapping from internal to external vertex IDs. |
|
Sets self.renumbered_src_col_name and self.renumbered_dst_col_name to values that can be used to replace src_col_names_to_replace and dst_col_names_to_replace to values that will not collide with any other column names in all_col_names. |
|
Given a DataFrame containing internal vertex ids in the identified column, replace this with external vertex ids. |
|
Other#
|
Creates a hypergraph out of the given dataframe, returning the graph components as dataframes. |