-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgvcsolution.h
More file actions
39 lines (33 loc) · 848 Bytes
/
gvcsolution.h
File metadata and controls
39 lines (33 loc) · 848 Bytes
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
#ifndef GVCSOLUTION_H
#define GVCSOLUTION_H
#include "solution.h"
#include "graph.h"
#include <string>
#include <iostream>
#include <cassert>
#include <vector>
#include <stdint.h>
#include <cstdlib>
using namespace std;
class GVCSolution : public Solution {
public:
GVCSolution(const unsigned int L, Graph*&);
int evaluate(); //returns the number of edges not covered by a vertex-cover
void random();
string toString() const;
void good();
GVCSolution& operator= (const string& str);
void flip(const unsigned int i) {
Solution::flip(i);
coord[i] = (coord[i] == 1)? 0:1;
key ^= rkey[i];
};
static int getKnownTarget(const unsigned int L) {
return L;
};
inline string getType() const { return "B.gvc"; }
private:
Graph *graph;
static bool brand();
};
#endif // GVCSOLUTION_H