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

Struct template is_ordered

boost::histogram::axis::traits::is_ordered — Meta-function to detect whether an axis is ordered.

Synopsis

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

template<typename Axis> 
struct is_ordered {
};

Description

Doxygen does not render this well. This is a meta-function (template alias), it accepts an axis type and returns a compile-time boolean. If the boolean is true, the axis is ordered.

The meta-function checks for the method constexpr static bool ordered(), and uses the result. If this method is not present, it returns true if the value type of the Axis is arithmetic and false otherwise.

An ordered axis has a value type that is ordered, which means that indices i < j < k implies either value(i) < value(j) < value(k) or value(i) > value(j) > value(k) for all i,j,k. For example, the integer axis is ordered, but the category axis is not. Axis which are not ordered must not have underflow bins, because they only have an "other" category, which is identified with the overflow bin if it is available.

Template Parameters

  1. typename Axis

    axis type


PrevUpHomeNext