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

Human-friendly demo of LCA on Aleph tree graphs. More...

#include <array>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <random>
#include <utility>
#include <LCA.H>
#include <tpl_array.H>
#include <tpl_agraph.H>
#include <tpl_graph.H>
#include <tpl_sgraph.H>
Include dependency graph for lca_example.cc:

Go to the source code of this file.

Functions

int main ()
 Runs the LCA cross-backend parity demo and prints results.
 

Detailed Description

Human-friendly demo of LCA on Aleph tree graphs.

Demonstrates:

  • Binary lifting LCA (Binary_Lifting_LCA)
  • Euler tour + RMQ LCA (Euler_RMQ_LCA)
  • Distance queries and cross-validation between engines
  • Cross-backend parity (List_Graph, List_SGraph, Array_Graph)

Definition in file lca_example.cc.

Function Documentation

◆ main()

int main ( )

Runs the LCA cross-backend parity demo and prints results.

Builds and executes the LCA example for three graph backends, collects per-backend timing and checksum metrics, prints a parity summary table, and reports whether all backends produced identical checksums.

Returns
int 0 on success, non-zero on failure.

Definition at line 250 of file lca_example.cc.

References Aleph::and, Aleph::divide_and_conquer_partition_dp(), and r.