31 #define G4MergeMode_h 1
52 namespace G4Accumulables {
59 switch ( mergeMode ) {
62 return [](
const T&
x,
const T&
y) {
return x +
y; };
65 return [](
const T&
x,
const T&
y) {
return x *
y; };
69 return [](
const T&
x,
const T&
y) {
return std::max(x,
y); };
73 return [](
const T&
x,
const T&
y) {
return std::min(x,
y); };
80 switch ( mergeMode ) {
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4MergeFunction< T > GetMergeFunction(G4MergeMode mergeMode)
std::function< T(const T &, const T &)> G4MergeFunction
G4MergeMode GetMergeMode(const G4String &mergeModeName)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments