26 lines
661 B
C++
26 lines
661 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;
|
|
light * controller;
|
|
int id;
|
|
|
|
basesolver(int sid, light* light) : id(sid), controller(light) {}
|
|
~basesolver() {
|
|
printf("destru %dbase\n", id);
|
|
if (controller) {
|
|
controller = NULL;
|
|
}
|
|
}
|
|
};
|
|
|
|
#endif |