display kernel
All checks were successful
Linux arm64 / Build (push) Successful in 3m1s

This commit is contained in:
2024-05-11 15:56:18 +02:00
parent b41bcae337
commit 6833811b97

View File

@@ -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]);
}
}
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() {}
@@ -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")) {