Yog.Pathfinding.LCA.State (YogEx v0.97.0)

Copy Markdown View Source

Preprocessed state for LCA queries.

Fields:

  • :root - The root node used for preprocessing
  • :max_log - Maximum power of two needed (log2(V) rounded up)
  • :depth - Map of node -> depth from root
  • :up - Binary lifting table as %{k => %{node => ancestor}}
  • :graph - Reference to the original graph

Summary

Types

t()

@type t() :: %Yog.Pathfinding.LCA.State{
  depth: %{required(Yog.node_id()) => non_neg_integer()},
  graph: Yog.Graph.t(),
  max_log: pos_integer(),
  root: Yog.node_id(),
  up: %{
    required(non_neg_integer()) => %{
      required(Yog.node_id()) => Yog.node_id() | nil
    }
  }
}