ixfx
    Preparing search index...
    • Compute shortest distance from the source vertex to the rest of the graph.

      Parameters

      • graph: Readonly
      • sourceOrId:
            | string
            | Readonly<
                {
                    id: string;
                    out: readonly Readonly<{ id: string; weight?: number }>[];
                },
            >

      Returns {
          distances: Map<string, number>;
          pathTo: (id: string) => Readonly<{ id: string; weight?: number }>[];
          previous: Map<
              string,
              | null
              | Readonly<
                  {
                      id: string;
                      out: readonly Readonly<{ id: string; weight?: number }>[];
                  },
              >,
          >;
      }