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>
114 {
return ! (
a & 1); }
128{
return std::abs(
d); }
132{
return std::labs(
d); }
136{
return std::llabs(
d); }
140{
return std::abs(
d); }
144{
return std::abs(
d); }
148{
return std::abs(
d); }
154template<
typename Integer>
160 {
return std::signbit(
a); }
164 {
return std::signbit(
a); }
168 {
return std::signbit(
a); }
174template<
typename T1,
typename T2>
181 {
return std::copysign(
a,
b); }
186 {
return std::copysign(
a,
b); }
191 {
return std::copysign(
a,
b); }
199 {
return a <=
b ?
a :
b; }
204 {
return a <=
b ?
a :
b; }
209 {
return a <=
b ?
a :
b; }
214 {
return a <=
b ?
a :
b; }
219 {
return a <=
b ?
a :
b; }
224 {
return a <=
b ?
a :
b; }
229 {
return a <=
b ?
a :
b; }
234 {
return a <=
b ?
a :
b; }
239 {
return a <=
b ?
a :
b; }
244 {
return a <=
b ?
a :
b; }
251 {
return a >=
b ?
a :
b; }
256 {
return a >=
b ?
a :
b; }
261 {
return a >=
b ?
a :
b; }
266 {
return a >=
b ?
a :
b; }
271 {
return a >=
b ?
a :
b; }
276 {
return a >=
b ?
a :
b; }
281 {
return a >=
b ?
a :
b; }
286 {
return a >=
b ?
a :
b; }
291 {
return a >=
b ?
a :
b; }
296 {
return a >=
b ?
a :
b; }
303 {
return x < lb ? lb : (
x > ub ? ub :
x); }
308 {
return x < lb ? lb : (
x > ub ? ub :
x); }
313 {
return x < lb ? lb : (
x > ub ? ub :
x); }
318 {
return x < lb ? lb : (
x > ub ? ub :
x); }
323 {
return x < lb ? lb : (
x > ub ? ub :
x); }
331template <
typename Iterator,
typename Element>
336 if ( (pind != last) && (*pind ==
value) )
350 pind = std::lower_bound(array, array +
n,
value);
351 if ( (pind != array +
n) && (*pind ==
value) )
352 return (pind - array);
354 return ( pind - array - 1);
365 pind = std::lower_bound(*array, *array +
n,
value);
366 if ( (pind != *array +
n) && (*pind ==
value) )
367 return (pind - *array);
369 return ( pind - *array - 1);
377 template<
typename Index>
390 template<
typename Index>
405template <
typename Iterator,
typename IndexIterator>
411 for ( Iterator cfirst =
first; cfirst != last; ++cfirst )
433 for(Index i = 0; i <
n; i++) {
index[i] = i; }
unsigned long long ULong64_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
void SortItr(Iterator first, Iterator last, IndexIterator index, Bool_t down=kTRUE)
Sort the n1 elements of the Short_t array defined by its iterators.
Long_t NextPrime(Long_t x)
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
Short_t Range(Short_t lb, Short_t ub, Short_t x)
Returns x if lb < x < up, lb if x < lb and ub if x > ub.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Bool_t Odd(Long_t a)
Returns true if a is odd.
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Sort the n elements of the array a of generic templated type Element.
Bool_t SignBit(Integer a)
Returns whether the sign of Integer a is negative.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Bool_t Even(Long_t a)
Returns true if a is even.
bool operator()(Index i1, Index i2)
bool operator()(Index i1, Index i2)