1 #ifndef UTIL_RAGGED_MATRIX_H 2 #define UTIL_RAGGED_MATRIX_H 28 template <
typename Data>
116 template <
typename Data>
128 template <
typename Data>
135 template <
typename Data>
142 template <
typename Data>
149 template <
typename Data>
157 return *(
rows_[i] + j);
163 template <
typename Data>
171 return *(
rows_[i] + j);
Data * data_
One-dimensional C array of all elements.
virtual ~RaggedMatrix()
Destructor.
const Data & operator()(int i, int j) const
Return element (i,j) of matrix by const reference.
A 2D array in which different rows can have different lengths.
File containing preprocessor macros for error handling.
int capacity2(int i)
Get number of elements in row number i.
int capacity1()
Get number of rows.
Utility classes for scientific computation.
RaggedMatrix()
Default constructor.
int * capacity2_
Array containing number of elements in each row.
int capacity_
Total number of elements.
Data ** rows_
Array of pointers to rows.
int capacity1_
Number of rows (range of first index).