Fix the incorrect output error.

Implement epsilon (but doesn't work correctly for now).
Start making the correct implementation of I/O.
This commit is contained in:
emil
2024-10-03 04:49:09 +03:00
parent 0ed96c9238
commit 153bcfd017
5 changed files with 118 additions and 24 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ FracturedMatrix& FracturedMatrix::operator=(const FracturedMatrix& other) {
return *this;
}
DestroyMatrix destroyGeneralMatrix(Matrix& generalMatrix) {
DestroyMatrix disassembleGeneralMatrix(Matrix& generalMatrix) {
int rows = generalMatrix.getRows();
int cols = generalMatrix.getColumns();
+1 -1
View File
@@ -22,7 +22,7 @@ struct DestroyMatrix {
Vector b;
};
DestroyMatrix destroyGeneralMatrix(Matrix& generalMatrix);
DestroyMatrix disassembleGeneralMatrix(Matrix& generalMatrix);
void elimination(Matrix&, int pivot_row_index, int pivot_column_index);
Matrix createGeneralMatrix(Matrix& A, Vector& C, Vector& b);
+3 -1
View File
@@ -9,7 +9,8 @@ void showMatrix(Matrix matrix) {
}
}
}
std::cout << maxNumberLength << std::endl;
//std::cout << maxNumberLength << std::endl;
std::cout << std::endl;
for (size_t y = 0; y < matrix.getRows(); y++) {
std::string row = "";
for (size_t x = 0; x < matrix.getColumns(); x++) {
@@ -38,6 +39,7 @@ void showMatrix(Matrix matrix) {
}
std::cout << row << std::endl;
}
std::cout << std::endl;
}
Vector::Vector(int n) {