| 348 | } |
| 349 | |
| 350 | void IntMinorProcessor::defineMatrix (const int numberOfRows, |
| 351 | const int numberOfColumns, |
| 352 | const int* matrix) |
| 353 | { |
| 354 | /* free memory of _intMatrix */ |
| 355 | omFree(_intMatrix); _intMatrix = NULL; |
| 356 | |
| 357 | _rows = numberOfRows; |
| 358 | _columns = numberOfColumns; |
| 359 | |
| 360 | /* allocate memory for new entries in _intMatrix */ |
| 361 | int n = _rows * _columns; |
| 362 | _intMatrix = (int*)omAlloc(n*sizeof(int)); |
| 363 | |
| 364 | /* copying values from one-dimensional method |
| 365 | parameter "matrix" */ |
| 366 | for (int i = 0; i < n; i++) |
| 367 | _intMatrix[i] = matrix[i]; |
| 368 | } |
| 369 | |
| 370 | IntMinorValue IntMinorProcessor::getMinor(const int dimension, |
| 371 | const int* rowIndices, |
no test coverage detected