diff --git a/doc/autodoc.xml b/doc/autodoc.xml index c78217a7..33f3461d 100644 --- a/doc/autodoc.xml +++ b/doc/autodoc.xml @@ -14,8 +14,8 @@ int bool intconst double -::boost::string_view -voidconst ::boost::string_view +string_view +voidconst string_view axis::interval< double >const int boolconst any_axis & @@ -94,7 +94,7 @@ Base class for all axes. intReturns the number of bins, excluding overflow/underflow. intReturns the number of bins, including overflow/underflow. -boolReturns whether axis has extra overflow and underflow bins. +boolReturns true if axis has extra overflow and underflow bins. string_viewReturns the axis label, which is a name or description. voidstring_viewChange the label of an axis. diff --git a/doc/html/boost/histogram/adaptive_storage.html b/doc/html/boost/histogram/adaptive_storage.html index e3c88ce7..639ae00d 100644 --- a/doc/html/boost/histogram/adaptive_storage.html +++ b/doc/html/boost/histogram/adaptive_storage.html @@ -38,75 +38,75 @@ typedef double value_type; // construct/copy/destruct - explicit adaptive_storage(std::size_t); - adaptive_storage() = default; - adaptive_storage(const adaptive_storage &) = default; - adaptive_storage(adaptive_storage &&) = default; + explicit adaptive_storage(std::size_t); + adaptive_storage() = default; + adaptive_storage(const adaptive_storage &) = default; + adaptive_storage(adaptive_storage &&) = default; template<typename RHS, typename = detail::is_storage<RHS> > - explicit adaptive_storage(const RHS &); - adaptive_storage & operator=(const adaptive_storage &) = default; - adaptive_storage & operator=(adaptive_storage &&) = default; - template<typename RHS> adaptive_storage & operator=(const RHS &); + explicit adaptive_storage(const RHS &); + adaptive_storage & operator=(const adaptive_storage &) = default; + adaptive_storage & operator=(adaptive_storage &&) = default; + template<typename RHS> adaptive_storage & operator=(const RHS &); - // public member functions - std::size_t size() const; - void increase(std::size_t); - template<typename T> void add(std::size_t, const T &); - template<typename T> void add(std::size_t, const T &, const T &); - void weighted_increase(std::size_t, const double); - value_type value(std::size_t) const; - value_type variance(std::size_t) const; - bool operator==(const adaptive_storage &) const; - adaptive_storage & operator+=(const adaptive_storage &); + // public member functions + std::size_t size() const; + void increase(std::size_t); + template<typename T> void add(std::size_t, const T &); + template<typename T> void add(std::size_t, const T &, const T &); + void weighted_increase(std::size_t, const double); + value_type value(std::size_t) const; + value_type variance(std::size_t) const; + bool operator==(const adaptive_storage &) const; + adaptive_storage & operator+=(const adaptive_storage &); template<typename RHS, typename = detail::is_storage<RHS> > - adaptive_storage & operator+=(const RHS &); - adaptive_storage & operator*=(const value_type); + adaptive_storage & operator+=(const RHS &); + adaptive_storage & operator*=(const value_type); - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

-

+

adaptive_storage public construct/copy/destruct

    -
  1. explicit adaptive_storage(std::size_t s);
  2. -
  3. adaptive_storage() = default;
  4. -
  5. adaptive_storage(const adaptive_storage &) = default;
  6. -
  7. adaptive_storage(adaptive_storage &&) = default;
  8. +
  9. explicit adaptive_storage(std::size_t s);
  10. +
  11. adaptive_storage() = default;
  12. +
  13. adaptive_storage(const adaptive_storage &) = default;
  14. +
  15. adaptive_storage(adaptive_storage &&) = default;
  16. template<typename RHS, typename  = detail::is_storage<RHS> > 
    -  explicit adaptive_storage(const RHS & rhs);
  17. -
  18. adaptive_storage & operator=(const adaptive_storage &) = default;
  19. -
  20. adaptive_storage & operator=(adaptive_storage &&) = default;
  21. -
  22. template<typename RHS> adaptive_storage & operator=(const RHS & rhs);
  23. + explicit adaptive_storage(const RHS & rhs); +
  24. adaptive_storage & operator=(const adaptive_storage &) = default;
  25. +
  26. adaptive_storage & operator=(adaptive_storage &&) = default;
  27. +
  28. template<typename RHS> adaptive_storage & operator=(const RHS & rhs);
-

-adaptive_storage public member functions

+

+adaptive_storage public member functions

    -
  1. std::size_t size() const;
  2. -
  3. void increase(std::size_t i);
  4. -
  5. template<typename T> void add(std::size_t i, const T & value);
  6. +
  7. std::size_t size() const;
  8. +
  9. void increase(std::size_t i);
  10. +
  11. template<typename T> void add(std::size_t i, const T & value);
  12. template<typename T> 
    -  void add(std::size_t i, const T & value, const T & variance);
  13. -
  14. void weighted_increase(std::size_t i, const double weight);
  15. -
  16. value_type value(std::size_t i) const;
  17. -
  18. value_type variance(std::size_t i) const;
  19. -
  20. bool operator==(const adaptive_storage & rhs) const;
  21. -
  22. adaptive_storage & operator+=(const adaptive_storage & rhs);
  23. + void add(std::size_t i, const T & value, const T & variance); +
  24. void weighted_increase(std::size_t i, const double weight);
  25. +
  26. value_type value(std::size_t i) const;
  27. +
  28. value_type variance(std::size_t i) const;
  29. +
  30. bool operator==(const adaptive_storage & rhs) const;
  31. +
  32. adaptive_storage & operator+=(const adaptive_storage & rhs);
  33. template<typename RHS, typename  = detail::is_storage<RHS> > 
    -  adaptive_storage & operator+=(const RHS & rhs);
  34. -
  35. adaptive_storage & operator*=(const value_type x);
  36. + adaptive_storage & operator+=(const RHS & rhs); +
  37. adaptive_storage & operator*=(const value_type x);
-

-adaptive_storage private member functions

-
  1. template<typename Archive> void serialize(Archive &, unsigned);
+

+adaptive_storage private member functions

+
  1. template<typename Archive> void serialize(Archive &, unsigned);
diff --git a/doc/html/boost/histogram/any_axis.html b/doc/html/boost/histogram/any_axis.html index ca10965a..7ec21ae1 100644 --- a/doc/html/boost/histogram/any_axis.html +++ b/doc/html/boost/histogram/any_axis.html @@ -38,67 +38,67 @@ typedef typename make_variant_over< Axes >::type base_type; // construct/copy/destruct - any_axis() = default; - any_axis(const any_axis &) = default; - any_axis(any_axis &&) = default; + any_axis() = default; + any_axis(const any_axis &) = default; + any_axis(any_axis &&) = default; template<typename T, typename = typename std::enable_if< mpl::contains<Axes, T>::value >::type> - any_axis(const T &); - any_axis & operator=(const any_axis &) = default; - any_axis & operator=(any_axis &&) = default; + any_axis(const T &); + any_axis & operator=(const any_axis &) = default; + any_axis & operator=(any_axis &&) = default; template<typename T, typename = typename std::enable_if< mpl::contains<Axes, T>::value >::type> - any_axis & operator=(const T &); + any_axis & operator=(const T &); template<typename T, typename = typename std::enable_if< mpl::contains<Axes, T>::value >::type> - any_axis & operator=(T &&); + any_axis & operator=(T &&); - // public member functions - int size() const; - int shape() const; - bool uoflow() const; - int index(const double) const; - ::boost::string_view label() const; - void label(const ::boost::string_view); - axis::interval< double > operator[](const int) const; - bool operator==(const any_axis &) const; + // public member functions + int size() const; + int shape() const; + bool uoflow() const; + int index(const double) const; + string_view label() const; + void label(const string_view); + axis::interval< double > operator[](const int) const; + bool operator==(const any_axis &) const; };
-

Description

+

Description

-

+

