The edge label given to the cost function of an algorithm like dijkstras_algorithm is always nil.
For example
cost_function = lambda{|e| e.label || 0 }
Will always return a cost of zero because the label will always be nil.
It would be nice if the cost function was passed the actual edge instead of a copy with the same start and end point so that the edge label is accessible from inside the cost function.
The edge label given to the cost function of an algorithm like dijkstras_algorithm is always nil.
For example
cost_function = lambda{|e| e.label || 0 }
Will always return a cost of zero because the label will always be nil.
It would be nice if the cost function was passed the actual edge instead of a copy with the same start and end point so that the edge label is accessible from inside the cost function.