\hypertarget{dictionary-test_8cc}{
\section{dictionary-test.cc File Reference}
\label{dictionary-test_8cc}\index{dictionary-test.cc@{dictionary-test.cc}}
}


\subsection{Detailed Description}
Simple program for testing BST functionality (note that you can use it to test your AVL/Splay trees as well!).





Definition in file \hyperlink{dictionary-test_8cc-source}{dictionary-test.cc}.{\tt \#include \char`\"{}Binary\-Search\-Tree.hh\char`\"{}}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$algorithm$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
bool \hyperlink{dictionary-test_8cc_a0}{Entry\-Value\-Comparator} (const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \&a, const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \&b)
\begin{CompactList}\small\item\em This is a comparator which compares two entries by the $\ast$value$\ast$ (the second member of the pair) rather than by the key.\item\end{CompactList}\item 
void \hyperlink{dictionary-test_8cc_a1}{print\-Entry} (const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \&e)
\begin{CompactList}\small\item\em This pretty-prints a single entry to cout.\item\end{CompactList}\item 
int \hyperlink{dictionary-test_8cc_a2}{main} (void)
\begin{CompactList}\small\item\em The main test program.\item\end{CompactList}\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{dictionary-test_8cc_a0}{
\index{dictionary-test.cc@{dictionary-test.cc}!EntryValueComparator@{EntryValueComparator}}
\index{EntryValueComparator@{EntryValueComparator}!dictionary-test.cc@{dictionary-test.cc}}
\subsubsection[EntryValueComparator]{\setlength{\rightskip}{0pt plus 5cm}bool Entry\-Value\-Comparator (const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \& {\em a}, const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \& {\em b})}}
\label{dictionary-test_8cc_a0}


This is a comparator which compares two entries by the $\ast$value$\ast$ (the second member of the pair) rather than by the key.

\begin{Desc}
\item[Returns :]\par
{\tt true} if a is less than b. \end{Desc}


Definition at line 25 of file dictionary-test.cc.

Referenced by main().\hypertarget{dictionary-test_8cc_a2}{
\index{dictionary-test.cc@{dictionary-test.cc}!main@{main}}
\index{main@{main}!dictionary-test.cc@{dictionary-test.cc}}
\subsubsection[main]{\setlength{\rightskip}{0pt plus 5cm}int main (void)}}
\label{dictionary-test_8cc_a2}


The main test program.



Definition at line 50 of file dictionary-test.cc.

References Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::change\-Value(), Entry\-Value\-Comparator(), Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::find(), Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::get\-Entry\-List(), Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::get\-Size(), Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::insert(), Binary\-Search\-Tree$<$ Key\-Type, Value\-Type $>$::print(), and print\-Entry().\hypertarget{dictionary-test_8cc_a1}{
\index{dictionary-test.cc@{dictionary-test.cc}!printEntry@{printEntry}}
\index{printEntry@{printEntry}!dictionary-test.cc@{dictionary-test.cc}}
\subsubsection[printEntry]{\setlength{\rightskip}{0pt plus 5cm}void print\-Entry (const \hyperlink{classBinarySearchTree}{Binary\-Search\-Tree}$<$ int, double $>$::Entry \& {\em e})}}
\label{dictionary-test_8cc_a1}


This pretty-prints a single entry to cout.

Yeah, so this should probably have taken some ostream reference, but I got lazy.\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
e}]The entry to pretty-print. \end{description}
\end{Desc}


Definition at line 41 of file dictionary-test.cc.

Referenced by main().