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

Educational examples for indexed nodes (O(log n) node search) More...

#include <iostream>
#include <tpl_indexNode.H>
#include <tpl_graph.H>
Include dependency graph for tpl_indexNode_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Educational examples for indexed nodes (O(log n) node search)

WHAT IS NODE INDEXING?

Maintains a binary search tree of graph nodes indexed by their values Enables O(log n) search instead of O(n) linear scan Automatically prevents duplicate node values

WHEN TO USE?

  • Graphs with unique node identifiers (IDs, names, keys)
  • Frequent node lookups by value
  • Need to enforce uniqueness constraint
  • Working with large graphs (n > 100 nodes)

COMPILE & RUN:

g++ -std=c++20 -I.. -o tpl_indexNode_example tpl_indexNode_example.cc ./tpl_indexNode_example

Definition in file tpl_indexNode_example.cc.

Function Documentation

◆ main()