MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / solveMatrixT

Function solveMatrixT

highs/util/HFactor.cpp:34–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using std::pair;
33
34static void solveMatrixT(const HighsInt X_Start, const HighsInt x_end,
35 const HighsInt y_start, const HighsInt y_end,
36 const HighsInt* t_index, const double* t_value,
37 const double t_pivot, HighsInt* rhs_count,
38 HighsInt* rhs_index, double* rhs_array) {
39 // Collect by X
40 double pivot_multiplier = 0;
41 for (HighsInt k = X_Start; k < x_end; k++)
42 pivot_multiplier += t_value[k] * rhs_array[t_index[k]];
43
44 // Scatter by Y
45 if (fabs(pivot_multiplier) > kHighsTiny) {
46 HighsInt work_count = *rhs_count;
47
48 pivot_multiplier /= t_pivot;
49 for (HighsInt k = y_start; k < y_end; k++) {
50 const HighsInt index = t_index[k];
51 const double value0 = rhs_array[index];
52 const double value1 = value0 - pivot_multiplier * t_value[k];
53 if (value0 == 0) rhs_index[work_count++] = index;
54 rhs_array[index] = (fabs(value1) < kHighsTiny) ? kHighsZero : value1;
55 }
56
57 *rhs_count = work_count;
58 }
59}
60
61static void solveHyper(const HighsInt h_size, const HighsInt* h_lookup,
62 const HighsInt* h_pivot_index,

Callers 4

ftranMPFMethod · 0.85
btranMPFMethod · 0.85
ftranAPFMethod · 0.85
btranAPFMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected