stgraph.graph.static package¶
Submodules¶
stgraph.graph.static.csr module¶
CPython module for CSR
- class stgraph.graph.static.csr.CSR¶
Bases:
pybind11_object- property column_indices_ptr¶
- property eids_ptr¶
- property in_degrees¶
- property node_ids_ptr¶
- property out_degrees¶
- property row_offset_ptr¶
- property weighted_out_degrees¶
- stgraph.graph.static.csr.get_array(arg0: int, arg1: int) List[int]¶
Get Array
stgraph.graph.static.static_graph module¶
Represent Static graphs in STGraph.
- class stgraph.graph.static.static_graph.StaticGraph(edge_list: list, edge_weights: list, num_nodes: int)[source]¶
Bases:
STGraphBaseRepresent Static graphs in STGraph.
This abstract class outlines the interface for defining a static graphs used in STGraph. As of now the static graph is implemented using the Compressed Sparse Row (CSR) format.
Example:¶
from stgraph.graph import StaticGraph from stgraph.dataset import HungaryCPDataLoader hungary = HungaryCPDataLoader() graph = StaticGraph( edge_list = hungary.get_edges(), edge_weights = hungary.get_edge_weights(), num_nodes = hungary.gdata["num_nodes"] )
Module contents¶
Static Graph respresentation modules provided by STGraph.