CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Macros | Functions
Equal.h File Reference
#include <typeinfo>
#include <type_traits>
#include <algorithm>
#include <string>
#include <bitset>
#include <utility>
#include <tuple>
#include <memory>
#include <array>
#include <vector>
#include <deque>
#include <forward_list>
#include <list>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <cstddef>
#include <cmath>
#include <boost/shared_ptr.hpp>
#include "CondFormats/Serialization/interface/Serializable.h"

Go to the source code of this file.

Classes

struct  cond::serialization::access< std::array< T, N > >
 
struct  cond::serialization::access< std::bitset< N > >
 
struct  cond::serialization::access< std::forward_list< T > >
 
struct  cond::serialization::access< std::pair< T, U > >
 
struct  cond::serialization::access< std::string >
 
struct  cond::serialization::access< std::tuple< Ts...> >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_floating_point< T >::value >::type >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_integral< T >::value or std::is_enum< T >::value >::type >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_pointer< T >::value >::type >
 
struct  cond::serialization::access< T[N]>
 
struct  cond::serialization::equal_tuple< N, Ts >
 
struct  cond::serialization::equal_tuple< 0, Ts...>
 

Namespaces

 cond
 
 cond::serialization
 

Macros

#define equal_mapping(TYPE)
 
#define equal_pointer(TYPE)
 
#define equal_sequence(TYPE)
 
#define equal_unorderedmapping(TYPE)
 

Functions

template<typename T >
bool cond::serialization::equal (const T &first, const T &second)
 
 cond::serialization::equal_mapping (std::map)
 
 cond::serialization::equal_pointer (std::unique_ptr)
 
 cond::serialization::equal_pointer (std::shared_ptr)
 
 cond::serialization::equal_pointer (boost::shared_ptr)
 
 cond::serialization::equal_sequence (std::vector)
 
 cond::serialization::equal_sequence (std::deque)
 
 cond::serialization::equal_sequence (std::list)
 
 cond::serialization::equal_sequence (std::set)
 
 cond::serialization::equal_sequence (std::multiset)
 
 cond::serialization::equal_unorderedmapping (std::unordered_map)
 

Macro Definition Documentation

#define equal_mapping (   TYPE)
Value:
template <typename T, typename U> \
struct access<TYPE<T, U>> \
{ \
static bool equal_(const TYPE<T, U> & first, const TYPE<T, U> & second) \
{ \
return first.size() == second.size() && std::equal(first.cbegin(), first.cend(), second.cbegin(), \
[](decltype(*first.cbegin()) a, decltype(a) b) -> bool { \
} \
); \
} \
};
bool equal(const T &first, const T &second)
Definition: Equal.h:34
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
double b
Definition: hdecay.h:120
return(e1-e2)*(e1-e2)+dp *dp
double a
Definition: hdecay.h:121

Definition at line 230 of file Equal.h.

#define equal_pointer (   TYPE)
Value:
template <typename T> \
struct access<TYPE<T>> \
{ \
static bool equal_(const TYPE<T> & first, const TYPE<T> & second) \
{ \
return equal(first.get(), second.get()); \
} \
};
bool equal(const T &first, const T &second)
Definition: Equal.h:34
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
return(e1-e2)*(e1-e2)+dp *dp

Definition at line 148 of file Equal.h.

#define equal_sequence (   TYPE)
Value:
template <typename T> \
struct access<TYPE<T>> \
{ \
static bool equal_(const TYPE<T> & first, const TYPE<T> & second) \
{ \
return first.size() == second.size() && std::equal(first.cbegin(), first.cend(), second.cbegin(), \
[](decltype(*first.cbegin()) a, decltype(a) b) -> bool { \
} \
); \
} \
};
bool equal(const T &first, const T &second)
Definition: Equal.h:34
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
double b
Definition: hdecay.h:120
return(e1-e2)*(e1-e2)+dp *dp
double a
Definition: hdecay.h:121

Definition at line 187 of file Equal.h.

#define equal_unorderedmapping (   TYPE)
Value:
template <typename T, typename U> \
struct access<TYPE<T, U>> \
{ \
static bool equal_(const TYPE<T, U> & first, const TYPE<T, U> & second) \
{ \
if (first.size() != second.size()) \
return false; \
\
auto first_it = first.cbegin(); \
while (first_it != first.cend()) { \
auto second_it = second.find(first_it->first); \
if (second_it == second.cend()) \
return false; \
if (not equal(first_it->second, second_it->second)) \
return false; \
first_it++; \
} \
return true; \
} \
};
bool equal(const T &first, const T &second)
Definition: Equal.h:34
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-

Definition at line 247 of file Equal.h.