JayBeams  0.1
Another project to have fun coding.
Classes | Public Types | Public Member Functions | List of all members
jb::histogram< binning_strategy_t, counter_type_t >::check_constraints Struct Reference

Verify the constraints on the histogram template class template parameters, and generate better error messages when they are not met. More...

#include <histogram.hpp>

Classes

struct  error
 An object to create a SFINAE condition. More...
 

Public Types

typedef histogram< binning_strategyhisto
 
typedef histo::sample_type sample_type
 

Public Member Functions

 check_constraints ()
 
auto histogram_min_return_type () -> decltype(std::declval< const binning_strategy >().histogram_min())
 
auto histogram_max_return_type () -> decltype(std::declval< const binning_strategy >().histogram_max())
 
auto theoretical_min_return_type () -> decltype(std::declval< const binning_strategy >().theoretical_min())
 
auto theoretical_max_return_type () -> decltype(std::declval< const binning_strategy >().theoretical_max())
 
auto sample2bin_return_type () -> decltype(std::declval< const binning_strategy >().sample2bin(std::declval< const sample_type >()))
 
auto bin2sample_return_type () -> decltype(std::declval< const binning_strategy >().bin2sample(std::size_t(0)))
 
auto interpolate_return_type () -> decltype(std::declval< const binning_strategy >().interpolate(std::declval< const sample_type >(), std::declval< const sample_type >(), double(1.0), double(1.0), double(0.5)))
 
error has_less_than (...)
 
auto has_less_than (sample_type const &t) -> decltype(static_cast< void >(t< t), char(0))
 
error has_less_than_or_equal (...)
 
auto has_less_than_or_equal (sample_type const &t) -> decltype(static_cast< void >(t<=t), char(0))
 

Detailed Description

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
struct jb::histogram< binning_strategy_t, counter_type_t >::check_constraints

Verify the constraints on the histogram template class template parameters, and generate better error messages when they are not met.

Definition at line 261 of file histogram.hpp.


Class Documentation

◆ jb::histogram::check_constraints::error

struct jb::histogram::check_constraints::error

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
struct jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::error

An object to create a SFINAE condition.

Definition at line 340 of file histogram.hpp.

Class Members
char fill[2]

Member Typedef Documentation

◆ histo

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
typedef histogram<binning_strategy> jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::histo

Definition at line 262 of file histogram.hpp.

◆ sample_type

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
typedef histo::sample_type jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::sample_type

Definition at line 263 of file histogram.hpp.

Constructor & Destructor Documentation

◆ check_constraints()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::check_constraints ( )
inline

Definition at line 265 of file histogram.hpp.

Member Function Documentation

◆ bin2sample_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::bin2sample_return_type ( ) -> decltype(std::declval< const binning_strategy >().bin2sample(std::size_t(0)))

◆ has_less_than() [1/2]

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
error jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::has_less_than (   ...)

◆ has_less_than() [2/2]

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::has_less_than ( sample_type const &  t) -> decltype(static_cast< void >(t< t), char(0))

◆ has_less_than_or_equal() [1/2]

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
error jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::has_less_than_or_equal (   ...)

◆ has_less_than_or_equal() [2/2]

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::has_less_than_or_equal ( sample_type const &  t) -> decltype(static_cast< void >(t<=t), char(0))

◆ histogram_max_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::histogram_max_return_type ( ) -> decltype(std::declval< const binning_strategy >().histogram_max())

◆ histogram_min_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::histogram_min_return_type ( ) -> decltype(std::declval< const binning_strategy >().histogram_min())

◆ interpolate_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::interpolate_return_type ( ) -> decltype(std::declval< const binning_strategy >().interpolate(std::declval< const sample_type >(), std::declval< const sample_type >(), double(1.0), double(1.0), double(0.5)))

◆ sample2bin_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::sample2bin_return_type ( ) -> decltype(std::declval< const binning_strategy >().sample2bin(std::declval< const sample_type >()))

◆ theoretical_max_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::theoretical_max_return_type ( ) -> decltype(std::declval< const binning_strategy >().theoretical_max())

◆ theoretical_min_return_type()

template<typename binning_strategy_t, typename counter_type_t = unsigned int>
auto jb::histogram< binning_strategy_t, counter_type_t >::check_constraints::theoretical_min_return_type ( ) -> decltype(std::declval< const binning_strategy >().theoretical_min())

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