MCPcopy Create free account
hub / github.com/Singular/Singular / defineMatrix

Method defineMatrix

kernel/linear_algebra/MinorProcessor.cc:350–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void 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
370IntMinorValue IntMinorProcessor::getMinor(const int dimension,
371 const int* rowIndices,

Callers 4

getMinorIdeal_IntFunction · 0.80
getMinorIdeal_PolyFunction · 0.80
getMinorIdealCache_IntFunction · 0.80
getMinorIdealCache_PolyFunction · 0.80

Calls 1

p_DeleteFunction · 0.85

Tested by

no test coverage detected