Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "algorithm/flood-fill"

Index

Functions

Functions

floodFill

  • floodFill<T, C, U>(start: T, color: C, g: Graph<T> & ColoredMutable<T, C>, callback?: undefined | ((v: T, c?: C) => U)): U[]
  • Applies flood-fill to a generic colored graph.

    Type parameters

    • T

    • C

    • U

    Parameters

    • start: T

      starting vertex.

    • color: C

      color to fill in.

    • g: Graph<T> & ColoredMutable<T, C>

      colored graph.

    • Optional callback: undefined | ((v: T, c?: C) => U)

      callback for each recolored vertex.

    Returns U[]

    a list with all return values from the callback calls.

Generated using TypeDoc