any_axis public construct/copy/destruct

    -
  1. any_axis() = default;
  2. -
  3. any_axis(const any_axis & t) = default;
  4. -
  5. any_axis(any_axis && t) = default;
  6. +
  7. any_axis() = default;
  8. +
  9. any_axis(const any_axis & t) = default;
  10. +
  11. any_axis(any_axis && t) = default;
  12. template<typename T, 
              typename  = typename std::enable_if<    mpl::contains<Axes, T>::value  >::type> 
    -  any_axis(const T & t);
  13. -
  14. any_axis & operator=(const any_axis & t) = default;
  15. -
  16. any_axis & operator=(any_axis && t) = default;
  17. + any_axis(const T & t); +
  18. any_axis & operator=(const any_axis & t) = default;
  19. +
  20. any_axis & operator=(any_axis && t) = default;
  21. template<typename T, 
              typename  = typename std::enable_if<    mpl::contains<Axes, T>::value  >::type> 
    -  any_axis & operator=(const T & t);
  22. + any_axis & operator=(const T & t);
  23. template<typename T, 
              typename  = typename std::enable_if<    mpl::contains<Axes, T>::value  >::type> 
    -  any_axis & operator=(T && t);
  24. + any_axis & operator=(T && t);
-

-any_axis public member functions

+

+any_axis public member functions

    -
  1. int size() const;
  2. -
  3. int shape() const;
  4. -
  5. bool uoflow() const;
  6. -
  7. int index(const double x) const;
  8. -
  9. ::boost::string_view label() const;
  10. -
  11. void label(const ::boost::string_view x);
  12. -
  13. axis::interval< double > operator[](const int i) const;
  14. -
  15. bool operator==(const any_axis & rhs) const;
  16. +
  17. int size() const;
  18. +
  19. int shape() const;
  20. +
  21. bool uoflow() const;
  22. +
  23. int index(const double x) const;
  24. +
  25. string_view label() const;
  26. +
  27. void label(const string_view x);
  28. +
  29. axis::interval< double > operator[](const int i) const;
  30. +
  31. bool operator==(const any_axis & rhs) const;
diff --git a/doc/html/boost/histogram/array_storage.html b/doc/html/boost/histogram/array_storage.html index 2374dcd1..6396aa27 100644 --- a/doc/html/boost/histogram/array_storage.html +++ b/doc/html/boost/histogram/array_storage.html @@ -38,73 +38,73 @@ typedef T value_type; // construct/copy/destruct - explicit array_storage(std::size_t); - array_storage() = default; - array_storage(const array_storage &); - array_storage(array_storage &&); + explicit array_storage(std::size_t); + array_storage() = default; + array_storage(const array_storage &); + array_storage(array_storage &&); template<typename S, typename = detail::is_storage<S> > - explicit array_storage(const S &); - array_storage & operator=(const array_storage &); - array_storage & operator=(array_storage &&); - template<typename S> array_storage & operator=(const S &); + explicit array_storage(const S &); + array_storage & operator=(const array_storage &); + array_storage & operator=(array_storage &&); + template<typename S> array_storage & operator=(const S &); - // public member functions - std::size_t size() const noexcept; - void increase(std::size_t) noexcept; - void add(std::size_t, const value_type &) noexcept; - void add(std::size_t, const value_type &, const value_type &) noexcept; - value_type value(std::size_t) const noexcept; - value_type variance(std::size_t) const noexcept; + // public member functions + std::size_t size() const noexcept; + void increase(std::size_t) noexcept; + void add(std::size_t, const value_type &) noexcept; + void add(std::size_t, const value_type &, const value_type &) noexcept; + value_type value(std::size_t) const noexcept; + value_type variance(std::size_t) const noexcept; template<typename U> - array_storage & operator+=(const array_storage< U > &) noexcept; - array_storage & operator*=(const value_type) noexcept; + array_storage & operator+=(const array_storage< U > &) noexcept; + array_storage & operator*=(const value_type) noexcept; - // private member functions - void reset(std::size_t); - void init(std::size_t); - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + void reset(std::size_t); + void init(std::size_t); + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

-

+

array_storage public construct/copy/destruct

    -
  1. explicit array_storage(std::size_t s);
  2. -
  3. array_storage() = default;
  4. -
  5. array_storage(const array_storage & other);
  6. -
  7. array_storage(array_storage && other);
  8. +
  9. explicit array_storage(std::size_t s);
  10. +
  11. array_storage() = default;
  12. +
  13. array_storage(const array_storage & other);
  14. +
  15. array_storage(array_storage && other);
  16. template<typename S, typename  = detail::is_storage<S> > 
    -  explicit array_storage(const S & other);
  17. -
  18. array_storage & operator=(const array_storage & other);
  19. -
  20. array_storage & operator=(array_storage && other);
  21. -
  22. template<typename S> array_storage & operator=(const S & other);
  23. + explicit array_storage(const S & other); +
  24. array_storage & operator=(const array_storage & other);
  25. +
  26. array_storage & operator=(array_storage && other);
  27. +
  28. template<typename S> array_storage & operator=(const S & other);
-

-array_storage public member functions

+

+array_storage public member functions

    -
  1. std::size_t size() const noexcept;
  2. -
  3. void increase(std::size_t i) noexcept;
  4. -
  5. void add(std::size_t i, const value_type & n) noexcept;
  6. -
  7. void add(std::size_t i, const value_type & n, const value_type &) noexcept;
  8. -
  9. value_type value(std::size_t i) const noexcept;
  10. -
  11. value_type variance(std::size_t i) const noexcept;
  12. +
  13. std::size_t size() const noexcept;
  14. +
  15. void increase(std::size_t i) noexcept;
  16. +
  17. void add(std::size_t i, const value_type & n) noexcept;
  18. +
  19. void add(std::size_t i, const value_type & n, const value_type &) noexcept;
  20. +
  21. value_type value(std::size_t i) const noexcept;
  22. +
  23. value_type variance(std::size_t i) const noexcept;
  24. template<typename U> 
    -  array_storage & operator+=(const array_storage< U > & rhs) noexcept;
  25. -
  26. array_storage & operator*=(const value_type x) noexcept;
  27. + array_storage & operator+=(const array_storage< U > & rhs) noexcept; +
  28. array_storage & operator*=(const value_type x) noexcept;
-

-array_storage private member functions

+

+array_storage private member functions

    -
  1. void reset(std::size_t size);
  2. -
  3. void init(std::size_t size);
  4. -
  5. template<typename Archive> void serialize(Archive &, unsigned);
  6. +
  7. void reset(std::size_t size);
  8. +
  9. void init(std::size_t size);
  10. +
  11. template<typename Archive> void serialize(Archive &, unsigned);
