Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
link_cut_tree_example.cc File Reference

Illustrative examples for Link-Cut Trees. More...

#include <iostream>
#include <tpl_link_cut_tree.H>
Include dependency graph for link_cut_tree_example.cc:

Go to the source code of this file.

Functions

static void example_connectivity ()
 
static void example_rerooting ()
 
static void example_lca ()
 
static void example_path_aggregates ()
 
static void example_lazy_updates ()
 
int main ()
 

Detailed Description

Illustrative examples for Link-Cut Trees.

Demonstrates:

  1. Dynamic connectivity (link, cut, connected)
  2. Rerooting a tree (make_root, find_root)
  3. Lowest common ancestor (lca)
  4. Path aggregates (sum, min, max)
  5. Lazy path updates (path_apply)

Definition in file link_cut_tree_example.cc.

Function Documentation

◆ example_connectivity()

◆ example_lazy_updates()

static void example_lazy_updates ( )
static

Definition at line 239 of file link_cut_tree_example.cc.

References Aleph::divide_and_conquer_partition_dp(), and LL.

Referenced by main().

◆ example_lca()

◆ example_path_aggregates()

◆ example_rerooting()

◆ main()