#ifndef RESULTS_HPP #define RESULTS_HPP #include "semigroup.hpp" struct Results{ size_t n1[MAX_GENUS+1]; size_t n2[MAX_GENUS+1]; bool has_counter_example; Semigroup S_counter_example; }; void clear_results(Results& R); void add_results(Results& Rdest,const Results& Rsrc); inline void clear_results(Results& R){ R.has_counter_example=false; for(size_t g=0;g<=MAX_GENUS;++g){ R.n1[g]=0; R.n2[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; } for(size_t g=0;g<=MAX_GENUS;++g){ Rdest.n1[g]+=Rsrc.n1[g]; Rdest.n2[g]+=Rsrc.n2[g]; } } #endif