mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 05:07:58 +00:00
- new thread-safe accumulators for arithmetic types - storages have a new flag `has_threading_support` to indicate support for parallel cell access - histogram automatically synchronises growing axes and storage if necessary
64 lines
2.3 KiB
Plaintext
64 lines
2.3 KiB
Plaintext
[section:Transform Transform]
|
|
|
|
A [*Transform] implements a monotonic mapping between two real-valued domains, external and internal. It is used to extend the [classref boost::histogram::axis::regular regular axis]. The bins in the internal domain are of equal width, while the bins in the external domain are non-equal width. Must be [@https://en.cppreference.com/w/cpp/named_req/DefaultConstructible DefaultConstructible], [@https://en.cppreference.com/w/cpp/named_req/CopyConstructible CopyConstructible], and [@https://en.cppreference.com/w/cpp/named_req/CopyAssignable CopyAssignable].
|
|
|
|
[heading Required features]
|
|
|
|
* `T` is a type meeting the requirements of [*Transform]
|
|
* `t` is a value of type `T`
|
|
* `X` is a type with the semantics of a floating-point type
|
|
* `x` is a value of type `X`
|
|
* `Y` is a floating-point type
|
|
* `y` is a value of type `Y`
|
|
|
|
[table Valid expressions
|
|
[[Expression] [Returns] [Semantics, Pre/Post-conditions]]
|
|
[
|
|
[`t.forward(x)`]
|
|
[`Y`]
|
|
[
|
|
Const or static member function which maps the external value to the corresponding internal value. The return type `Y` may differ from `X`.
|
|
]
|
|
]
|
|
[
|
|
[`t.inverse(y)`]
|
|
[`X`]
|
|
[
|
|
Const or static member function which maps the internal value to the corresponding external value. The result of `t.inverse(t.forward(x))` must be approximately equal to `x` within floating-point precision.
|
|
]
|
|
]
|
|
[
|
|
[`t == u`]
|
|
[`bool`]
|
|
[
|
|
`u` is another value of type `T`. Returns `true` if both values have the same state. Otherwise returns `false`. May be omitted if `T` is stateless. If this binary operator is not implemented, the library considers the arguments equal, if and only if their types are the same.
|
|
]
|
|
]
|
|
]
|
|
|
|
[heading Optional features]
|
|
|
|
* `T` is a type meeting the requirements of [*Transform]
|
|
* `t` is a value of type `T`
|
|
* `ar` is a value of an archive with Boost.Serialization semantics
|
|
|
|
[table Valid expressions
|
|
[[Expression] [Returns] [Semantics, Pre/Post-conditions]]
|
|
[
|
|
[`ar & t`]
|
|
[]
|
|
[
|
|
Serializes `a` to the archive or loads serialized state from the archive. Can be omitted if `T` is stateless.
|
|
]
|
|
]
|
|
]
|
|
|
|
[heading Models]
|
|
|
|
* [classref boost::histogram::axis::transform::id]
|
|
* [classref boost::histogram::axis::transform::log]
|
|
* [classref boost::histogram::axis::transform::sqrt]
|
|
* [classref boost::histogram::axis::transform::pow]
|
|
|
|
[endsect]
|