diff --git a/doc/html/boost/histogram/axis/axis_base.html b/doc/html/boost/histogram/axis/axis_base.html index 934702dc..ea6bb88e 100644 --- a/doc/html/boost/histogram/axis/axis_base.html +++ b/doc/html/boost/histogram/axis/axis_base.html @@ -35,67 +35,67 @@ class axis_base { public: // construct/copy/destruct - axis_base(unsigned, string_view); - axis_base() = default; - axis_base(const axis_base &) = default; - axis_base(axis_base &&); - axis_base & operator=(const axis_base &) = default; - axis_base & operator=(axis_base &&); + axis_base(unsigned, string_view); + axis_base() = default; + axis_base(const axis_base &) = default; + axis_base(axis_base &&); + axis_base & operator=(const axis_base &) = default; + axis_base & operator=(axis_base &&); - // public member functions - int size() const noexcept; - int shape() const noexcept; - bool uoflow() const noexcept; - string_view label() const noexcept; - void label(string_view); + // public member functions + int size() const noexcept; + int shape() const noexcept; + bool uoflow() const noexcept; + string_view label() const noexcept; + void label(string_view); - // protected member functions - bool operator==(const axis_base &) const noexcept; + // protected member functions + bool operator==(const axis_base &) const noexcept; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

-

+

axis_base public construct/copy/destruct

    -
  1. axis_base(unsigned n, string_view label);
  2. -
  3. axis_base() = default;
  4. -
  5. axis_base(const axis_base &) = default;
  6. -
  7. axis_base(axis_base && rhs);
  8. -
  9. axis_base & operator=(const axis_base &) = default;
  10. -
  11. axis_base & operator=(axis_base && rhs);
  12. +
  13. axis_base(unsigned n, string_view label);
  14. +
  15. axis_base() = default;
  16. +
  17. axis_base(const axis_base &) = default;
  18. +
  19. axis_base(axis_base && rhs);
  20. +
  21. axis_base & operator=(const axis_base &) = default;
  22. +
  23. axis_base & operator=(axis_base && rhs);
-

-axis_base public member functions

+

+axis_base public member functions

  1. -
    int size() const noexcept;
    Returns the number of bins, excluding overflow/underflow.
  2. +
    int size() const noexcept;
    Returns the number of bins, excluding overflow/underflow.
  3. -
    int shape() const noexcept;
    Returns the number of bins, including overflow/underflow.
  4. +
    int shape() const noexcept;
    Returns the number of bins, including overflow/underflow.
  5. -
    bool uoflow() const noexcept;
    Returns whether axis has extra overflow and underflow bins.
  6. +
    bool uoflow() const noexcept;
    Returns true if axis has extra overflow and underflow bins.
  7. -
    string_view label() const noexcept;
    Returns the axis label, which is a name or description.
  8. +
    string_view label() const noexcept;
    Returns the axis label, which is a name or description.
  9. -
    void label(string_view label);
    Change the label of an axis.
  10. +
    void label(string_view label);
    Change the label of an axis.
-

-axis_base protected member functions

-
  1. bool operator==(const axis_base & rhs) const noexcept;
+

+axis_base protected member functions

+
  1. bool operator==(const axis_base & rhs) const noexcept;
-

-axis_base private member functions

-
  1. template<typename Archive> void serialize(Archive &, unsigned);
+

+axis_base private member functions

+
  1. template<typename Archive> void serialize(Archive &, unsigned);
diff --git a/doc/html/boost/histogram/axis/axis_base_uoflow.html b/doc/html/boost/histogram/axis/axis_base_uoflow.html index 06a067f5..e6ff05be 100644 --- a/doc/html/boost/histogram/axis/axis_base_uoflow.html +++ b/doc/html/boost/histogram/axis/axis_base_uoflow.html @@ -35,58 +35,58 @@ class axis_base_uoflow : public boost::histogram::axis::axis_base { public: // construct/copy/destruct - axis_base_uoflow(unsigned, string_view, enum uoflow); - axis_base_uoflow() = default; - axis_base_uoflow(const axis_base_uoflow &) = default; - axis_base_uoflow(axis_base_uoflow &&); - axis_base_uoflow & operator=(const axis_base_uoflow &) = default; - axis_base_uoflow & operator=(axis_base_uoflow &&); + axis_base_uoflow(unsigned, string_view, enum uoflow); + axis_base_uoflow() = default; + axis_base_uoflow(const axis_base_uoflow &) = default; + axis_base_uoflow(axis_base_uoflow &&); + axis_base_uoflow & operator=(const axis_base_uoflow &) = default; + axis_base_uoflow & operator=(axis_base_uoflow &&); - // public member functions - int shape() const noexcept; - bool uoflow() const noexcept; + // public member functions + int shape() const noexcept; + bool uoflow() const noexcept; - // protected member functions - bool operator==(const axis_base_uoflow &) const noexcept; + // protected member functions + bool operator==(const axis_base_uoflow &) const noexcept; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

-

+

axis_base_uoflow public construct/copy/destruct

    -
  1. axis_base_uoflow(unsigned n, string_view label, enum uoflow uo);
  2. -
  3. axis_base_uoflow() = default;
  4. -
  5. axis_base_uoflow(const axis_base_uoflow &) = default;
  6. -
  7. axis_base_uoflow(axis_base_uoflow && rhs);
  8. -
  9. axis_base_uoflow & operator=(const axis_base_uoflow &) = default;
  10. -
  11. axis_base_uoflow & operator=(axis_base_uoflow && rhs);
  12. +
  13. axis_base_uoflow(unsigned n, string_view label, enum uoflow uo);
  14. +
  15. axis_base_uoflow() = default;
  16. +
  17. axis_base_uoflow(const axis_base_uoflow &) = default;
  18. +
  19. axis_base_uoflow(axis_base_uoflow && rhs);
  20. +
  21. axis_base_uoflow & operator=(const axis_base_uoflow &) = default;
  22. +
  23. axis_base_uoflow & operator=(axis_base_uoflow && rhs);
-

-axis_base_uoflow public member functions

+

+axis_base_uoflow public member functions

  1. -
    int shape() const noexcept;
    Returns the number of bins, including overflow/underflow.
  2. +
    int shape() const noexcept;
    Returns the number of bins, including overflow/underflow.
  3. -
    bool uoflow() const noexcept;
    Returns whether axis has extra overflow and underflow bins.
  4. +
    bool uoflow() const noexcept;
    Returns whether axis has extra overflow and underflow bins.
-

-axis_base_uoflow protected member functions

-
  1. bool operator==(const axis_base_uoflow & rhs) const noexcept;
+

+axis_base_uoflow protected member functions

+
  1. bool operator==(const axis_base_uoflow & rhs) const noexcept;
-

-axis_base_uoflow private member functions

-
  1. template<typename Archive> void serialize(Archive &, unsigned);
+

+axis_base_uoflow private member functions

+
  1. template<typename Archive> void serialize(Archive &, unsigned);
diff --git a/doc/html/boost/histogram/axis/axis_iterator.html b/doc/html/boost/histogram/axis/axis_iterator.html index ccb6be7b..f8c3bb61 100644 --- a/doc/html/boost/histogram/axis/axis_iterator.html +++ b/doc/html/boost/histogram/axis/axis_iterator.html @@ -38,41 +38,41 @@ typedef unspecified value_type; // construct/copy/destruct - explicit axis_iterator(const Axis &, int); - axis_iterator(const axis_iterator &) = default; - axis_iterator & operator=(const axis_iterator &) = default; + explicit axis_iterator(const Axis &, int); + axis_iterator(const axis_iterator &) = default; + axis_iterator & operator=(const axis_iterator &) = default; - // private member functions - void increment() noexcept; - void decrement() noexcept; - void advance(int) noexcept; - int distance_to(const axis_iterator &) const noexcept; - bool equal(const axis_iterator &) const noexcept; - value_type & dereference() const; + // private member functions + void increment() noexcept; + void decrement() noexcept; + void advance(int) noexcept; + int distance_to(const axis_iterator &) const noexcept; + bool equal(const axis_iterator &) const noexcept; + value_type & dereference() const; };
-

Description

+

Description

-

+

axis_iterator public construct/copy/destruct

    -
  1. explicit axis_iterator(const Axis & axis, int idx);
  2. -
  3. axis_iterator(const axis_iterator & o) = default;
  4. -
  5. axis_iterator & operator=(const axis_iterator & o) = default;
  6. +
  7. explicit axis_iterator(const Axis & axis, int idx);
  8. +
  9. axis_iterator(const axis_iterator & o) = default;
  10. +
  11. axis_iterator & operator=(const axis_iterator & o) = default;
-

-axis_iterator private member functions

+

+axis_iterator private member functions

    -
  1. void increment() noexcept;
  2. -
  3. void decrement() noexcept;
  4. -
  5. void advance(int n) noexcept;
  6. -
  7. int distance_to(const axis_iterator & other) const noexcept;
  8. -
  9. bool equal(const axis_iterator & other) const noexcept;
  10. -
  11. value_type & dereference() const;
  12. +
  13. void increment() noexcept;
  14. +
  15. void decrement() noexcept;
  16. +
  17. void advance(int n) noexcept;
  18. +
  19. int distance_to(const axis_iterator & other) const noexcept;
  20. +
  21. bool equal(const axis_iterator & other) const noexcept;
  22. +
  23. value_type & dereference() const;
diff --git a/doc/html/boost/histogram/axis/category.html b/doc/html/boost/histogram/axis/category.html index a1667ae6..efb832b2 100644 --- a/doc/html/boost/histogram/axis/category.html +++ b/doc/html/boost/histogram/axis/category.html @@ -40,38 +40,38 @@ typedef axis_iterator< category< T > > const_iterator; // construct/copy/destruct - category() = default; - category(const category &); - category(category &&) = default; - category(std::initializer_list< T >, string_view = {}); - template<typename Iterator> category(Iterator, Iterator, string_view = {}); - category & operator=(const category &); - category & operator=(category &&) = default; + category() = default; + category(const category &); + category(category &&) = default; + category(std::initializer_list< T >, string_view = {}); + template<typename Iterator> category(Iterator, Iterator, string_view = {}); + category & operator=(const category &); + category & operator=(category &&) = default; - // public member functions - int index(const value_type &) const noexcept; - bin_type operator[](int) const; - bool operator==(const category &) const noexcept; - const_iterator begin() const; - const_iterator end() const; + // public member functions + int index(const value_type &) const noexcept; + bin_type operator[](int) const; + bool operator==(const category &) const noexcept; + const_iterator begin() const; + const_iterator end() const; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

The axis maps a set of values to bins, following the order of arguments in the constructor. There is an optional overflow bin for this axis, which counts values that are not part of the set. Binning is a O(1) operation. The value type must be hashable.

-

+

category public construct/copy/destruct

    -
  1. category() = default;
  2. -
  3. category(const category & rhs);
  4. -
  5. category(category && rhs) = default;
  6. +
  7. category() = default;
  8. +
  9. category(const category & rhs);
  10. +
  11. category(category && rhs) = default;
  12. -
    category(std::initializer_list< T > seq, string_view label = {});
    Construct from an initializer list of strings.

    +

    category(std::initializer_list< T > seq, string_view label = {});
    Construct from an initializer list of strings.

    @@ -94,29 +94,29 @@
  13. template<typename Iterator> 
    -  category(Iterator begin, Iterator end, string_view label = {});
  14. -
  15. category & operator=(const category & rhs);
  16. -
  17. category & operator=(category && rhs) = default;
  18. + category(Iterator begin, Iterator end, string_view label = {}); +
  19. category & operator=(const category & rhs);
  20. +
  21. category & operator=(category && rhs) = default;
-

-category public member functions

+

+category public member functions

  1. -
    int index(const value_type & x) const noexcept;
    Returns the bin index for the passed argument.

    Performs a range check.

    +
    int index(const value_type & x) const noexcept;
    Returns the bin index for the passed argument.

    Performs a range check.

  2. -
    bin_type operator[](int idx) const;
    Returns the value for the bin index.
  3. -
  4. bool operator==(const category & o) const noexcept;
  5. -
  6. const_iterator begin() const;
  7. -
  8. const_iterator end() const;
  9. +
    bin_type operator[](int idx) const;
    Returns the value for the bin index. +
  10. bool operator==(const category & o) const noexcept;
  11. +
  12. const_iterator begin() const;
  13. +
  14. const_iterator end() const;
-

-category private member functions

-
  1. template<typename Archive> void serialize(Archive &, unsigned);
+

+category private member functions

+
  1. template<typename Archive> void serialize(Archive &, unsigned);
diff --git a/doc/html/boost/histogram/axis/circular.html b/doc/html/boost/histogram/axis/circular.html index 900f872f..c2c35e1d 100644 --- a/doc/html/boost/histogram/axis/circular.html +++ b/doc/html/boost/histogram/axis/circular.html @@ -40,38 +40,38 @@ typedef axis_iterator< circular > const_iterator; // construct/copy/destruct - explicit circular(unsigned, value_type = 0.0, + explicit circular(unsigned, value_type = 0.0, value_type = math::double_constants::two_pi, string_view = {}); - circular() = default; - circular(const circular &) = default; - circular(circular &&) = default; - circular & operator=(const circular &) = default; - circular & operator=(circular &&) = default; + circular() = default; + circular(const circular &) = default; + circular(circular &&) = default; + circular & operator=(const circular &) = default; + circular & operator=(circular &&) = default; - // public member functions - int index(value_type) const noexcept; - bin_type operator[](int) const; - bool operator==(const circular &) const noexcept; - value_type perimeter() const; - value_type phase() const; - const_iterator begin() const; - const_iterator end() const; + // public member functions + int index(value_type) const noexcept; + bin_type operator[](int) const; + bool operator==(const circular &) const noexcept; + value_type perimeter() const; + value_type phase() const; + const_iterator begin() const; + const_iterator end() const; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
-

Description

+

Description

The axis is circular and wraps around reaching the perimeter value. Therefore, there are no overflow/underflow bins for this axis. Binning is a O(1) operation.

-

+

circular public construct/copy/destruct

  1. -
    explicit circular(unsigned n, value_type phase = 0.0, 
    +
    explicit circular(unsigned n, value_type phase = 0.0, 
                       value_type perimeter = math::double_constants::two_pi, 
                       string_view label = {});
    Constructor for n bins with an optional offset.

    @@ -109,32 +109,32 @@
-
  • circular() = default;
  • -
  • circular(const circular &) = default;
  • -
  • circular(circular &&) = default;
  • -
  • circular & operator=(const circular &) = default;
  • -
  • circular & operator=(circular &&) = default;
  • +
  • circular() = default;
  • +
  • circular(const circular &) = default;
  • +
  • circular(circular &&) = default;
  • +
  • circular & operator=(const circular &) = default;
  • +
  • circular & operator=(circular &&) = default;
  • -

    -circular public member functions

    +

    +circular public member functions

    1. -
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    2. +
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    3. -
      bin_type operator[](int idx) const;
      Returns the starting edge of the bin.
    4. -
    5. bool operator==(const circular & o) const noexcept;
    6. -
    7. value_type perimeter() const;
    8. -
    9. value_type phase() const;
    10. -
    11. const_iterator begin() const;
    12. -
    13. const_iterator end() const;
    14. +
      bin_type operator[](int idx) const;
      Returns the starting edge of the bin. +
    15. bool operator==(const circular & o) const noexcept;
    16. +
    17. value_type perimeter() const;
    18. +
    19. value_type phase() const;
    20. +
    21. const_iterator begin() const;
    22. +
    23. const_iterator end() const;
    -

    -circular private member functions

    -
    1. template<typename Archive> void serialize(Archive &, unsigned);
    +

    +circular private member functions

    +
    1. template<typename Archive> void serialize(Archive &, unsigned);
    diff --git a/doc/html/boost/histogram/axis/integer.html b/doc/html/boost/histogram/axis/integer.html index f3f06c0b..a58e9749 100644 --- a/doc/html/boost/histogram/axis/integer.html +++ b/doc/html/boost/histogram/axis/integer.html @@ -40,35 +40,35 @@ typedef axis_iterator< integer > const_iterator; // construct/copy/destruct - integer(value_type, value_type, string_view = {}, + integer(value_type, value_type, string_view = {}, enum uoflow = ::boost::histogram::axis::uoflow::on); - integer() = default; - integer(const integer &) = default; - integer(integer &&) = default; - integer & operator=(const integer &) = default; - integer & operator=(integer &&) = default; + integer() = default; + integer(const integer &) = default; + integer(integer &&) = default; + integer & operator=(const integer &) = default; + integer & operator=(integer &&) = default; - // public member functions - int index(value_type) const noexcept; - bin_type operator[](int) const; - bool operator==(const integer &) const noexcept; - const_iterator begin() const; - const_iterator end() const; + // public member functions + int index(value_type) const noexcept; + bin_type operator[](int) const; + bool operator==(const integer &) const noexcept; + const_iterator begin() const; + const_iterator end() const; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
    -

    Description

    +

    Description

    Binning is a O(1) operation. This axis operates faster than a regular.

    -

    +

    integer public construct/copy/destruct

    1. -
      integer(value_type lower, value_type upper, string_view label = {}, 
      +
      integer(value_type lower, value_type upper, string_view label = {}, 
               enum uoflow uo = ::boost::histogram::axis::uoflow::on);
      Construct axis over a semi-open integer interval [lower, upper).

      @@ -101,30 +101,30 @@
    2. -
    3. integer() = default;
    4. -
    5. integer(const integer &) = default;
    6. -
    7. integer(integer &&) = default;
    8. -
    9. integer & operator=(const integer &) = default;
    10. -
    11. integer & operator=(integer &&) = default;
    12. +
    13. integer() = default;
    14. +
    15. integer(const integer &) = default;
    16. +
    17. integer(integer &&) = default;
    18. +
    19. integer & operator=(const integer &) = default;
    20. +
    21. integer & operator=(integer &&) = default;
    -

    -integer public member functions

    +

    +integer public member functions

    1. -
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    2. +
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    3. -
      bin_type operator[](int idx) const;
      Returns the integer that is mapped to the bin index.
    4. -
    5. bool operator==(const integer & o) const noexcept;
    6. -
    7. const_iterator begin() const;
    8. -
    9. const_iterator end() const;
    10. +
      bin_type operator[](int idx) const;
      Returns the integer that is mapped to the bin index. +
    11. bool operator==(const integer & o) const noexcept;
    12. +
    13. const_iterator begin() const;
    14. +
    15. const_iterator end() const;
    -

    -integer private member functions

    -
    1. template<typename Archive> void serialize(Archive &, unsigned);
    +

    +integer private member functions

    +
    1. template<typename Archive> void serialize(Archive &, unsigned);
    diff --git a/doc/html/boost/histogram/axis/interval.html b/doc/html/boost/histogram/axis/interval.html index 3c30d550..ba10aae3 100644 --- a/doc/html/boost/histogram/axis/interval.html +++ b/doc/html/boost/histogram/axis/interval.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    @@ -35,47 +35,47 @@ class interval { public: // construct/copy/destruct - interval() = default; - interval(const interval &) = default; - interval(interval &&) = default; - interval(const T &, const T &); - interval(T &&, T &&); - template<typename U> interval(const interval< U > &); - interval & operator=(const interval &) = default; - interval & operator=(interval &&) = default; + interval() = default; + interval(const interval &) = default; + interval(interval &&) = default; + interval(const T &, const T &); + interval(T &&, T &&); + template<typename U> interval(const interval< U > &); + interval & operator=(const interval &) = default; + interval & operator=(interval &&) = default; - // public member functions - const T & lower() const noexcept; - const T & upper() const noexcept; - bool operator==(const interval &) const noexcept; - bool operator!=(const interval &) const noexcept; + // public member functions + const T & lower() const noexcept; + const T & upper() const noexcept; + bool operator==(const interval &) const noexcept; + bool operator!=(const interval &) const noexcept; };
    -

    Description

    +

    Description

    -

    +

    interval public construct/copy/destruct

      -
    1. interval() = default;
    2. -
    3. interval(const interval &) = default;
    4. -
    5. interval(interval &&) = default;
    6. -
    7. interval(const T & x, const T & y);
    8. -
    9. interval(T && x, T && y);
    10. -
    11. template<typename U> interval(const interval< U > & i);
    12. -
    13. interval & operator=(const interval &) = default;
    14. -
    15. interval & operator=(interval &&) = default;
    16. +
    17. interval() = default;
    18. +
    19. interval(const interval &) = default;
    20. +
    21. interval(interval &&) = default;
    22. +
    23. interval(const T & x, const T & y);
    24. +
    25. interval(T && x, T && y);
    26. +
    27. template<typename U> interval(const interval< U > & i);
    28. +
    29. interval & operator=(const interval &) = default;
    30. +
    31. interval & operator=(interval &&) = default;
    -

    -interval public member functions

    +

    +interval public member functions

      -
    1. const T & lower() const noexcept;
    2. -
    3. const T & upper() const noexcept;
    4. -
    5. bool operator==(const interval & i) const noexcept;
    6. -
    7. bool operator!=(const interval & i) const noexcept;
    8. +
    9. const T & lower() const noexcept;
    10. +
    11. const T & upper() const noexcept;
    12. +
    13. bool operator==(const interval & i) const noexcept;
    14. +
    15. bool operator!=(const interval & i) const noexcept;
    @@ -90,7 +90,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost/histogram/axis/regular.html b/doc/html/boost/histogram/axis/regular.html index c52ad54d..ffac3e39 100644 --- a/doc/html/boost/histogram/axis/regular.html +++ b/doc/html/boost/histogram/axis/regular.html @@ -42,37 +42,37 @@ typedef axis_iterator< regular > const_iterator; // construct/copy/destruct - regular(unsigned, value_type, value_type, string_view = {}, + regular(unsigned, value_type, value_type, string_view = {}, enum uoflow = ::boost::histogram::axis::uoflow::on, Transform = Transform()); - regular() = default; - regular(const regular &) = default; - regular(regular &&) = default; - regular & operator=(const regular &) = default; - regular & operator=(regular &&) = default; + regular() = default; + regular(const regular &) = default; + regular(regular &&) = default; + regular & operator=(const regular &) = default; + regular & operator=(regular &&) = default; - // public member functions - int index(value_type) const noexcept; - bin_type operator[](int) const noexcept; - bool operator==(const regular &) const noexcept; - const_iterator begin() const; - const_iterator end() const; - const Transform & transform() const noexcept; + // public member functions + int index(value_type) const noexcept; + bin_type operator[](int) const noexcept; + bool operator==(const regular &) const noexcept; + const_iterator begin() const; + const_iterator end() const; + const Transform & transform() const noexcept; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
    -

    Description

    +

    Description

    The most common binning strategy. Very fast. Binning is a O(1) operation.

    -

    +

    regular public construct/copy/destruct

    1. -
      regular(unsigned n, value_type lower, value_type upper, 
      +
      regular(unsigned n, value_type lower, value_type upper, 
               string_view label = {}, 
               enum uoflow uo = ::boost::histogram::axis::uoflow::on, 
               Transform trans = Transform());
      Construct axis with n bins over real range [lower, upper).

      @@ -115,31 +115,31 @@

    -
  • regular() = default;
  • -
  • regular(const regular &) = default;
  • -
  • regular(regular &&) = default;
  • -
  • regular & operator=(const regular &) = default;
  • -
  • regular & operator=(regular &&) = default;
  • +
  • regular() = default;
  • +
  • regular(const regular &) = default;
  • +
  • regular(regular &&) = default;
  • +
  • regular & operator=(const regular &) = default;
  • +
  • regular & operator=(regular &&) = default;
  • -

    -regular public member functions

    +

    +regular public member functions

    1. -
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    2. +
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    3. -
      bin_type operator[](int idx) const noexcept;
      Returns the starting edge of the bin.
    4. -
    5. bool operator==(const regular & o) const noexcept;
    6. -
    7. const_iterator begin() const;
    8. -
    9. const_iterator end() const;
    10. -
    11. const Transform & transform() const noexcept;
    12. +
      bin_type operator[](int idx) const noexcept;
      Returns the starting edge of the bin. +
    13. bool operator==(const regular & o) const noexcept;
    14. +
    15. const_iterator begin() const;
    16. +
    17. const_iterator end() const;
    18. +
    19. const Transform & transform() const noexcept;
    -

    -regular private member functions

    -
    1. template<typename Archive> void serialize(Archive &, unsigned);
    +

    +regular private member functions

    +
    1. template<typename Archive> void serialize(Archive &, unsigned);
    diff --git a/doc/html/boost/histogram/axis/transform/cos.html b/doc/html/boost/histogram/axis/transform/cos.html index 73530fec..d8fc2c5e 100644 --- a/doc/html/boost/histogram/axis/transform/cos.html +++ b/doc/html/boost/histogram/axis/transform/cos.html @@ -34,18 +34,18 @@ struct cos { - // public static functions - template<typename T> static T forward(T); - template<typename T> static T inverse(T); + // public static functions + template<typename T> static T forward(T); + template<typename T> static T inverse(T); };
    -

    Description

    +

    Description

    -

    -cos public static functions

    +

    +cos public static functions

      -
    1. template<typename T> static T forward(T v);
    2. -
    3. template<typename T> static T inverse(T v);
    4. +
    5. template<typename T> static T forward(T v);
    6. +
    7. template<typename T> static T inverse(T v);
    diff --git a/doc/html/boost/histogram/axis/transform/identity.html b/doc/html/boost/histogram/axis/transform/identity.html index e42770eb..ba801097 100644 --- a/doc/html/boost/histogram/axis/transform/identity.html +++ b/doc/html/boost/histogram/axis/transform/identity.html @@ -34,18 +34,18 @@ struct identity { - // public static functions - template<typename T> static T forward(T); - template<typename T> static T inverse(T); + // public static functions + template<typename T> static T forward(T); + template<typename T> static T inverse(T); };
    -

    Description

    +

    Description

    -

    -identity public static functions

    +

    +identity public static functions

      -
    1. template<typename T> static T forward(T v);
    2. -
    3. template<typename T> static T inverse(T v);
    4. +
    5. template<typename T> static T forward(T v);
    6. +
    7. template<typename T> static T inverse(T v);
    diff --git a/doc/html/boost/histogram/axis/transform/log.html b/doc/html/boost/histogram/axis/transform/log.html index ee65f6c1..5e4d40f4 100644 --- a/doc/html/boost/histogram/axis/transform/log.html +++ b/doc/html/boost/histogram/axis/transform/log.html @@ -34,18 +34,18 @@ struct log { - // public static functions - template<typename T> static T forward(T); - template<typename T> static T inverse(T); + // public static functions + template<typename T> static T forward(T); + template<typename T> static T inverse(T); };
    -

    Description

    +

    Description

    -

    -log public static functions

    +

    +log public static functions

      -
    1. template<typename T> static T forward(T v);
    2. -
    3. template<typename T> static T inverse(T v);
    4. +
    5. template<typename T> static T forward(T v);
    6. +
    7. template<typename T> static T inverse(T v);
    diff --git a/doc/html/boost/histogram/axis/transform/pow.html b/doc/html/boost/histogram/axis/transform/pow.html index 6b92823e..31da1d7e 100644 --- a/doc/html/boost/histogram/axis/transform/pow.html +++ b/doc/html/boost/histogram/axis/transform/pow.html @@ -34,38 +34,38 @@ struct pow { // construct/copy/destruct - pow() = default; - pow(double); + pow() = default; + pow(double); - // public member functions - template<typename T> T forward(T) const; - template<typename T> T inverse(T) const; - bool operator==(const pow &) const noexcept; - template<typename Archive> void serialize(Archive &, unsigned); + // public member functions + template<typename T> T forward(T) const; + template<typename T> T inverse(T) const; + bool operator==(const pow &) const noexcept; + template<typename Archive> void serialize(Archive &, unsigned); // public data members double value; };
    -

    Description

    +

    Description

    -

    +

    pow public construct/copy/destruct

      -
    1. pow() = default;
    2. -
    3. pow(double exponent);
    4. +
    5. pow() = default;
    6. +
    7. pow(double exponent);
    -

    -pow public member functions

    +

    +pow public member functions

      -
    1. template<typename T> T forward(T v) const;
    2. -
    3. template<typename T> T inverse(T v) const;
    4. -
    5. bool operator==(const pow & other) const noexcept;
    6. -
    7. template<typename Archive> void serialize(Archive &, unsigned);
    8. +
    9. template<typename T> T forward(T v) const;
    10. +
    11. template<typename T> T inverse(T v) const;
    12. +
    13. bool operator==(const pow & other) const noexcept;
    14. +
    15. template<typename Archive> void serialize(Archive &, unsigned);
    diff --git a/doc/html/boost/histogram/axis/transform/sqrt.html b/doc/html/boost/histogram/axis/transform/sqrt.html index 506d372b..8505084e 100644 --- a/doc/html/boost/histogram/axis/transform/sqrt.html +++ b/doc/html/boost/histogram/axis/transform/sqrt.html @@ -34,18 +34,18 @@ struct sqrt { - // public static functions - template<typename T> static T forward(T); - template<typename T> static T inverse(T); + // public static functions + template<typename T> static T forward(T); + template<typename T> static T inverse(T); };
    -

    Description

    +

    Description

    -

    -sqrt public static functions

    +

    +sqrt public static functions

      -
    1. template<typename T> static T forward(T v);
    2. -
    3. template<typename T> static T inverse(T v);
    4. +
    5. template<typename T> static T forward(T v);
    6. +
    7. template<typename T> static T inverse(T v);
    diff --git a/doc/html/boost/histogram/axis/variable.html b/doc/html/boost/histogram/axis/variable.html index faf2c686..dbe6a480 100644 --- a/doc/html/boost/histogram/axis/variable.html +++ b/doc/html/boost/histogram/axis/variable.html @@ -40,38 +40,38 @@ typedef axis_iterator< variable > const_iterator; // construct/copy/destruct - variable(std::initializer_list< value_type >, string_view = {}, + variable(std::initializer_list< value_type >, string_view = {}, enum uoflow = ::boost::histogram::axis::uoflow::on); template<typename Iterator> - variable(Iterator, Iterator, string_view = {}, + variable(Iterator, Iterator, string_view = {}, enum uoflow = ::boost::histogram::axis::uoflow::on); - variable() = default; - variable(const variable &); - variable(variable &&) = default; - variable & operator=(const variable &); - variable & operator=(variable &&) = default; + variable() = default; + variable(const variable &); + variable(variable &&) = default; + variable & operator=(const variable &); + variable & operator=(variable &&) = default; - // public member functions - int index(value_type) const noexcept; - bin_type operator[](int) const; - bool operator==(const variable &) const noexcept; - const_iterator begin() const; - const_iterator end() const; + // public member functions + int index(value_type) const noexcept; + bin_type operator[](int) const; + bool operator==(const variable &) const noexcept; + const_iterator begin() const; + const_iterator end() const; - // private member functions - template<typename Archive> void serialize(Archive &, unsigned); + // private member functions + template<typename Archive> void serialize(Archive &, unsigned); };
    -

    Description

    +

    Description

    Binning is a O(log(N)) operation. If speed matters and the problem domain allows it, prefer a regular axis, possibly with a transform.

    -

    +

    variable public construct/copy/destruct

    1. -
      variable(std::initializer_list< value_type > x, string_view label = {}, 
      +
      variable(std::initializer_list< value_type > x, string_view label = {}, 
                enum uoflow uo = ::boost::histogram::axis::uoflow::on);
      Construct an axis from bin edges.

      @@ -101,32 +101,32 @@
    2. template<typename Iterator> 
      -  variable(Iterator begin, Iterator end, string_view label = {}, 
      +  variable(Iterator begin, Iterator end, string_view label = {}, 
                  enum uoflow uo = ::boost::histogram::axis::uoflow::on);
    3. -
    4. variable() = default;
    5. -
    6. variable(const variable & o);
    7. -
    8. variable(variable &&) = default;
    9. -
    10. variable & operator=(const variable & o);
    11. -
    12. variable & operator=(variable &&) = default;
    13. +
    14. variable() = default;
    15. +
    16. variable(const variable & o);
    17. +
    18. variable(variable &&) = default;
    19. +
    20. variable & operator=(const variable & o);
    21. +
    22. variable & operator=(variable &&) = default;
    -

    -variable public member functions

    +

    +variable public member functions

    1. -
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    2. +
      int index(value_type x) const noexcept;
      Returns the bin index for the passed argument.
    3. -
      bin_type operator[](int idx) const;
      Returns the starting edge of the bin.
    4. -
    5. bool operator==(const variable & o) const noexcept;
    6. -
    7. const_iterator begin() const;
    8. -
    9. const_iterator end() const;
    10. +
      bin_type operator[](int idx) const;
      Returns the starting edge of the bin. +
    11. bool operator==(const variable & o) const noexcept;
    12. +
    13. const_iterator begin() const;
    14. +
    15. const_iterator end() const;
    -

    -variable private member functions

    -
    1. template<typename Archive> void serialize(Archive &, unsigned);
    +

    +variable private member functions

    +
    1. template<typename Archive> void serialize(Archive &, unsigned);
    diff --git a/doc/html/boost/histogram/count.html b/doc/html/boost/histogram/count.html index 099337b5..07181146 100644 --- a/doc/html/boost/histogram/count.html +++ b/doc/html/boost/histogram/count.html @@ -34,19 +34,19 @@ struct count { // construct/copy/destruct - count(unsigned); + count(unsigned); // public data members unsigned value; };
    -

    Description

    +

    Description

    -

    +

    count public construct/copy/destruct

    -
    1. count(unsigned n);
    +
    1. count(unsigned n);
    diff --git a/doc/html/boost/histogram/weight.html b/doc/html/boost/histogram/weight.html index ebb5ae17..9cc39591 100644 --- a/doc/html/boost/histogram/weight.html +++ b/doc/html/boost/histogram/weight.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -34,19 +34,19 @@ struct weight { // construct/copy/destruct - weight(double); + weight(double); // public data members double value; };
    -

    Description

    +

    Description

    -

    +

    weight public construct/copy/destruct

    -
    1. weight(double w);
    +
    1. weight(double w);
    @@ -60,7 +60,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/histogram/getting_started.html b/doc/html/histogram/getting_started.html index 5d5c1d44..61e28cd2 100644 --- a/doc/html/histogram/getting_started.html +++ b/doc/html/histogram/getting_started.html @@ -42,16 +42,16 @@
    #include <boost/histogram.hpp>
     #include <iostream>
    -#include <cmath>
     
     int main(int, char**) {
         namespace bh = boost::histogram;
    +    using namespace bh::literals; // enables _c suffix
     
         // create 1d-histogram with 10 equidistant bins from -1.0 to 2.0,
         // with axis of histogram labeled as "x"
    -    auto h = bh::make_static_histogram(bh::axis::regular(10, -1.0, 2.0, "x"));
    +    auto h = bh::make_static_histogram(bh::axis::regular<>(10, -1.0, 2.0, "x"));
     
    -    // fill histogram with data, you typically do this in a handcrafted loop
    +    // fill histogram with data
         h.fill(-1.5); // put in underflow bin
         h.fill(-1.0); // included in first bin, bin interval is semi-open
         h.fill(-0.5);
    @@ -60,30 +60,52 @@
         h.fill(1.7);
         h.fill(2.0);  // put in overflow bin, bin interval is semi-open
         h.fill(20.0); // put in overflow bin
    -    h.fill(0.1, bh::weight(5.0)); // fill with a weighted entry, weight is 5
     
    -    // iterate over bins, loop includes under- and overflow bin
    -    for (const auto& bin : h.axis<0>()) {
    -        std::cout << "bin " << bin.idx
    -                  << " x in [" << bin.left << ", " << bin.right << "): "
    -                  << h.value(bin.idx) << " +/- " << std::sqrt(h.variance(bin.idx))
    +    /*
    +        instead of calling h.fill(...) with same argument N times,
    +        use bh::count, which accepts an integer argument N
    +    */
    +    h.fill(1.0, bh::count(4));
    +
    +    /*
    +        to fill a weighted entry, use bh::weight, which accepts a double
    +        argument; don't confuse with bh::count, it has a different effect
    +        on the variance (see Rationale for a section explaining weighted fills)
    +    */
    +    h.fill(0.1, bh::weight(2.5));
    +
    +    /*
    +        iterate over bins, loop excludes under- and overflow bins
    +        - index 0_c is a compile-time number to make axis(...) return
    +          a different type for each axis
    +        - for-loop yields std::pair<[bin index], [bin type]>, where
    +          [bin type] usually is a semi-open interval representing the bin,
    +          whose edges can be accessed with methods lower() and upper(), but
    +          the [bin type] depends on the axis and could be something else
    +        - value(index) method returns the bin count at index,
    +        - variance(index) method returns a variance estimate of the bin count
    +          at index (see Rationale for a section explaining the variance)
    +    */
    +    for (const auto& bin : h.axis(0_c)) {
    +        std::cout << "bin " << bin.first
    +                  << " x in [" << bin.second.lower() << ", " << bin.second.upper() << "): "
    +                  << h.value(bin.first) << " +/- " << std::sqrt(h.variance(bin.first))
                       << std::endl;
         }
     
         /* program output:
     
    -    bin -1 x in [-inf, -1): 1 +/- 1
         bin 0 x in [-1, -0.7): 1 +/- 1
         bin 1 x in [-0.7, -0.4): 1 +/- 1
         bin 2 x in [-0.4, -0.1): 0 +/- 0
    -    bin 3 x in [-0.1, 0.2): 5 +/- 5
    +    bin 3 x in [-0.1, 0.2): 2.5 +/- 2.5
         bin 4 x in [0.2, 0.5): 1 +/- 1
         bin 5 x in [0.5, 0.8): 0 +/- 0
    -    bin 6 x in [0.8, 1.1): 0 +/- 0
    +    bin 6 x in [0.8, 1.1): 4 +/- 2
         bin 7 x in [1.1, 1.4): 1 +/- 1
         bin 8 x in [1.4, 1.7): 0 +/- 0
         bin 9 x in [1.7, 2): 1 +/- 1
    -    bin 10 x in [2, inf): 2 +/- 1.41421
    +
         */
     }
     
    @@ -93,45 +115,46 @@ Make and use a 2d-histogram in Python -
    import histogram as bh
    +

    + You need to build the library with Numpy support to run this example. +

    +
    import histogram as hg
     import numpy as np
     
    -# create 2d-histogram over polar coordinates, with
    -# 10 equidistant bins in radius from 0 to 5 and
    -# 4 equidistant bins in polar angle
    -h = bh.histogram(bh.regular_axis(10, 0.0, 5.0, "radius",
    -                                 uoflow=False),
    -                 bh.circular_axis(4, 0.0, 2*np.pi, "phi"))
    +# create 2d-histogram with two axes with 10 equidistant bins from -3 to 3
    +h = hg.histogram(hg.axis.regular(10, -3, 3, "x"),
    +                 hg.axis.regular(10, -3, 3, "y"))
     
     # generate some numpy arrays with data to fill into histogram,
    -# in this case normal distributed random numbers in x and y,
    -# converted into polar coordinates
    -x = np.random.randn(1000)             # generate x
    -y = np.random.randn(1000)             # generate y
    -rphi = np.empty((1000, 2))
    -rphi[:, 0] = (x ** 2 + y ** 2) ** 0.5 # compute radius
    -rphi[:, 1] = np.arctan2(y, x)         # compute phi
    +# in this case normal distributed random numbers in x and y
    +x = np.random.randn(1000)
    +y = 0.5 * np.random.randn(1000)
     
    -# fill histogram with numpy array
    -h.fill(rphi)
    +# fill histogram with numpy arrays, this is very fast
    +h.fill(x, y)
     
    -# access histogram counts (no copy)
    +# get representations of the bin edges as Numpy arrays, this representation
    +# differs from `list(h.axis(0))`, because it is optimised for compatibility
    +# with existing Numpy code, i.e. to replace numpy.histogram
    +x = np.array(h.axis(0))
    +y = np.array(h.axis(1))
    +
    +# creates a view of the counts (no copy involved)
     count_matrix = np.asarray(h)
     
    -print count_matrix
    +# cut off the under- and overflow bins (no copy involved)
    +reduced_count_matrix = count_matrix[:-2,:-2]
     
    -# program output:
    -#
    -# [[37 26 33 37]
    -#  [60 69 76 62]
    -#  [48 80 80 77]
    -#  [38 49 45 49]
    -#  [22 24 20 23]
    -#  [ 7  9  9  8]
    -#  [ 3  2  3  3]
    -#  [ 0  0  0  0]
    -#  [ 0  1  0  0]
    -#  [ 0  0  0  0]]
    +try:
    +    # draw the count matrix
    +    import matplotlib.pyplot as plt
    +    plt.pcolor(x, y, reduced_count_matrix.T)
    +    plt.xlabel(h.axis(0).label)
    +    plt.ylabel(h.axis(1).label)
    +    plt.savefig("example_2d_python.png")
    +except ImportError:
    +    # ok, no matplotlib, then just print it
    +    print count_matrix
     
    diff --git a/doc/html/histogram/reference.html b/doc/html/histogram/reference.html index 17560329..b1da5d51 100644 --- a/doc/html/histogram/reference.html +++ b/doc/html/histogram/reference.html @@ -56,21 +56,21 @@ namespace histogram { template<typename Axes> class any_axis; template<typename T, typename Axes> - std::add_lvalue_reference< T >::type axis_cast(any_axis< Axes > & any); + std::add_lvalue_reference< T >::type axis_cast(any_axis< Axes > & any); template<typename T, typename Axes> const std::add_lvalue_reference< T >::type - axis_cast(const any_axis< Axes > & any); + axis_cast(const any_axis< Axes > & any); template<typename T, typename Axes> - std::add_pointer< T >::type axis_cast(any_axis< Axes > * any); + std::add_pointer< T >::type axis_cast(any_axis< Axes > * any); template<typename T, typename Axes> const std::add_pointer< T >::type - axis_cast(const any_axis< Axes > * any); - template<typename T> std::add_lvalue_reference< T >::type axis_cast(T & t); + axis_cast(const any_axis< Axes > * any); + template<typename T> std::add_lvalue_reference< T >::type axis_cast(T & t); template<typename T> - const std::add_lvalue_reference< T >::type axis_cast(const T & t); - template<typename T> std::add_pointer< T >::type axis_cast(T * t); + const std::add_lvalue_reference< T >::type axis_cast(const T & t); + template<typename T> std::add_pointer< T >::type axis_cast(T * t); template<typename T> - const std::add_pointer< T >::type axis_cast(const T * t); + const std::add_pointer< T >::type axis_cast(const T * t); } }
    @@ -114,26 +114,26 @@ namespace axis { template<typename RealType, typename Transform> std::ostream & - operator<<(std::ostream & os, + operator<<(std::ostream & os, const regular< RealType, Transform > & a); template<typename RealType> std::ostream & - operator<<(std::ostream & os, + operator<<(std::ostream & os, const regular< RealType, axis::transform::pow > & a); template<typename RealType> std::ostream & - operator<<(std::ostream & os, const circular< RealType > & a); + operator<<(std::ostream & os, const circular< RealType > & a); template<typename RealType> std::ostream & - operator<<(std::ostream & os, const variable< RealType > & a); + operator<<(std::ostream & os, const variable< RealType > & a); template<typename IntType> std::ostream & - operator<<(std::ostream & os, const integer< IntType > & a); + operator<<(std::ostream & os, const integer< IntType > & a); template<typename T> - std::ostream & operator<<(std::ostream & os, const category< T > & a); + std::ostream & operator<<(std::ostream & os, const category< T > & a); template<> std::ostream & - operator<<(std::ostream & os, const category< std::string > & a); + operator<<(std::ostream & os, const category< std::string > & a); } } } @@ -145,32 +145,32 @@ namespace histogram { template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > && - operator+(histogram< Variant, Axes, Storage > && a, + operator+(histogram< Variant, Axes, Storage > && a, const histogram< Variant, Axes, Storage > & b); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > && - operator+(histogram< Variant, Axes, Storage > && a, + operator+(histogram< Variant, Axes, Storage > && a, histogram< Variant, Axes, Storage > && b); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > && - operator+(const histogram< Variant, Axes, Storage > & a, + operator+(const histogram< Variant, Axes, Storage > & a, histogram< Variant, Axes, Storage > && b); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > - operator+(const histogram< Variant, Axes, Storage > & a, + operator+(const histogram< Variant, Axes, Storage > & a, const histogram< Variant, Axes, Storage > & b); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > && - operator*(histogram< Variant, Axes, Storage > && a, const double x); + operator*(histogram< Variant, Axes, Storage > && a, const double x); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > && - operator*(const double x, histogram< Variant, Axes, Storage > && b); + operator*(const double x, histogram< Variant, Axes, Storage > && b); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > - operator*(const histogram< Variant, Axes, Storage > & a, const double x); + operator*(const histogram< Variant, Axes, Storage > & a, const double x); template<typename Variant, typename Axes, typename Storage> histogram< Variant, Axes, Storage > - operator*(const double x, const histogram< Variant, Axes, Storage > & b); + operator*(const double x, const histogram< Variant, Axes, Storage > & b); } } @@ -189,10 +189,10 @@ typedef std::integral_constant< int, 0 > Static; typedef std::integral_constant< int, 1 > Dynamic; - template<int N, typename... Rest> auto keep(mpl::int_< N >, Rest...); + template<int N, typename... Rest> auto keep(mpl::int_< N >, Rest...); template<typename Iterator, typename = detail::is_iterator<Iterator> > - unspecified keep(Iterator begin, Iterator end); - template<typename... Rest> unspecified keep(unsigned i, Rest... rest); + unspecified keep(Iterator begin, Iterator end); + template<typename... Rest> unspecified keep(unsigned i, Rest... rest); } } @@ -202,11 +202,11 @@
    namespace boost {
       namespace histogram {
         template<typename Axes, typename Storage> 
    -      class histogram<Dynamic, Axes, Storage>;
    +      class histogram<Dynamic, Axes, Storage>;
         template<typename... Axes> 
           unspecified make_dynamic_histogram(Axes &&... axes);
         template<typename Storage, typename... Axes> 
    -      unspecified make_dynamic_histogram_with(Axes &&... axes);
    +      unspecified make_dynamic_histogram_with(Axes &&... axes);
       }
       namespace python {
       }
    @@ -220,7 +220,7 @@
     
    namespace boost {
       namespace histogram {
         template<typename Axes, typename Storage> 
    -      class histogram<Static, Axes, Storage>;
    +      class histogram<Static, Axes, Storage>;
     
         // default static type factory 
         template<typename... Axis> 
    @@ -243,7 +243,7 @@
       namespace histogram {
         template<typename D, typename A, typename S> 
           std::ostream & 
    -      operator<<(std::ostream & os, const histogram< D, A, S > & h);
    +      operator<<(std::ostream & os, const histogram< D, A, S > & h);
       }
     }
    @@ -264,7 +264,7 @@
    namespace boost {
       namespace histogram {
         namespace literals {
    -      template<char... Digits> auto operator""_c();
    +      template<char... Digits> auto operator""_c();
         }
       }
     }
    @@ -276,10 +276,10 @@
    namespace boost {
       namespace histogram {
         template<typename Archive, typename Container> 
    -      void serialize(Archive & ar, array_storage< Container > & store, 
    +      void serialize(Archive & ar, array_storage< Container > & store, 
                          unsigned);
         template<typename Archive, typename Axes> 
    -      void serialize(Archive & ar, any_axis< Axes > & a, unsigned);
    +      void serialize(Archive & ar, any_axis< Axes > & a, unsigned);
         namespace axis {
           namespace transform {
           }
    diff --git a/doc/html/histogram_HTML.manifest b/doc/html/histogram_HTML.manifest
    index f685d768..f0391aab 100644
    --- a/doc/html/histogram_HTML.manifest
    +++ b/doc/html/histogram_HTML.manifest
    @@ -26,11 +26,11 @@ boost/histogram/axis/variable.html
     boost/histogram/count.html
     boost/histogram/histogram.html
     boost/histogram/weight.html
    -boost/histogram/histogram__idm380173038448.html
    -boost/histogram/histogram__idm380173038448/lin_visitor.html
    -boost/histogram/histogram__idm380173038448/xlin_visitor.html
    -boost/histogram/histogram__idm380164444128.html
    -boost/histogram/histogram__idm380164444128/shape_assign_helper.html
    +boost/histogram/histogram__idm414260316224.html
    +boost/histogram/histogram__idm414260316224/lin_visitor.html
    +boost/histogram/histogram__idm414260316224/xlin_visitor.html
    +boost/histogram/histogram__idm414260134512.html
    +boost/histogram/histogram__idm414260134512/shape_assign_helper.html
     boost/histogram/axis/interval.html
     boost/histogram/adaptive_storage.html
     boost/histogram/array_storage.html
    diff --git a/doc/html/index.html b/doc/html/index.html
    index e88b37e8..ab0e965a 100644
    --- a/doc/html/index.html
    +++ b/doc/html/index.html
    @@ -102,7 +102,7 @@
     
     
     
    -
    +

    Last revised: November 08, 2017 at 12:04:22 GMT

    Last revised: November 08, 2017 at 15:21:38 GMT


    diff --git a/doc/sync_code.py b/doc/sync_code.py index 1709678b..ca388e38 100755 --- a/doc/sync_code.py +++ b/doc/sync_code.py @@ -34,8 +34,9 @@ for qbk in glob.glob(os.path.dirname(__file__) + "/*.qbk"): else: with open(foname) as fi: code2 = fi.read() - qbk_content = qbk_content[:start] + code2 + qbk_content[end:] - qbk_needs_update = True + if code != code2: + qbk_content = qbk_content[:start] + code2 + qbk_content[end:] + qbk_needs_update = True else: with open(foname, "w") as fo: fo.write(code) diff --git a/include/boost/histogram/any_axis.hpp b/include/boost/histogram/any_axis.hpp index fb32943c..0f76dcb5 100644 --- a/include/boost/histogram/any_axis.hpp +++ b/include/boost/histogram/any_axis.hpp @@ -65,11 +65,11 @@ public: return apply_visitor(detail::index(x), *this); } - ::boost::string_view label() const { + string_view label() const { return apply_visitor(detail::get_label(), *this); } - void label(const ::boost::string_view x) { + void label(const string_view x) { return apply_visitor(detail::set_label(x), *this); } diff --git a/include/boost/histogram/axis.hpp b/include/boost/histogram/axis.hpp index 42db5ebb..f3b58b7c 100644 --- a/include/boost/histogram/axis.hpp +++ b/include/boost/histogram/axis.hpp @@ -108,7 +108,7 @@ public: inline int size() const noexcept { return size_; } /// Returns the number of bins, including overflow/underflow. inline int shape() const noexcept { return size_; } - /// Returns whether axis has extra overflow and underflow bins. + /// Returns true if axis has extra overflow and underflow bins. inline bool uoflow() const noexcept { return false; } /// Returns the axis label, which is a name or description. string_view label() const noexcept { return label_; } diff --git a/src/python/histogram.cpp b/src/python/histogram.cpp index 965938ab..96e447aa 100644 --- a/src/python/histogram.cpp +++ b/src/python/histogram.cpp @@ -379,6 +379,10 @@ void register_histogram() { ":returns: string representation of the histogram") .def(python::self == python::self) .def(python::self += python::self) + .def(python::self *= double()) + .def(python::self * double()) + .def(double() * python::self) + .def(python::self + python::self) .def_pickle(serialization_suite()); } diff --git a/test/python_suite_test.py b/test/python_suite_test.py index 78255fb8..d5f7aa57 100644 --- a/test/python_suite_test.py +++ b/test/python_suite_test.py @@ -584,6 +584,21 @@ class test_histogram(unittest.TestCase): with self.assertRaises(IndexError): h.variance(4) + def test_operators(self): + h = histogram(integer(0, 2)) + h.fill(0) + h += h + self.assertEqual(h.value(0), 2) + self.assertEqual(h.variance(0), 2) + self.assertEqual(h.value(1), 0) + h *= 2.5 + self.assertEqual(h.value(0), 5) + self.assertEqual(h.variance(0), 5) + self.assertEqual(h.value(1), 0) + self.assertEqual(h + h, 2 * h) + self.assertEqual(h + h, h * 2) + + def test_pickle_0(self): a = histogram(category(0, 1, 2), integer(0, 20, label='ia'),