Class Dijkstra

Description

Dijkstra算法

Hierarchy

  • Dijkstra

Constructors

Properties

Methods

Constructors

  • Djikstra算法

    Parameters

    • edges: any[][]

      ["a", "b", 7]

    • source: string | number

      "a" 起点

    Returns Dijkstra

Properties

edges: any[][]
source: string | number

Methods

  • dijstra——寻找源点至目标点的路径

    Parameters

    • target: any

      :number|string:目标点

    Returns (number | any[])[]

    [paths,length]——源点到目标点的路径和距离(总权重)

Generated using TypeDoc