Macaulay2 Engine
Loading...
Searching...
No Matches

◆ computePivotColumns()

template<class RingType>
void LUUtil< RingType >::computePivotColumns ( const Mat & LU,
std::vector< size_t > & result_columns )
static

Definition at line 440 of file dmat-lu-inplace.hpp.

442{
443 result_columns.clear();
444 size_t thiscol = 0;
445 size_t thisrow = 0;
446 while (thisrow < LU.numRows() and thiscol < LU.numColumns())
447 {
448 if (not LU.ring().is_zero(LU.entry(thisrow, thiscol)))
449 {
450 result_columns.push_back(thiscol);
451 thisrow++;
452 }
453 thiscol++;
454 }
455}

Referenced by DMatLinAlg< M2::ARingZZpFlint >::columnRankProfile(), DMatLUinPlace< RingType >::computeLU(), and DMatLinAlg< M2::ARingZZpFlint >::solve().