![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Histogram in Cartesian coordinates. More...
#include <Histogram.hpp>
Inheritance diagram for Utils::Histogram< T, N, M, U >:
Collaboration diagram for Utils::Histogram< T, N, M, U >:Public Member Functions | |
| Histogram (std::array< std::size_t, M > n_bins, std::array< std::pair< U, U >, M > limits) | |
| Histogram constructor. | |
| virtual | ~Histogram ()=default |
| std::array< std::size_t, M > | get_n_bins () const |
| Get the number of bins for each dimension. | |
| std::vector< T > | get_histogram () const |
| Get the histogram data. | |
| std::vector< std::size_t > | get_tot_count () const |
| Get the histogram count data. | |
| std::array< std::pair< U, U >, M > | get_limits () const |
| Get the ranges (min, max) for each dimension. | |
| std::array< U, M > | get_bin_sizes () const |
| Get the bin sizes. | |
| void | update (std::span< const U > pos) |
| Add data to the histogram. | |
| void | update (std::span< const U > pos, std::span< const T > value) |
| Add data to the histogram. | |
| virtual void | normalize () |
| Normalize histogram. | |
Protected Types | |
| using | array_index = typename array_type::index |
Protected Attributes | |
| std::array< std::size_t, M > | m_n_bins |
| Number of bins for each dimension. | |
| std::array< std::pair< U, U >, M > | m_limits |
| Min and max values for each dimension. | |
| std::array< U, M > | m_bin_sizes |
| Bin sizes for each dimension. | |
| array_type | m_array |
| Histogram data. | |
| count_type | m_count |
| Track the number of total hits per bin entry. | |
| std::array< T, N > | m_ones |
Histogram in Cartesian coordinates.
| T | Histogram data type. |
| N | Histogram data dimensionality. |
| M | Coordinates data dimensionality. |
| U | Coordinates data type. |
Definition at line 46 of file Histogram.hpp.
|
protected |
Definition at line 51 of file Histogram.hpp.
|
inline |
Histogram constructor.
| n_bins | the number of bins in each histogram dimension. |
| limits | the minimum/maximum data values to consider for the histogram. |
Definition at line 60 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_ones.
|
virtualdefault |
|
inline |
Get the bin sizes.
Definition at line 87 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_bin_sizes.
|
inline |
Get the histogram data.
Definition at line 74 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_array.
Referenced by Observables::CylindricalDensityProfile::evaluate(), Observables::CylindricalFluxDensityProfile::evaluate(), Observables::DensityProfile::evaluate(), Observables::FluxDensityProfile::evaluate(), and Observables::ForceDensityProfile::evaluate().
|
inline |
Get the ranges (min, max) for each dimension.
Definition at line 84 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_limits.
|
inline |
Get the number of bins for each dimension.
Definition at line 71 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_n_bins.
|
inline |
Get the histogram count data.
Definition at line 79 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_count.
|
inlinevirtual |
Normalize histogram.
Reimplemented in Utils::CylindricalHistogram< T, N, M, U >.
Definition at line 118 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_array, and Utils::Histogram< T, N, M, U >::m_bin_sizes.
Referenced by Observables::DensityProfile::evaluate(), Observables::FluxDensityProfile::evaluate(), and Observables::ForceDensityProfile::evaluate().
|
inline |
Add data to the histogram.
| pos | Position to update. |
Definition at line 93 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_ones, and Utils::Histogram< T, N, M, U >::update().
Referenced by Observables::CylindricalDensityProfile::evaluate(), Observables::DensityProfile::evaluate(), and Utils::Histogram< T, N, M, U >::update().
|
inline |
Add data to the histogram.
| pos | Position to update. |
| value | Value to add. |
Definition at line 100 of file Histogram.hpp.
References Utils::Histogram< T, N, M, U >::m_array, and Utils::Histogram< T, N, M, U >::m_count.
|
protected |
Histogram data.
Definition at line 187 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::get_histogram(), Utils::Histogram< T, N, M, U >::normalize(), and Utils::Histogram< T, N, M, U >::update().
|
protected |
Bin sizes for each dimension.
Definition at line 185 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::get_bin_sizes(), and Utils::Histogram< T, N, M, U >::normalize().
|
protected |
Track the number of total hits per bin entry.
Definition at line 189 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::get_tot_count(), and Utils::Histogram< T, N, M, U >::update().
|
protected |
Min and max values for each dimension.
Definition at line 183 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::get_limits().
|
protected |
Number of bins for each dimension.
Definition at line 181 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::get_n_bins().
|
protected |
Definition at line 190 of file Histogram.hpp.
Referenced by Utils::Histogram< T, N, M, U >::Histogram(), and Utils::Histogram< T, N, M, U >::update().