ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::OptimalSearchTree< T > Struct Template Reference

an optimal binary search tree on the keys \( 0 , \ldots , n - 1 \): its cost, its root and the children of each key, \( -1 \) for none (and for the root of the empty tree) More...

#include <ADS/optimization/OptimalSearchTree.h>

Public attributes

T cost
 the weighted path length
int root
 the key at the root
std::vector< int > left
 the left child of each key
std::vector< int > right
 the right child of each key

Detailed description

template<class T>
struct ADS::OptimalSearchTree< T >

an optimal binary search tree on the keys \( 0 , \ldots , n - 1 \): its cost, its root and the children of each key, \( -1 \) for none (and for the root of the empty tree)

Member data documentation

◆ cost

template<class T>
T ADS::OptimalSearchTree< T >::cost

the weighted path length

◆ left

template<class T>
std::vector< int > ADS::OptimalSearchTree< T >::left

the left child of each key

◆ right

template<class T>
std::vector< int > ADS::OptimalSearchTree< T >::right

the right child of each key

◆ root

template<class T>
int ADS::OptimalSearchTree< T >::root

the key at the root


The documentation for this struct was generated from the following file: