Belle II Software light-2406-ragdoll
EqualVisitor Struct Reference

Seperate Visitor struct for equal_to comparison of variant<double, int bool>. More...

#include <CutNodes.h>

Public Member Functions

bool operator() (const double &val0, const double &val1)
 double double overload with double comparison.
 
bool operator() (const double &val0, const int &val1)
 double int overload with double comparison.
 
bool operator() (const double &val0, const bool &val1)
 double bool overload with double comparison.
 
bool operator() (const int &val0, const int &val1)
 int int overload with int comparison.
 
bool operator() (const int &val0, const bool &val1)
 int bool overload with int comparison.
 
bool operator() (const int &val0, const double &val1)
 int double overload with double comparison.
 
bool operator() (const bool &val0, const bool &val1)
 bool bool overload with bool comparison.
 
bool operator() (const bool &val0, const double &val1)
 bool double overload with double comparison.
 
bool operator() (const bool &val0, const int &val1)
 bool int overload with int comparison.
 

Detailed Description

Seperate Visitor struct for equal_to comparison of variant<double, int bool>.

Uses almostEqualDouble if one argument is double.

Definition at line 125 of file CutNodes.h.

Member Function Documentation

◆ operator()() [1/9]

bool operator() ( const bool &  val0,
const bool &  val1 
)
inline

bool bool overload with bool comparison.

Definition at line 171 of file CutNodes.h.

172 {
173 return std::equal_to<bool> {}(val0, val1);
174 }

◆ operator()() [2/9]

bool operator() ( const bool &  val0,
const double &  val1 
)
inline

bool double overload with double comparison.

Definition at line 178 of file CutNodes.h.

179 {
180 return almostEqualDouble(val0, val1);
181 }
bool almostEqualDouble(const double &a, const double &b)
Helper function to test if two doubles are almost equal.
Definition: CutHelpers.cc:26

◆ operator()() [3/9]

bool operator() ( const bool &  val0,
const int &  val1 
)
inline

bool int overload with int comparison.

Definition at line 185 of file CutNodes.h.

186 {
187 return std::equal_to<int> {}(val0, val1);
188 }

◆ operator()() [4/9]

bool operator() ( const double &  val0,
const bool &  val1 
)
inline

double bool overload with double comparison.

Definition at line 143 of file CutNodes.h.

144 {
145 return almostEqualDouble(val0, val1);
146 }

◆ operator()() [5/9]

bool operator() ( const double &  val0,
const double &  val1 
)
inline

double double overload with double comparison.

Definition at line 129 of file CutNodes.h.

130 {
131 return almostEqualDouble(val0, val1);
132 }

◆ operator()() [6/9]

bool operator() ( const double &  val0,
const int &  val1 
)
inline

double int overload with double comparison.

Definition at line 136 of file CutNodes.h.

137 {
138 return almostEqualDouble(val0, val1);
139 }

◆ operator()() [7/9]

bool operator() ( const int &  val0,
const bool &  val1 
)
inline

int bool overload with int comparison.

Definition at line 157 of file CutNodes.h.

158 {
159 return std::equal_to<int> {}(val0, val1);
160 }

◆ operator()() [8/9]

bool operator() ( const int &  val0,
const double &  val1 
)
inline

int double overload with double comparison.

Definition at line 164 of file CutNodes.h.

165 {
166 return almostEqualDouble(val0, val1);
167 }

◆ operator()() [9/9]

bool operator() ( const int &  val0,
const int &  val1 
)
inline

int int overload with int comparison.

Definition at line 150 of file CutNodes.h.

151 {
152 return std::equal_to<int> {}(val0, val1);
153 }

The documentation for this struct was generated from the following file: