cloud-sat/workers/basesolver.hpp
2022-08-31 17:18:00 +08:00

28 lines
730 B
C++

#ifndef _basesolver_hpp_INCLUDED
#define _basesolver_hpp_INCLUDED
#include "../light.hpp"
#include "../utils/vec.hpp"
class basesolver {
public:
virtual void parse_dimacs(char* filename) = 0;
virtual void import_original_clause(preprocess* pre) = 0;
virtual void diversity(int id) = 0;
virtual int solve() = 0;
virtual void terminate() = 0;
virtual void get_model(vec<int> &model) = 0;
virtual int get_reset_data() = 0;
virtual void reset() = 0;
light * controller;
int id;
basesolver(int sid, light* light) : id(sid), controller(light) {}
~basesolver() {
printf("destru %dbase\n", id);
if (controller) {
controller = NULL;
}
}
};
#endif