forgot this
This commit is contained in:
@@ -50,9 +50,17 @@ VectAffine Solver::RectangularSystem(Matrix&& a_MatrixA, const Matrix& a_VectorB
|
||||
Matrix fullOrigin {mat.GetColumnCount(), 1};
|
||||
for (std::size_t i = 0; i < mat.GetRawCount(); i++) {
|
||||
int pivot_index = FirstNotNullElementIndexOnLine(mat, i);
|
||||
if(pivot_index >= 0){
|
||||
fullOrigin.at(pivot_index, 0) = origin.at(i, 0);
|
||||
|
||||
if (static_cast<std::size_t>(pivot_index) == mat.GetColumnCount() - 1) {
|
||||
// on a une ligne du type 0 = n. Aucune solution !
|
||||
return {Matrix {}, Matrix::ColumnVector({0})};
|
||||
}
|
||||
|
||||
// ligne entière de 0
|
||||
if (pivot_index < 0)
|
||||
continue;
|
||||
|
||||
fullOrigin.at(pivot_index, 0) = origin.at(i, 0);
|
||||
}
|
||||
|
||||
return {noyau, fullOrigin};
|
||||
|
||||
Reference in New Issue
Block a user