Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Control
CxxUtils
CxxUtils
minmax_transformed_element.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
* Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4
*/
23
#ifndef CXXUTILS_MINMAX_TRANSFORMED_ELEMENT_H
24
#define CXXUTILS_MINMAX_TRANSFORMED_ELEMENT_H
25
26
27
#include <ranges>
28
#include <utility>
29
#include <cstdlib>
30
31
32
namespace
CxxUtils
{
33
34
48
template
<
class
RANGE,
class
FUNC>
49
inline
50
auto
min_transformed_element
(RANGE&&
r
, FUNC&&
f
)
51
{
52
if
(std::ranges::empty (
r
)) std::abort();
53
auto
it
=
std::ranges::begin
(
r
);
54
auto
itmin =
it
;
55
auto
val
=
f
(*
it
);
56
for
(++
it
;
it
!=
std::ranges::end
(
r
); ++
it
) {
57
auto
val2
=
f
(*
it
);
58
if
(
val2
<
val
) {
59
val
=
val2
;
60
itmin =
it
;
61
}
62
}
63
return
std::make_pair (
val
, itmin);
64
}
65
66
80
template
<
class
RANGE,
class
FUNC>
81
inline
82
auto
max_transformed_element
(RANGE&&
r
, FUNC&&
f
)
83
{
84
if
(std::ranges::empty (
r
)) std::abort();
85
auto
it
=
std::ranges::begin
(
r
);
86
auto
itmax =
it
;
87
auto
val
=
f
(*
it
);
88
for
(++
it
;
it
!=
std::ranges::end
(
r
); ++
it
) {
89
auto
val2
=
f
(*
it
);
90
if
(
val2
>
val
) {
91
val
=
val2
;
92
itmax =
it
;
93
}
94
}
95
return
std::make_pair (
val
, itmax);
96
}
97
98
99
}
// namespace CxxUtils
100
101
102
#endif // not CXXUTILS_MINMAX_TRANSFORMED_ELEMENT_H
beamspotman.r
def r
Definition:
beamspotman.py:676
PlotCalibFromCool.begin
begin
Definition:
PlotCalibFromCool.py:94
skel.it
it
Definition:
skel.GENtoEVGEN.py:401
mergePhysValFiles.end
end
Definition:
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
WriteLumiToCool.val2
val2
Definition:
WriteLumiToCool.py:185
CxxUtils
Definition:
aligned_vector.h:29
hist_file_dump.f
f
Definition:
hist_file_dump.py:141
CxxUtils::max_transformed_element
auto max_transformed_element(RANGE &&r, FUNC &&f)
Find the maximum transformed element in a range.
Definition:
minmax_transformed_element.h:82
Pythia8_RapidityOrderMPI.val
val
Definition:
Pythia8_RapidityOrderMPI.py:14
CxxUtils::min_transformed_element
auto min_transformed_element(RANGE &&r, FUNC &&f)
Find the minimum transformed element in a range.
Definition:
minmax_transformed_element.h:50
Generated on Sat Mar 15 2025 21:14:48 for ATLAS Offline Software by
1.8.18