18 for (
Int_t i = 0; i <
nn; i++) {
27 for (
Int_t i = 0; i <
nn; i++) {
33 for (
T elem = -1; elem <=
maxint; ++elem ) {
37 pind = std::lower_bound(k, k+20, elem);
38 Long_t index2 = ((*pind == elem)? (pind - k): ( pind - k - 1));
40 pind = std::upper_bound(k, k+20, elem);
41 Long_t index3 = ((*pind == elem)? (pind - k): ( pind - k - 1));
43 cout <<
" ELEM = " << elem
44 <<
" [TMATH] [i:" << index <<
" k[i]:" << k[index] <<
']' 45 <<
" [LOWER] [i:" << index2 <<
" k[i]:" << k[index2] <<
']' 46 <<
" [UPPER] [i:" << index3 <<
" k[i]:" << k[index3] <<
']' 54 testBinarySearch<Double_t>();
56 cout <<
"Test done!" << endl;
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
Long64_t BinarySearch(Long64_t n, const T *array, T value)