|
Citlali
|
The BlockAccessor struct This provides methods to access array in block notions. More...

Public Types | |
| using | array_t = Array |
| using | index_t = predefs::index_t |
| using | bins_t = Eigen::Matrix< index_t, 2, Eigen::Dynamic > |
Public Member Functions | |
| BlockAccessor (array_t array_) | |
| template<index_t dim> | |
| constexpr auto | bins () -> decltype(auto) |
| Return the bins for dim. | |
| template<index_t dim> | |
| constexpr index_t | n_bins () const |
| Return the number of bins for dim. | |
| template<index_t dim> | |
| void | set_bins (bins_t bins_) |
| Set bins with bin matrix of shape (2, nbins). | |
| template<index_t dim> | |
| void | set_bins (const std::vector< std::pair< index_t, index_t > > &bins_) |
| Set bins with vector of pairs of (left, right). | |
| template<index_t dim> | |
| void | set_bins (const std::vector< index_t > &bin_edges) |
| Set bins with vector of bin edges of size (nbins + 1). | |
| constexpr index_t | n_blocks () const |
| Returns number of blocks. | |
| template<index_t n_dims__ = n_dims, REQUIRES_V(n_dims__==1) > | |
| auto | block (index_t i) |
| template<index_t n_dims__ = n_dims, REQUIRES_V(n_dims__==2) > | |
| auto | block (index_t i, index_t j) |
Public Attributes | |
| array_t | array |
| std::array< bins_t, n_dims > | all_bins |
Static Public Attributes | |
| static constexpr const index_t | n_dims = n_dims_ |
| static constexpr const index_t | left = 0 |
| static constexpr const index_t | right = 1 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const BlockAccessor &b) |
The BlockAccessor struct This provides methods to access array in block notions.
| using BlockAccessor< Array, n_dims_ >::array_t = Array |
| using BlockAccessor< Array, n_dims_ >::bins_t = Eigen::Matrix<index_t, 2, Eigen::Dynamic> |
| using BlockAccessor< Array, n_dims_ >::index_t = predefs::index_t |
|
inline |
|
inlineconstexpr |
Return the bins for dim.
|
inline |
|
inline |
|
inlineconstexpr |
Return the number of bins for dim.

|
inlineconstexpr |
Returns number of blocks.
|
inline |
Set bins with bin matrix of shape (2, nbins).

|
inline |
Set bins with vector of bin edges of size (nbins + 1).

|
inline |
Set bins with vector of pairs of (left, right).

|
friend |
| std::array<bins_t, n_dims> BlockAccessor< Array, n_dims_ >::all_bins |
| array_t BlockAccessor< Array, n_dims_ >::array |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |