#include "CompareAlgorithms.h"
Go to the source code of this file.
Functions | |
template<class Datatype> | |
Datatype * | BSearch (Datatype *Key, Datatype *Base, int Size, ACompareNodesAlgorithm< Datatype, void > *Compare) |
A templated standard binary search function. | |
template<class Datatype> | |
Datatype * | FreecellSolverBSearch (Datatype *Key, Datatype *Array, int Length, ACompareNodesAlgorithm< Datatype, void > *Compare, bool *Found) |
An improved binary search function. | |
template<class Datatype> | |
void | SFOMergeLargeAndSmallSortedArrays (Datatype *BigArray, int BigArraySize, Datatype *SmallArray, int SmallArraySize, ACompareNodesAlgorithm< Datatype, void > *Compare) |
Merges a large sorted array with a small sorted array. |
Definition in file SearchAlgorithms.h.
|
Definition at line 22 of file SearchAlgorithms.h. References ACompareNodesAlgorithm< Data, ConfigData >::Compare(). |
|
This is based off of the implementation of Shlomi Fish's (shlomif@vipe.technion.ac.il) binary search algorithm written in C
Definition at line 58 of file SearchAlgorithms.h. References ACompareNodesAlgorithm< Data, ConfigData >::Compare(). |
|
The arrays could be of any length whatsoever, but it works faster if the first is significantly bigger than the second. This function assumes that big_array is allocated with enough space to hold the extra elements. The arrays should be distinct or else there would be unexpected results.
Definition at line 102 of file SearchAlgorithms.h. |