Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class template boolean

boost::histogram::axis::boolean — Discrete axis for boolean data.

Synopsis

// In header: <boost/histogram/axis/boolean.hpp>

template<typename MetaData> 
class boolean : public boost::histogram::axis::iterator_mixin< boolean< MetaData > >,
                public metadata_base_t< MetaData >
{
public:
  // construct/copy/destruct
  explicit boolean(metadata_type = {}) noexcept(std::is_nothrow_move_constructible< metadata_type >::value);

  // public member functions
  index_type index(value_type) const noexcept;
  value_type value(index_type) const noexcept;
  value_type bin(index_type) const noexcept;
  index_type size() const noexcept;
  template<typename M> bool operator==(const boolean< M > &) const noexcept;
  template<typename M> bool operator!=(const boolean< M > &) const noexcept;
  template<typename Archive> void serialize(Archive &, unsigned);

  // public static functions
  static constexpr bool inclusive() noexcept;
  static constexpr unsigned options() noexcept;
};

Description

Binning is a pass-though operation with zero cost, making this the fastest possible axis. The axis has no internal state apart from the optional metadata state. The axis has no under- and overflow bins. It cannot grow and cannot be reduced.

Template Parameters

  1. typename MetaData

    type to store meta data.

boolean public construct/copy/destruct

  1. explicit boolean(metadata_type meta = {}) noexcept(std::is_nothrow_move_constructible< metadata_type >::value);
    Construct a boolean axis.

    The constructor is nothrow if meta is nothrow move constructible.

    Parameters:

    meta

    description of the axis.

boolean public member functions

  1. index_type index(value_type x) const noexcept;
    Return index for value argument.
  2. value_type value(index_type i) const noexcept;
    Return value for index argument.
  3. value_type bin(index_type i) const noexcept;
    Return bin for index argument.
  4. index_type size() const noexcept;
    Returns the number of bins, without over- or underflow.
  5. template<typename M> bool operator==(const boolean< M > & o) const noexcept;
  6. template<typename M> bool operator!=(const boolean< M > & o) const noexcept;
  7. template<typename Archive> void serialize(Archive & ar, unsigned);

boolean public static functions

  1. static constexpr bool inclusive() noexcept;
    Whether the axis is inclusive (see axis::traits::is_inclusive).
  2. static constexpr unsigned options() noexcept;
    Returns the options.

PrevUpHomeNext