STGraphBase

class stgraph.graph.STGraphBase[source]

Bases: ABC

Represent graphs in STGraph using this abstract base class.

abstract get_ndata(field: str) any[source]

Return the graph metadata.

abstract get_num_edges() int[source]

Return the number of edges in the graph.

abstract get_num_nodes() int[source]

Return the number of nodes in the graph.

abstract property graph_type: str

Return the graph type.

abstract set_ndata(field: str, val: any) None[source]

Set the graph metadata.