Returns true/false if there is a connection between a and b in graph. Use getConnection if you want to the edge.

  • Parameters

    • graph: Readonly<{
          edges: readonly Readonly<{
              a: string;
              b: string;
              weight?: number;
          }>[];
          vertices: IMapImmutable<string, Readonly<{
              id: string;
          }>>;
      }>

      Graph to search

    • a: string | Readonly<{
          id: string;
      }>
    • b: string | Readonly<{
          id: string;
      }>

    Returns boolean

    true if edge exists