51 template<
typename Integer>
58 template<
typename T1,
typename T2>
100 template <
typename Iterator,
typename Element> Iterator
BinarySearch(Iterator
first, Iterator last, Element value);
103 template <
typename Element,
typename Index>
105 template <
typename Iterator,
typename IndexIterator>
113 {
return ! (
a & 1); }
124{
return std::abs(
d); }
127{
return std::labs(
d); }
130{
return std::llabs(
d); }
133{
return std::abs(
d); }
136{
return std::abs(
d); }
139{
return std::abs(
d); }
144template<
typename Integer>
149 {
return std::signbit(
a); }
152 {
return std::signbit(
a); }
155 {
return std::signbit(
a); }
160template<
typename T1,
typename T2>
165 {
return std::copysign(
a,
b); }
168 {
return std::copysign(
a,
b); }
171 {
return std::copysign(
a,
b); }
177 {
return a <=
b ?
a :
b; }
180 {
return a <=
b ?
a :
b; }
183 {
return a <=
b ?
a :
b; }
186 {
return a <=
b ?
a :
b; }
189 {
return a <=
b ?
a :
b; }
192 {
return a <=
b ?
a :
b; }
195 {
return a <=
b ?
a :
b; }
198 {
return a <=
b ?
a :
b; }
201 {
return a <=
b ?
a :
b; }
204 {
return a <=
b ?
a :
b; }
209 {
return a >=
b ?
a :
b; }
212 {
return a >=
b ?
a :
b; }
215 {
return a >=
b ?
a :
b; }
218 {
return a >=
b ?
a :
b; }
221 {
return a >=
b ?
a :
b; }
224 {
return a >=
b ?
a :
b; }
227 {
return a >=
b ?
a :
b; }
230 {
return a >=
b ?
a :
b; }
233 {
return a >=
b ?
a :
b; }
236 {
return a >=
b ?
a :
b; }
241 {
return x < lb ? lb : (
x > ub ? ub :
x); }
244 {
return x < lb ? lb : (
x > ub ? ub :
x); }
247 {
return x < lb ? lb : (
x > ub ? ub :
x); }
250 {
return x < lb ? lb : (
x > ub ? ub :
x); }
253 {
return x < lb ? lb : (
x > ub ? ub :
x); }
255template <
typename Iterator,
typename Element>
266 pind = std::lower_bound(
first, last, value);
267 if ( (pind != last) && (*pind == value) )
283 pind = std::lower_bound(array, array +
n, value);
284 if ( (pind != array +
n) && (*pind == value) )
285 return (pind - array);
287 return ( pind - array - 1);
299 pind = std::lower_bound(*array, *array +
n, value);
300 if ( (pind != *array +
n) && (*pind == value) )
301 return (pind - *array);
303 return ( pind - *array - 1);
311 template<
typename Index>
324 template<
typename Index>
332template <
typename Iterator,
typename IndexIterator>
345 IndexIterator cindex = index;
346 for ( Iterator cfirst =
first; cfirst != last; ++cfirst )
358template <
typename Element,
typename Index>
void TMath::Sort(Index
n,
const Element*
a, Index* index,
Bool_t down)
369 for(Index i = 0; i <
n; i++) { index[i] = i; }
unsigned long long ULong64_t
Short_t Max(Short_t a, Short_t b)
void SortItr(Iterator first, Iterator last, IndexIterator index, Bool_t down=kTRUE)
Long_t NextPrime(Long_t x)
Short_t Range(Short_t lb, Short_t ub, Short_t x)
Short_t Min(Short_t a, Short_t b)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Bool_t SignBit(Integer a)
Long64_t BinarySearch(Long64_t n, const T *array, T value)
bool operator()(Index i1, Index i2)
bool operator()(Index i1, Index i2)