TOC Toolkit API - v0.1.0
    Preparing search index...

    Function reachableFrom

    • Returns the nodes that a path from one of the roots reaches, with the roots themselves. The nodes of the graph are the integers from 0 up to size. The result lists the nodes in the order in which a breadth-first search finds them.

      The search takes time linear in the number of nodes and edges that it reaches.

      Parameters

      • size: number
      • roots: Iterable<number>
      • successors: Successors

      Returns SparseSet