a0f75b335d
* fix documentation of serialization support for all types * document optional support of weighted fills for custom accumulators
71 lines
2.7 KiB
Plaintext
71 lines
2.7 KiB
Plaintext
[/
|
|
Copyright Hans Dembinski 2018 - 2019.
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE_1_0.txt or copy at
|
|
https://www.boost.org/LICENSE_1_0.txt)
|
|
]
|
|
|
|
[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]]
|
|
[
|
|
[`t.serialize(ar, n)`]
|
|
[]
|
|
[
|
|
`ar` is a value of an archive with Boost.Serialization semantics and `n` is an unsigned integral value. Saves to the archive or loads serialized state from the archive. The version number `n` is the stored version when the object is loaded or the current version when the object is saved.
|
|
]
|
|
]
|
|
]
|
|
|
|
[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]
|