stgraph.graph.dynamic.gpma package¶
Submodules¶
stgraph.graph.dynamic.gpma.gpma module¶
CPython module for GPMA
- class stgraph.graph.dynamic.gpma.gpma.GPMA¶
Bases:
pybind11_object
- stgraph.graph.dynamic.gpma.gpma.build_backward_csr(gpma: GPMA) List[float]¶
Build the backward CSR for given GPMA
- stgraph.graph.dynamic.gpma.gpma.edge_update_t(gpma: GPMA, timestamp: int, revert_update: bool = False) List[float]¶
Performs the updates of the given timestamp
- stgraph.graph.dynamic.gpma.gpma.free_backward_csr(gpma: GPMA) None¶
Free backward CSR resources from given GPMA
- stgraph.graph.dynamic.gpma.gpma.get_csr_ptrs(gpma: GPMA, is_backward: bool = False) Tuple[int, int, int, int]¶
Returns the pointers to row_offset, col_indices and edge_ids
- stgraph.graph.dynamic.gpma.gpma.get_gpma_edge_list(arg0: GPMA) Set[Tuple[int, int, int]]¶
To get the edge list
- stgraph.graph.dynamic.gpma.gpma.get_graph_attr(arg0: GPMA) Tuple[int, int]¶
Returns the [num_nodes, num_edges]
- stgraph.graph.dynamic.gpma.gpma.get_in_degrees(gpma: GPMA) List[int]¶
Returns the in-degrees of all nodes in given GPMA
- stgraph.graph.dynamic.gpma.gpma.get_out_degrees(gpma: GPMA) List[int]¶
Returns the out-degrees of all nodes in given GPMA
- stgraph.graph.dynamic.gpma.gpma.get_reverse_csr_edge_list(arg0: GPMA) Set[Tuple[int, int, int]]¶
To get the edge list of reverse
- stgraph.graph.dynamic.gpma.gpma.init_gpma(gpma: GPMA, num_nodes: int) None¶
Initialises the CSR arrays using GPMA
stgraph.graph.dynamic.gpma.gpma_graph module¶
Represent Dynamic Graphs using GPMA in STGraph.
- class stgraph.graph.dynamic.gpma.gpma_graph.GPMAGraph(edge_list: list, max_num_nodes: int)[source]¶
Bases:
DynamicGraphRepresent Dynamic Graphs using GPMA in STGraph.
TODO: Add a paragraph explaining about GPMA in brief.
Example:¶
from stgraph.graph import GPMAGraph from stgraph.dataset import EnglandCovidDataLoader eng_covid = EnglandCovidDataLoader() G = GPMAGraph( 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:
.
Module contents¶
Represent Dynamic Graphs using GPMA in STGraph.