30 template <
typename Data>
118 template <
typename Data>
128 template <
typename Data>
135 template <
typename Data>
137 {
return capacity1_; }
142 template <
typename Data>
144 {
return capacity2_; }
149 template <
typename Data>
154 assert(i < capacity1_);
156 assert(j < capacity2_);
157 return *(data_ + i*capacity2_ + j);
163 template <
typename Data>
168 assert(i < capacity1_);
170 assert(j < capacity2_);
171 return *(data_ + i*capacity2_ + j);
177 template <
typename Data>
184 template <
typename Data>
Two-dimensional array container template (abstract).
Data * cArray()
Return pointer to underlying one-dimensional C array.
int capacity2() const
Get number of columns (range of the second array index).
Data * data_
Pointer to 1D C array of all elements.
int capacity2_
Number of columns (range of first index).
virtual ~Matrix()
Destructor.
Data const * cArray() const
Return pointer to const to underlying one-dimensional C array.
int capacity1_
Number of rows (range of first index).
Data const & operator()(int i, int j) const
Return element (i,j) of matrix by const reference.
Matrix()
Default constructor.
int capacity1() const
Get number of rows (range of the first array index).
File containing preprocessor macros for error handling.
Utility classes for scientific computation.