xiaosenlin1
V2EX  ›  算法

路由算法

  •  
  •   xiaosenlin1 · Sep 10, 2020 · 2780 views
    This topic created in 2100 days ago, the information mentioned may be changed or developed.

    假设有 5000 个小房子 有入口和出口 现在求 某一个入口到某一个出口的 最短 10 条路径有没有大师做过类似的 计算

    4 replies    2020-10-27 10:19:21 +08:00
    nulI
        1
    nulI  
       Sep 10, 2020
    之前用 pg 库的 pgRouting 做过。或者看下算法里图的那块手写?
    VoidChen
        2
    VoidChen  
       Sep 10, 2020
    最短路径用图算法啊,以前用迪杰斯特拉做过。。
    xiri
        3
    xiri  
       Sep 10, 2020
    最短路径,这是典型的图论问题,有现成的算法,套用就行了
    GavinHsueh
        4
    GavinHsueh  
       Oct 27, 2020
    Dijkstra 单源最短路径算法,我之前有整理过,lz 可以参考下。
    https://www.xuecaijie.com/php/200.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1244 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 17:33 · PVG 01:33 · LAX 10:33 · JFK 13:33
    ♥ Do have faith in what you're doing.