1 #ifndef BARRY_BARRAYVECTOR_BONES_HPP
2 #define BARRY_BARRAYVECTOR_BONES_HPP 1
10 template <
typename Cell_Type =
bool,
typename Data_Type =
bool>
15 std::vector< std::pair< size_t, Cell_Type > > vec;
20 bool vec_initialized =
false;
36 bool check_bounds =
true
38 Array(Array_), vec(0u), dim(dim_),
i(i_) {
41 throw std::range_error(
"-dim_- should be either 0 (row) or 1 (col).");
45 if ((dim == 0u) && (
i >= Array->
nrow()))
46 throw std::length_error(
"Row out of range.");
47 if ((dim == 1u) && (
j >= Array->
ncol()))
48 throw std::length_error(
"Col out of range.");
59 std::vector< Cell_Type >::const_iterator
end()
noexcept;
61 void operator=(const Cell_Type & val);
62 void operator+=(const Cell_Type & val);
63 void operator-=(const Cell_Type & val);
64 void operator*=(const Cell_Type & val);
65 void operator/=(const Cell_Type & val);
67 operator std::vector< Cell_Type >() const;
68 bool operator==(const Cell_Type & val) const;
72 template <typename Cell_Type =
bool, typename Data_Type =
bool>
77 std::vector< std::pair< size_t, Cell_Type > > vec;
82 bool vec_initialized =
false;
90 bool check_bounds =
true
92 Array(Array_), vec(0u), dim(dim_),
i(i_) {
95 throw std::range_error(
"-dim_- should be either 0 (row) or 1 (col).");
99 if ((dim == 0u) && (
i >= Array->
nrow()))
100 throw std::length_error(
"Row out of range.");
101 if ((dim == 1u) && (
j >= Array->
ncol()))
102 throw std::length_error(
"Col out of range.");
116 operator std::vector<Cell_Type>() const;
117 bool operator==(const Cell_Type & val) const;
118 bool operator!=(const Cell_Type & val) const;
119 bool operator<(const Cell_Type & val) const;
120 bool operator>(const Cell_Type & val) const;
121 bool operator<=(const Cell_Type & val) const;
122 bool operator>=(const Cell_Type & val) const;
size_t ncol() const noexcept
size_t nrow() const noexcept
BArrayVector_const(const BArray< Cell_Type, Data_Type > *Array_, size_t &dim_ size_t &i_, bool check_bounds=true)
bool is_row() const noexcept
Row or column of a BArray
size_t size() const noexcept
bool is_row() const noexcept
BArrayVector(BArray< Cell_Type, Data_Type > *Array_, size_t &dim_ size_t &i_, bool check_bounds=true)
Construct a new BArrayVector object.
std::vector< Cell_Type >::const_iterator begin() noexcept
bool is_col() const noexcept
std::vector< Cell_Type >::const_iterator end() noexcept
Data_Type &&counter_ noexcept