#include <typeinfo>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <cassert>
Go to the source code of this file.
template<typename T >
bool compareL |
( |
T const * |
l, |
|
|
T const * |
r |
|
) |
| |
|
inline |
Less than, comparison funtion.
Definition at line 167 of file PndMvaUtil.h.
170 return ( (*l) < (*
r) );
Less than, comparison funtion.
Definition at line 146 of file PndMvaUtil.h.
149 return ( (*a).m_dist < (*b).m_dist );
float ComputeDist |
( |
std::vector< float > const & |
EvtData, |
|
|
std::vector< float > const & |
Example |
|
) |
| |
Computes the Euclidean distance between two given vectors of event features.
std::string int2str |
( |
int |
n | ) |
|
template<typename Set1 , typename Set2 >
bool is_disjoint |
( |
Set1 const & |
set1, |
|
|
Set2 const & |
set2 |
|
) |
| |
If 2 sets are disjoint.
Input two sorted (ASC) sequences.
- Returns
- true if the sets are disjoint.
NOTE: In some cases one might consider using std::set_intersection from <algorithm>
Definition at line 183 of file PndMvaUtil.h.
187 if( set1.empty() || set2.empty())
192 typename Set1::const_iterator it1 = set1.begin();
193 typename Set1::const_iterator it1End = set1.end();
196 typename Set2::const_iterator it2 = set2.begin();
197 typename Set2::const_iterator it2End = set2.end();
200 if( *it1 > *set2.rbegin() || *it2 > *set1.rbegin() )
206 while( (it1 != it1End) && (it2 != it2End) )
template<typename T >
T const& minFunct |
( |
T const & |
a, |
|
|
T const & |
b |
|
) |
| |
|
inline |
Binary Minimum function.
Definition at line 159 of file PndMvaUtil.h.
References b.
162 return (
a <
b) ?
a :
b;
int str2int |
( |
std::string const & |
str | ) |
|
unsigned int str2Uint |
( |
std::string const & |
str | ) |
|