DiGraph - AmitSheer/DWGraphWithAlgo GitHub Wiki
This class is a representation of a Directed-Weighted Graph. It holds the edges and nodes in a Dictionary for easy and fast access of the values held within.
Feilds
all inner fields are protected
Methods
- e_size(self) -> int
- get_all_v(self) -> dict
- all_in_edges_of_node(self, id1: int) -> dict
- all_out_edges_of_node(self, id1: int) -> dict
- get_mc(self) -> int
- add_edge(self, id1: int, id2: int, weight: float) -> bool
- add_node(self, node_id: int, pos: tuple = None) -> bool
- remove_node(self, node_id: int) -> bool
- remove_edge(self, node_id1: int, node_id2: int) -> bool