Skip to content

TODO: Optimize routing algorithm #68

@joemphilips

Description

@joemphilips

When I ported the routing algorithm from eclair, there were two things I left behind.

  1. It uses Binary Heap as a data structure to hold the vertex while calculating the route. Original implementation uses Fibonacci Heap, so the time complexity of Dijkstra's algorithm is O(VlogV * E). But our implementation has O(VlogV * ELogV). (where E and V is the number of edges and vertices). this is because Fibonacci heap is more hard to implement than other more simple Heap type, and I couldn't find reference implementation in F#.
  2. I didn't care much about converting ResizeArray -> seq -> list when
    finding k-cheapest path by yenKShortestPath . It might improve the performance by not converting intermediate data to other data type.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions