32 #ifndef MCKL_CORE_ESTIMATE_MATRIX_HPP 33 #define MCKL_CORE_ESTIMATE_MATRIX_HPP 63 std::size_t
dim() const noexcept {
return this->
ncol(); }
105 template <
typename InputIter>
121 template <
typename InputIter>
132 insert_estimate_dispatch(t, i, first, std::is_floating_point<T>());
140 template <
typename InputIter>
141 void insert_estimate_dispatch(
144 insert_estimate_dispatch(t, i, first, std::false_type());
146 std::fill_n(this->
row_begin(t), (i - t) *
dim(), -const_nan<T>());
150 template <
typename InputIter>
151 void insert_estimate_dispatch(
161 #endif // MCKL_CORE_ESTIMATE_MATRIX_HPP std::size_t num_iter() const noexcept
The number of iterations stored in the estimate matrix.
void insert_estimate(size_type i, InputIter first)
Add a new estimate into the matrix given iteration number.
Estimate matrix for iterative Monte Carlo algorithms.
typename matrix_type::const_row_range const_estimate_range
void reserve(std::size_t n)
Reserve space for additional iterations.
size_type ncol() const
The number of columns.
void insert_estimate(InputIter first)
Add a new estimate to the bottom of the matrix.
void resize(size_type nrow, size_type ncol)
Resize the matrix.
void clear()
Clear the estimate matrix but preserve the dimension.
const_estimate_range estimate(size_type i) const
Range of an estimate.
variable_range variable(size_type j)
Range of a variable.
Range< const_row_iterator > const_row_range
Range< const_col_iterator > const_col_range
pointer row_data(size_type i)
Pointer to the first element of a row.
void push_back_col(InputIter first)
Insert a new coloumn at the right.
estimate_range estimate(size_type i)
Range of an estimate.
Range< row_iterator > row_range
typename matrix_type::col_range variable_range
Range< col_iterator > col_range
typename matrix_type::value_type value_type
typename matrix_type::row_range estimate_range
row_iterator row_begin(size_type i)
Iterator to the beginning of a row.
T * insert_estimate()
Add space for a new estimate, return a pointer to the new row.
const_variable_range variable(size_type j) const
Range of a variable.
void reserve(size_type n, size_type m)
Reserve storage space for the matrix.
size_type nrow() const
The number of rows.
EstimateMatrix(size_type dim)
void push_back_row(InputIter first)
Insert a new row at the bottom.
typename matrix_type::const_col_range const_variable_range
typename matrix_type::size_type size_type
std::size_t dim() const noexcept
The dimension of the estimator.