This commit is contained in:
@@ -11,7 +11,21 @@ static Matrix LoadMatrixFromStdVect(const std::vector<std::vector<int>>& data) {
|
|||||||
result.at(i, j) = static_cast<Matrix::Element>(data[i][j]);
|
result.at(i, j) = static_cast<Matrix::Element>(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<int>((vector.at(j, 0)))) + ", ";
|
||||||
|
}
|
||||||
|
result += " ), ";
|
||||||
|
}
|
||||||
|
result += " )";
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PivotGui::Init() {}
|
void PivotGui::Init() {}
|
||||||
@@ -84,6 +98,10 @@ void PivotGui::Render() {
|
|||||||
|
|
||||||
// rajouter le code pour la partie top right
|
// rajouter le code pour la partie top right
|
||||||
|
|
||||||
|
static std::string result = "RIEN";
|
||||||
|
|
||||||
|
ImGui::Text(result.c_str());
|
||||||
|
|
||||||
ImGui::End(); // End fenetre top right
|
ImGui::End(); // End fenetre top right
|
||||||
|
|
||||||
// Begin fenetre bas
|
// Begin fenetre bas
|
||||||
@@ -96,6 +114,8 @@ void PivotGui::Render() {
|
|||||||
if (ImGui::Button("Calcul noyau")) {
|
if (ImGui::Button("Calcul noyau")) {
|
||||||
// Code de calcul
|
// Code de calcul
|
||||||
Vect kernel = solver.Kernel(LoadMatrixFromStdVect(matrixValues));
|
Vect kernel = solver.Kernel(LoadMatrixFromStdVect(matrixValues));
|
||||||
|
|
||||||
|
result = PrintVect(kernel);
|
||||||
}
|
}
|
||||||
ImGui::SameLine(); // Align buttons horizontally
|
ImGui::SameLine(); // Align buttons horizontally
|
||||||
if (ImGui::Button("Calcul rang")) {
|
if (ImGui::Button("Calcul rang")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user