-
Notifications
You must be signed in to change notification settings - Fork 7
/
main_mmrg_inputFile.cc
125 lines (96 loc) · 3.93 KB
/
main_mmrg_inputFile.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// main_for_mmrg_input.cc
// main program to test LatMRG execution
// on an external input file for MMRG
//
// Include Header
#include <iostream>
#include <map>
#include <fstream>
#include <iterator>
#include <string>
#include <sstream>
#include <iomanip>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
// Include LatticeTester Header
/*
#include "latticetester/Util.h"
#include "latticetester/Const.h"
#include "latticetester/Types.h"
#include "latticetester/IntFactor.h"
#include "latticetester/IntLatticeBasis.h"
#include "latticetester/Reducer.h"
#include "latticetester/Types.h"
#include "latticetester/ParamReader.h"
#include "latticetester/LatticeTesterConfig.h"
#include "latticetester/LatticeAnalysis.h"
*/
// Include LatMRG Header
#include "latmrg/LatTestAll.h"
// Include NTL Header
#include <NTL/tools.h>
#include <NTL/ctools.h>
#include <NTL/ZZ.h>
#include <NTL/ZZ_p.h>
#include "NTL/vec_ZZ.h"
#include "NTL/vec_ZZ_p.h"
#include <NTL/vec_vec_ZZ.h>
#include <NTL/vec_vec_ZZ_p.h>
#include <NTL/mat_ZZ.h>
#include <NTL/matrix.h>
#include <NTL/LLL.h>
// Include Boost Header
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/progress.hpp>
// Include Random Generator of MRG Matrix an tools
//#include "SimpleMRG.h"
//#include "Tools.h"
using namespace std;
using namespace NTL;
using namespace LatMRG;
//==========================================================================
#if 0
int main ()
{
// Erwan
//string testLocation = "ton_path_vers_dossier_input_files_latmrg";
//string testLocation = "/Users/Erwan1/projects/github/LatMRG/inputTestFiles/lacunaryMRG_test1";
//string testLocation = "/Users/Erwan1/projects/github/LatMRG/inputTestFiles/latZZDD_test2";
//string testLocation = "/Users/Erwan1/projects/github/LatMRG/inputTestFiles/lacunaryMRG_test1";
//string testLocation = "/Users/Erwan1/projects/github/LatMRG/inputTestFiles/mmrg_test2";
// Paul
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/latZZDD_test1";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/latZZDD_test2";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/lacunaryMRG_test1";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/lacunaryMRG_test2";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/lacunaryMRG_test3";
string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/lacunaryMMRG_test1";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test1";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test2";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test2_bis";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test3";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test4";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test5";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test6";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test7";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mmrg_test9";
//string testLocation = "/Users/paulwambergue/UdeM/latmrg/inputTestFiles/mrg_order2_test1";
struct stat buf; // properties of a file or directory
LatTestAll testall;
int status = 0;
stat(testLocation.c_str(), &buf);
if (0 != S_ISDIR(buf.st_mode)) //directory
status |= testall.doTestDir (testLocation.c_str());
else { //file
string dataname(testLocation.c_str());
dataname.append(".dat");
stat(dataname.c_str(), &buf);
status |= testall.doTest (testLocation.c_str());
}
return status;
}
#endif