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

Human-friendly demo of Heavy-Light Decomposition on Aleph tree graphs. More...

#include <array>
#include <cstddef>
#include <iomanip>
#include <iostream>
#include <string>
#include <HLD.H>
#include <tpl_array.H>
#include <tpl_graph.H>
Include dependency graph for hld_example.cc:

Go to the source code of this file.

Functions

int main ()
 Entry point that runs HLD demonstration scenarios for Aleph tree graphs.
 

Detailed Description

Human-friendly demo of Heavy-Light Decomposition on Aleph tree graphs.

Demonstrates three real-world scenarios:

  1. Corporate Hierarchy — Path Max (Security Clearance)
  2. Network Infrastructure — Path Min (Bandwidth Bottleneck)
  3. Tax Routes — Path Sum + Dynamic Updates

Definition in file hld_example.cc.

Function Documentation

◆ main()

int main ( )

Entry point that runs HLD demonstration scenarios for Aleph tree graphs.

Prints a header, executes three example scenarios demonstrating Heavy-Light Decomposition (security clearance max queries, bandwidth bottleneck min queries, and tax-route sum queries with dynamic updates), and prints a completion message.

Returns
int Zero on successful completion.

Definition at line 303 of file hld_example.cc.

References Aleph::divide_and_conquer_partition_dp().