25 #include <queso/Defines.h>
26 #include <queso/2dArrayOfStuff.h>
35 m_data (m_numRows,NULL)
37 for (
unsigned int i = 0; i <
m_numRows; ++i) {
46 for (
unsigned int i = 0; i < m_numRows; ++i) {
47 for (
unsigned int j = 0; j < m_numCols; ++j) {
48 if ((*(m_data[i]))[j] != NULL)
delete (*(m_data[i]))[j];
72 "TwoDArray<T>::setLocation()",
74 (*(m_data[i]))[j] = info;
84 (m_data[i] == NULL) ||
85 ((*m_data[i])[j] == NULL),
87 "TwoDArray<T>::operator(1)",
89 return *(*(m_data[i]))[j];
97 (m_data[i] == NULL) ||
98 ((*m_data[i])[j] == NULL),
100 "TwoDArray<T>::operator(2)",
101 "invalid situation");
102 return *(*(m_data[i]))[j];
unsigned int numCols() const
Number of columns in the array.
T & operator()(unsigned int i, unsigned int j)
Returns data stored in a specific location (non-const).
unsigned int numRows() const
Number of rows in the array.
const int UQ_UNAVAILABLE_RANK
TwoDArray(unsigned int numRows, unsigned int numCols)
Default constructor.
std::vector< std::vector< T * > * > m_data
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
void setLocation(unsigned int i, unsigned int j, T *info)
Sets the data in a specific location.