|
@@ -1,30 +1,38 @@
|
|
|
#ifndef RESULTS_HPP
|
|
|
#define RESULTS_HPP
|
|
|
|
|
|
+#include <iostream>
|
|
|
#include "semigroup.hpp"
|
|
|
|
|
|
-struct Results{
|
|
|
+using namespace std;
|
|
|
+
|
|
|
+class Results{
|
|
|
+public:
|
|
|
size_t n[MAX_GENUS+1];
|
|
|
bool has_counter_example;
|
|
|
Semigroup S_counter_example;
|
|
|
+
|
|
|
+ void clear();
|
|
|
+ void add(const Results& res);
|
|
|
};
|
|
|
|
|
|
-void clear_results(Results& R);
|
|
|
-void add_results(Results& Rdest,const Results& Rsrc);
|
|
|
|
|
|
-inline void clear_results(Results& R){
|
|
|
- R.has_counter_example=false;
|
|
|
+inline
|
|
|
+void Results::clear(){
|
|
|
+ has_counter_example=false;
|
|
|
for(size_t g=0;g<=MAX_GENUS;++g){
|
|
|
- R.n[g]=0;
|
|
|
+ n[g]=0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-inline void add_results(Results& Rdest,const Results& Rsrc){
|
|
|
- if((not Rdest.has_counter_example) and Rsrc.has_counter_example){
|
|
|
- Rdest.S_counter_example=Rsrc.S_counter_example;
|
|
|
+inline
|
|
|
+void Results::add(const Results& res){
|
|
|
+ if((not has_counter_example) and res.has_counter_example){
|
|
|
+ S_counter_example=res.S_counter_example;
|
|
|
}
|
|
|
for(size_t g=0;g<=MAX_GENUS;++g){
|
|
|
- Rdest.n[g]+=Rsrc.n[g];
|
|
|
+ n[g]+=res.n[g];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
#endif
|