dhart.spatialstructures.Graph.GetEdgeCost

Graph.GetEdgeCost(parent: int, child: int, cost_type: str = '') float

Get the cost from parent to child for a specific cost type

Parameters:
  • parent (int) – Node the edge is from

  • child (int) – Node the edge is to

  • cost_type (str, optional) – Cost type to get the cost from. If left blank will use the graph’s default cost type.

Returns:

The cost of traversing from parent to child. Will be -1 if no edge exists

Return type:

float