34 #ifndef __H__UG__COMMON__FIXED_ARRAY_IMPL_H__
35 #define __H__UG__COMMON__FIXED_ARRAY_IMPL_H__
43 template<
typename T,
size_t n>
49 template<
typename T,
size_t nT>
55 template<
typename T,
size_t n>
62 template<
typename T,
size_t n>
69 template<
typename T,
size_t n>
77 template<
typename T,
size_t n>
86 template<
typename T,
size_t n>
96 template<
typename T,
size_t n>
104 template<
typename T,
size_t n>
114 template<
typename T,
size_t n>
117 out <<
"FixedArray (n=" << n <<
") [ ";
119 out << arr[i] <<
" ";
129 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
135 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
138 assert(rows == rowsT && cols == colsT);
141 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
145 values[i] = other.
values[i];
148 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
155 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
162 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
170 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
174 assert(newCols == colsT && newRows == rowsT);
175 return newCols == colsT && newRows == rowsT;
182 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
189 return values[c+r*colsT];
191 return values[r+c*rowsT];
194 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
201 return values[c+r*colsT];
203 return values[r+c*rowsT];
247 template<
typename T,
size_t rowsT,
size_t colsT, eMatrixOrdering T_ordering>
253 for(size_type r=0; r<arr.
num_rows(); r++)
255 for(size_type c=0; c<arr.
num_cols(); c++)
256 out << arr(r, c) <<
" ";
257 if(r != arr.
num_rows()-1) out <<
"| ";
Definition: fixed_array.h:56
bool resize(size_type newN, bool bCopyValues=true)
Definition: fixed_array_impl.h:79
bool reserve(size_type newN) const
Definition: fixed_array_impl.h:88
const T & operator[](size_type i) const
Definition: fixed_array_impl.h:106
size_t size_type
Definition: fixed_array.h:59
size_type size() const
Definition: fixed_array_impl.h:71
FixedArray1()
Definition: fixed_array_impl.h:44
~FixedArray1()
Definition: fixed_array_impl.h:63
Definition: fixed_array.h:135
FixedArray2()
Definition: fixed_array_impl.h:130
size_type num_rows() const
Definition: fixed_array_impl.h:157
bool resize(size_type newRows, size_type newCols, bool bCopyValues=true)
Definition: fixed_array_impl.h:172
~FixedArray2()
Definition: fixed_array_impl.h:149
size_t size_type
Definition: fixed_array.h:138
const T & operator()(size_type r, size_type c) const
Definition: fixed_array_impl.h:196
size_type num_cols() const
Definition: fixed_array_impl.h:164
T values[rowsT *colsT]
Definition: fixed_array.h:210
std::ostream & operator<<(std::ostream &outStream, const ug::MathMatrix< 2, 2 > &m)
Definition: math_matrix.cpp:38
@ RowMajor
Definition: storage.h:48