kosmos.partitioning.graph¶ Classes¶ class Graph(adjacency: list[list[int]])[source]¶ Undirected graph representation. adjacency¶ Adjacency list representation of the graph. Type: list[list[int]] Create an undirected graph. Parameters: adjacency (list[list[int]]) – Adjacency list representation of the graph. Properties property num_nodes¶ Number of nodes. property num_edges¶ Number of edges. Methods to_adjacency_list() → list[list[int]][source]¶ Create adjacency list for algorithms like PyMetis. Returns: Adjacency list representation. Return type: list[list[int]]