Skip to content

Cost function Doesn't Have Access To Edge Label #1

@maxhawkins

Description

@maxhawkins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions