-
Notifications
You must be signed in to change notification settings - Fork 40
/
dancing_link.h
43 lines (31 loc) · 857 Bytes
/
dancing_link.h
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
40
41
42
43
#ifndef DANCING_LINK_H
#define DANCING_LINK_H
#include <string>
#include <vector>
#include <limits>
#include <stdio.h>
#include <numeric>
#include <iostream>
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
namespace py = pybind11;
using namespace pybind11::literals;
using namespace std;
class Object {
public:
Object *l, *r, *u, *d, *c;
};
class DataObject : public Object {
public:
int r_idx;
};
class ColumnObject : public Object {
public:
int s;
string name;
};
py::list get_combinations_nosplit(py::array_t<uint8_t, py::array::c_style | py::array::forcecast> arr,
py::array_t<uint8_t, py::array::c_style | py::array::forcecast> mask);
py::list get_combinations_recursive(py::array_t<uint8_t, py::array::c_style | py::array::forcecast> arr,
py::array_t<uint8_t, py::array::c_style | py::array::forcecast> target);
#endif