Skip to content

Add a parameter to compose cost fn #64

@souenzzo

Description

@souenzzo

costs are always composed with +

i want to compose them with *

It should be exposed in ubergraph.alg/shortest-path by adding an extra attr to search-specification:

:compose-cost-fn (fn [current-cost new-cost] => next-cost) - Calculates the next cost, given the current cost and the node cost. Defaults to clojure.core/+

https://github.com/Engelberg/ubergraph/blob/v0.8.1/src/ubergraph/alg.clj#L232

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