stgraph.graph.dynamic.pcsr package

Submodules

stgraph.graph.dynamic.pcsr.pcsr module

PCSR Dynamic Graph Representation

class stgraph.graph.dynamic.pcsr.pcsr.PCSR

Bases: pybind11_object

build_csr(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) float
build_reverse_csr(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) float
property edge_count
edge_update_list(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR, edge_list: List[Tuple[int, int]], is_delete: bool = False, is_reverse_edge: bool = False) None
get_csr_ptrs(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) Tuple[int, int, int, int]
get_edges(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) List[Tuple[int, int, int]]
get_n(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) int
property in_degrees
label_edges(self: stgraph.graph.dynamic.pcsr.pcsr.PCSR) None

Creates edge labels for the current GPMA

property out_degrees
stgraph.graph.dynamic.pcsr.pcsr.read_gpu_csr(arg0: PCSR) List[List[int]]

Read CSR arrays from the GPU

stgraph.graph.dynamic.pcsr.pcsr_graph module

Represent Dynamic Graphs using PCSR in STGraph.

class stgraph.graph.dynamic.pcsr.pcsr_graph.PCSRGraph(edge_list: list, max_num_nodes: int)[source]

Bases: DynamicGraph

Represent Dynamic Graphs using PCSR in STGraph.

TODO: Add a paragraph explaining about PCSR in brief.

Example:

from stgraph.graph import PCSRGraph
from stgraph.dataset import EnglandCovidDataLoader

eng_covid = EnglandCovidDataLoader()

G = PCSRGraph(
    edge_list = eng_covid.get_edges(),
    max_num_nodes = max(eng_covid.gdata["num_nodes"]),
)
param edge_list:

Edge list of the graph across all timestamps

type edge_list:

list

param max_num_nodes:

Maximum number of nodes present in the graph across all timestamps

type max_num_nodes:

int

TODO
Type:

.

graph_type() str[source]

Return the graph type.

in_degrees() ndarray[source]

TODO:.

out_degrees() ndarray[source]

TODO:.

Module contents

Represent Dynamic Graphs using PCSR in STGraph.