This commit is contained in:
@@ -1,17 +1,21 @@
|
|||||||
#include "Solver.h"
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "Solver.h"
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::string path = "test";
|
std::string path = "test";
|
||||||
for (const auto& entry : fs::directory_iterator(path)) {
|
for (const auto& entry : fs::directory_iterator(path)) {
|
||||||
std::string fileName = entry.path().string();
|
std::string fileName = entry.path().string();
|
||||||
|
|
||||||
std::cout << "Opening " << fileName << " ...\n";
|
std::cout << "Opening " << fileName << " ...\n";
|
||||||
|
|
||||||
std::ifstream in{fileName};
|
std::ifstream in{fileName};
|
||||||
|
|
||||||
Matrix mat{1, 1}, imageMat{1, 1}, noyauMat{1, 1};
|
Matrix mat{1, 1}, imageMat{1, 1}, noyauMat{1, 1};
|
||||||
in >> mat >> imageMat >> noyauMat;
|
in >> mat >> imageMat >> noyauMat;
|
||||||
|
|
||||||
@@ -19,6 +23,7 @@ int main() {
|
|||||||
Vect noyau{noyauMat};
|
Vect noyau{noyauMat};
|
||||||
|
|
||||||
Solver solver{mat};
|
Solver solver{mat};
|
||||||
|
|
||||||
assert(solver.Image() == image);
|
assert(solver.Image() == image);
|
||||||
assert(solver.Noyau() == noyau);
|
assert(solver.Noyau() == noyau);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user