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

Function template width

boost::histogram::axis::traits::width — Returns bin width at axis index.

Synopsis

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


template<typename Axis> 
  decltype(auto) width(const Axis & axis, index_type index);

Description

If the axis has no value method, throw std::runtime_error. If the method exists and accepts a floating point index, return the result ofaxis.value(index + 1) - axis.value(index). If the method exists but accepts only integer indices, return 0.

Parameters:

axis

any axis instance

index

bin index


PrevUpHomeNext