You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
317 B
C++
18 lines
317 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
using Clause = std::vector<int>; // makes it nicer to read
|
|
|
|
class KCNF {
|
|
public:
|
|
long n = 0;
|
|
long k = 0;
|
|
std::vector<Clause> clauses;
|
|
|
|
static KCNF generate_random(long n, long c, long k);
|
|
|
|
bool write_dimacs(const std::string& filename) const;
|
|
};
|