dhart.spatialstructures.Graph.Clear¶
- Graph.Clear(cost_type: str = '')¶
Clear all edges/nodes from the graph or a specific cost type
- Parameters:
cost_type – str, optional If left as the empty string, clear all nodes/edges from the graph. Otherwise, clear edges from the specified cost type.
- Raises:
KeyError – Tried to clear a cost type that didn’t exist in the graph.