Data.Graph.Tree.HLD
type HLDIndex = Int Source #
data HLD Source #
Heavy-Light-Decomposition
Constructors
Fields
Defined in Data.Graph.Tree.HLD
Methods
showsPrec :: Int -> HLD -> ShowS #
show :: HLD -> String #
showList :: [HLD] -> ShowS #
lcaHLD :: HLD -> Vertex -> Vertex -> Vertex Source #
O(log V)
pathHLD :: HLD -> Vertex -> Vertex -> [(HLDIndex, HLDIndex)] Source #
buildHLD :: Vertex -> SparseGraph w -> HLD Source #
O(V)