diff --git a/src/gui/PivotGui.cpp b/src/gui/PivotGui.cpp index 4f2211d..d206049 100644 --- a/src/gui/PivotGui.cpp +++ b/src/gui/PivotGui.cpp @@ -11,7 +11,21 @@ static Matrix LoadMatrixFromStdVect(const std::vector>& data) { result.at(i, j) = static_cast(data[i][j]); } } - return result; + return result; +} + +static std::string PrintVect(const Vect& vect) { + std::string result = "Vect( "; + for (std::size_t i = 0; i < vect.GetCardinal(); i++) { + Matrix vector = vect.GetVector(i); + result += " ("; + for (std::size_t j = 0; j < vect.GetDimension(); j++) { + result += std::to_string(static_cast((vector.at(j, 0)))) + ", "; + } + result += " ), "; + } + result += " )"; + return result; } void PivotGui::Init() {} @@ -84,6 +98,10 @@ void PivotGui::Render() { // rajouter le code pour la partie top right + static std::string result = "RIEN"; + + ImGui::Text(result.c_str()); + ImGui::End(); // End fenetre top right // Begin fenetre bas @@ -96,6 +114,8 @@ void PivotGui::Render() { if (ImGui::Button("Calcul noyau")) { // Code de calcul Vect kernel = solver.Kernel(LoadMatrixFromStdVect(matrixValues)); + + result = PrintVect(kernel); } ImGui::SameLine(); // Align buttons horizontally if (ImGui::Button("Calcul rang")) {