cugraph.structure.NumberMap#
- class cugraph.structure.NumberMap(renumber_id_type=<class 'numpy.int32'>, unrenumbered_id_type=<class 'numpy.int32'>, is_renumbered=False)[source]#
Methods
add_internal_vertex_id
(df[, id_column_name, ...])Given a collection of external vertex ids, return the internal vertex ids combined with the input data.
compute_vals
(column_names)Helper function to compute internal column names based on external column names
compute_vals_types
(df, column_names)Helper function to compute internal column names and types
from_internal_vertex_id
(df[, ...])Given a collection of internal vertex ids, return a DataFrame of the external vertex ids
generate_unused_column_name
(column_names[, ...])Helper function to generate an unused column name
renumber_and_segment
(df, src_col_names, ...)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.
to_internal_vertex_id
(df[, col_names])Given a collection of external vertex ids, return the internal vertex ids
unrenumber
(df, column_name[, ...])Given a DataFrame containing internal vertex ids in the identified column, replace this with external vertex ids.
MultiGPU
SingleGPU
renumber
vertex_column_size
- __init__(renumber_id_type=<class 'numpy.int32'>, unrenumbered_id_type=<class 'numpy.int32'>, is_renumbered=False)[source]#
Methods
__init__
([renumber_id_type, ...])add_internal_vertex_id
(df[, id_column_name, ...])Given a collection of external vertex ids, return the internal vertex ids combined with the input data.
compute_vals
(column_names)Helper function to compute internal column names based on external column names
compute_vals_types
(df, column_names)Helper function to compute internal column names and types
from_internal_vertex_id
(df[, ...])Given a collection of internal vertex ids, return a DataFrame of the external vertex ids
generate_unused_column_name
(column_names[, ...])Helper function to generate an unused column name
renumber
(df, src_col_names, dst_col_names[, ...])renumber_and_segment
(df, src_col_names, ...)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.
to_internal_vertex_id
(df[, col_names])Given a collection of external vertex ids, return the internal vertex ids
unrenumber
(df, column_name[, ...])Given a DataFrame containing internal vertex ids in the identified column, replace this with external vertex ids.