22 #ifndef fixed_row_vector_h 23 #define fixed_row_vector_h 25 #include "fixed_general_matrix.h" 45 typedef const AT* const_iterator;
47 typedef AT value_type;
87 template<
class Type,
class Row,
class Col>
122 FMATVEC_ASSERT(x.size() == N, AT);
144 FMATVEC_ASSERT(i>=0, AT);
145 FMATVEC_ASSERT(i<N, AT);
154 FMATVEC_ASSERT(i>=0, AT);
155 FMATVEC_ASSERT(i<N, AT);
159 iterator begin() {
return &ele[0][0]; }
160 iterator end() {
return &ele[0][N]; }
161 const_iterator begin()
const {
return &ele[0][0]; }
162 const_iterator end()
const {
return &ele[0][N]; }
163 const_iterator cbegin() const noexcept {
return &ele[0][0]; }
164 const_iterator cend() const noexcept {
return &ele[0][N]; }
174 const AT&
e(
int i)
const {
187 inline RowVector<Fixed<N>,AT>& init(Noinit,
const AT &a=AT()) {
return *
this; }
199 throw std::runtime_error(
"A fixed row vector cannot be resized.");
208 int inc()
const {
return 1;}
230 template <
int N,
class AT>
232 for(
int i=0; i<N; i++)
237 template <
int N,
class AT>
240 for(
int i=0; i<N; i++)
247 template <
int N,
class AT>
template <
class Col>
249 for(
int i=0; i<N; i++)
int size() const
Size.
Definition: fixed_row_vector.h:193
This is the basic matrix class for arbitrary matrices.
Definition: fmatvec.h:41
const AT & operator()(int i) const
Element operator.
Definition: fixed_row_vector.h:153
const AT & e(int i) const
Element operator.
Definition: fixed_row_vector.h:174
RowVector(const RowVector< Row, AT > &A)
Copy Constructor.
Definition: fixed_row_vector.h:80
RowVector(const Matrix< Type, Row, Col, AT > &A)
Copy Constructor.
Definition: fixed_row_vector.h:88
int inc() const
Increment.
Definition: fixed_row_vector.h:208
Namespace fmatvec.
Definition: _memory.cc:28
void resize(int n)
Definition: fixed_row_vector.h:197
RowVector< Fixed< N >, AT > & operator=(const RowVector< Row, AT > &x)
Assignment operator.
Definition: fixed_row_vector.h:121
Basic shape class for matrices.
Definition: types.h:132
AT & operator()(int i)
Element operator.
Definition: fixed_row_vector.h:143
RowVector(const char *str)
String Constructor.
Definition: fixed_row_vector.h:103