| 63 |  | data_[i][j] = s; | 
| 64 |  | } | 
| 65 |  |  | 
| 66 | + | RectMatrix(Real* array) { | 
| 67 | + | for (unsigned int i = 0; i < Row; i++) | 
| 68 | + | for (unsigned int j = 0; j < Col; j++) | 
| 69 | + | data_[i][j] = array[i * Row + j]; | 
| 70 | + | } | 
| 71 | + |  | 
| 72 |  | /** copy constructor */ | 
| 73 |  | RectMatrix(const RectMatrix<Real, Row, Col>& m) { | 
| 74 |  | *this = m; | 
| 110 |  | return data_[i][j]; | 
| 111 |  | } | 
| 112 |  |  | 
| 113 | + | /** | 
| 114 | + | * Copy the internal data to an array | 
| 115 | + | * @param array the pointer of destination array | 
| 116 | + | */ | 
| 117 | + | void getArray(Real* array) { | 
| 118 | + | for (unsigned int i = 0; i < Row; i++) { | 
| 119 | + | for (unsigned int j = 0; j < Col; j++) { | 
| 120 | + | array[i * Row + j] = data_[i][j]; | 
| 121 | + | } | 
| 122 | + | } | 
| 123 | + | } | 
| 124 | + |  | 
| 125 | + |  | 
| 126 |  | /** Returns the pointer of internal array */ | 
| 127 |  | Real* getArrayPointer() { | 
| 128 |  | return &data_[0][0]; |