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#if __cplusplus >= 201103
131{
return std::llabs(
d); }
133{
return (
d >= 0) ?
d : -
d; }
137{
return std::abs(
d); }
140{
return std::abs(
d); }
143{
return std::abs(
d); }
148template<
typename Integer>
153 {
return std::signbit(
a); }
156 {
return std::signbit(
a); }
159 {
return std::signbit(
a); }
164template<
typename T1,
typename T2>
169 {
return std::copysign(
a,
b); }
172 {
return std::copysign(
a,
b); }
175 {
return std::copysign(
a,
b); }
181 {
return a <=
b ?
a :
b; }
184 {
return a <=
b ?
a :
b; }
187 {
return a <=
b ?
a :
b; }
190 {
return a <=
b ?
a :
b; }
193 {
return a <=
b ?
a :
b; }
196 {
return a <=
b ?
a :
b; }
199 {
return a <=
b ?
a :
b; }
202 {
return a <=
b ?
a :
b; }
205 {
return a <=
b ?
a :
b; }
208 {
return a <=
b ?
a :
b; }
213 {
return a >=
b ?
a :
b; }
216 {
return a >=
b ?
a :
b; }
219 {
return a >=
b ?
a :
b; }
222 {
return a >=
b ?
a :
b; }
225 {
return a >=
b ?
a :
b; }
228 {
return a >=
b ?
a :
b; }
231 {
return a >=
b ?
a :
b; }
234 {
return a >=
b ?
a :
b; }
237 {
return a >=
b ?
a :
b; }
240 {
return a >=
b ?
a :
b; }
245 {
return x < lb ? lb : (
x > ub ? ub :
x); }
248 {
return x < lb ? lb : (
x > ub ? ub :
x); }
251 {
return x < lb ? lb : (
x > ub ? ub :
x); }
254 {
return x < lb ? lb : (
x > ub ? ub :
x); }
257 {
return x < lb ? lb : (
x > ub ? ub :
x); }
259template <
typename Iterator,
typename Element>
270 pind = std::lower_bound(
first, last, value);
271 if ( (pind != last) && (*pind == value) )
287 pind = std::lower_bound(array, array +
n, value);
288 if ( (pind != array +
n) && (*pind == value) )
289 return (pind - array);
291 return ( pind - array - 1);
303 pind = std::lower_bound(*array, *array +
n, value);
304 if ( (pind != *array +
n) && (*pind == value) )
305 return (pind - *array);
307 return ( pind - *array - 1);
315 template<
typename Index>
328 template<
typename Index>
336template <
typename Iterator,
typename IndexIterator>
349 IndexIterator cindex = index;
350 for ( Iterator cfirst =
first; cfirst != last; ++cfirst )
373 for(
Index i = 0; i <
n; i++) { index[i] = i; }
unsigned long long ULong64_t
Long_t NextPrime(Long_t x)
TMath Base functions.
RooCmdArg Index(RooCategory &icat)
LongDouble_t Abs(LongDouble_t d)
Short_t Max(Short_t a, Short_t b)
void SortItr(Iterator first, Iterator last, IndexIterator index, Bool_t down=kTRUE)
Short_t Range(Short_t lb, Short_t ub, Short_t x)
Bool_t SignBit(LongDouble_t a)
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)