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

◆ choose_pivot_column()

bool FF_LUComputation::choose_pivot_column ( int lo,
int hi,
int & result )
private

Definition at line 35 of file fractionfreeLU.cpp.

36{
37 int r = -1; // If this remains -1, then no better column was found
38 int c = -1;
39 for (int i = lo; i <= hi; i++)
40 {
41 int r1 = static_cast<int>(M->lead_row(i));
42 if (r1 > r)
43 {
44 r = r1;
45 c = i;
46 }
47 }
48 if (r == -1) return false;
49
50 result = c;
51 return true;
52}
MutableMatrix * M
VALGRIND_MAKE_MEM_DEFINED & result(result)

References M, and result().

Referenced by calc().