1 #ifndef BARRY_BARRAYVECTOR_MEAT_HPP
2 #define BARRY_BARRAYVECTOR_MEAT_HPP 1
4 template<
typename Cell_Type,
typename Data_Type>
13 for (
const auto& a : Array->el_ij[
i])
18 for (
const auto& a : Array->el_ji[
i])
19 vec.emplace_back(std::make_pair<
size_t,
Cell<Cell_Type>>(a.first, *(a.second)));
23 vec_initialized =
true;
28 template<
typename Cell_Type,
typename Data_Type>
33 template<
typename Cell_Type,
typename Data_Type>
38 template<
typename Cell_Type,
typename Data_Type>
42 return Array->el_ij[
i].size();
44 return Array->el_ji[
i].size();
49 template<
typename Cell_Type,
typename Data_Type>
63 template<
typename Cell_Type,
typename Data_Type>
68 template<
typename Cell_Type,
typename Data_Type>
72 size_t N_ = (dim == 0u) ? Array->nrow() : Array->ncol();
77 for (
auto j = 0u;
j < N_; ++
j)
82 for (
auto j = 0u;
j < N_; ++
j)
90 template<
typename Cell_Type,
typename Data_Type>
94 size_t N_ = (dim == 0u) ? Array->nrow() : Array->ncol();
99 for (
auto j = 0u;
j < N_; ++
j)
104 for (
auto j = 0u;
j < N_; ++
j)
111 template<
typename Cell_Type,
typename Data_Type>
115 size_t N_ = (dim == 0u) ? Array->nrow() : Array->ncol();
120 for (
auto j = 0u;
j < N_; ++
j)
125 for (
auto j = 0u;
j < N_; ++
j)
132 template<
typename Cell_Type,
typename Data_Type>
136 size_t N_ = (dim == 0u) ? Array->nrow() : Array->ncol();
141 for (
auto j = 0u;
j < N_; ++
j)
146 for (
auto j = 0u;
j < N_; ++
j)
153 template<
typename Cell_Type,
typename Data_Type>
157 size_t N_ = (dim == 0u) ? Array->nrow() : Array->ncol();
162 for (
auto j = 0u;
j < N_; ++
j)
167 for (
auto j = 0u;
j < N_; ++
j)
174 template<
typename Cell_Type,
typename Data_Type>
178 return Array->get_row_vec(
i,
false);
180 return Array->get_col_vec(
i,
false);
184 template<
typename Cell_Type,
typename Data_Type>
189 for (
size_t j = 0u;
j < Array->ncol(); ++
j)
191 if (Array(
i,
j) != val)
198 for (
size_t j = 0u;
j < Array->nrow(); ++
j)
200 if (Array(
j,
i) != val)
211 template<
typename Cell_Type,
typename Data_Type>
215 return Array->get_row_vec(
i,
false);
217 return Array->get_col_vec(
i,
false);
221 template<
typename Cell_Type,
typename Data_Type>
226 for (
size_t j = 0u;
j < Array->ncol(); ++
j)
228 if (Array(
i,
j) != val)
235 for (
size_t j = 0u;
j < Array->nrow(); ++
j)
237 if (Array(
j,
i) != val)
248 template<
typename Cell_Type,
typename Data_Type>
250 return !(this->operator==(val));
253 template<
typename Cell_Type,
typename Data_Type>
258 for (
size_t j = 0u;
j < Array->ncol(); ++
j)
260 if (Array(
i,
j) >= val)
267 for (
size_t j = 0u;
j < Array->nrow(); ++
j)
269 if (Array(
j,
i) >= val)
280 template<
typename Cell_Type,
typename Data_Type>
285 for (
size_t j = 0u;
j < Array->ncol(); ++
j)
287 if (Array(
i,
j) > val)
294 for (
size_t j = 0u;
j < Array->nrow(); ++
j)
296 if (Array(
j,
i) > val)
307 template<
typename Cell_Type,
typename Data_Type>
309 return !(this->operator<=(val));
314 template<
typename Cell_Type,
typename Data_Type>
316 return !(this->operator<(val));
bool operator>=(const Cell_Type &val) const
bool operator==(const Cell_Type &val) const
bool operator<(const Cell_Type &val) const
bool operator!=(const Cell_Type &val) const
bool operator>(const Cell_Type &val) const
bool operator<=(const Cell_Type &val) const
Row or column of a BArray
bool operator==(const Cell_Type &val) const
size_t size() const noexcept
void operator+=(const Cell_Type &val)
bool is_row() const noexcept
void operator/=(const Cell_Type &val)
void operator*=(const Cell_Type &val)
std::vector< Cell_Type >::const_iterator begin() noexcept
void operator=(const Cell_Type &val)
bool is_col() const noexcept
std::vector< Cell_Type >::const_iterator end() noexcept
void operator-=(const Cell_Type &val)
Entries in BArray. For now, it only has two members:
Data_Type &&counter_ noexcept