SamplingGraphΒΆ
-
class
dgl.graphbolt.
SamplingGraph
[source]ΒΆ Bases:
object
Class for sampling graph.
Copy the graph to shared memory.
- Parameters
shared_memory_name (str) β Name of the shared memory.
- Returns
The copied SamplingGraph object on shared memory.
- Return type
-
to
(device: torch.device) → dgl.graphbolt.sampling_graph.SamplingGraph[source]ΒΆ Copy graph to the specified device.
- Parameters
device (torch.device) β The destination device.
- Returns
The graph on the specified device.
- Return type
-
property
num_edges
ΒΆ The number of edges in the graph. - If the graph is homogenous, returns an integer. - If the graph is heterogenous, returns a dictionary.
-
property
num_nodes
ΒΆ The number of nodes in the graph. - If the graph is homogenous, returns an integer. - If the graph is heterogenous, returns a dictionary.