-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cc
More file actions
61 lines (44 loc) · 1.32 KB
/
Copy pathmain.cc
File metadata and controls
61 lines (44 loc) · 1.32 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "src/lib.h"
#include <iostream>
void foo (int rows, int cols, int *row_num, int *row_den, int *col_num, int *col_den) {
game Game;
init_game(&Game,
rows, cols,
row_num, row_den,
col_num, col_den);
long long row_data[rows + 2];
long long col_data[cols + 2];
solve(&Game, row_data, col_data);
for (int i = 0; i < rows + 2; ++i) {
std::cout << row_data[i] << ", ";
}
std::cout << std::endl;
for (int i = 0; i < cols + 2; ++i) {
std::cout << col_data[i] << ", ";
}
std::cout << std::endl;
}
int main()
{
/*
This file is simply a test of the solve function that will be exposed to Surskit (https://www.baskuit.com/surskit) for the purpose of MatrixUCB and other search algorithms.
*/
const int rows = 2;
const int cols = 2;
int row_num1[4] = {1, 0, 0, 1};
int row_den1[4] = {2, 1, 1, 1};
int col_num1[4] = {1, 1, 1, 0};
int col_den1[4] = {1, 1, 1, 1};
foo(rows, cols, row_num1, row_den1, col_num1, col_den1);
int row_num2[4] = {1, 0, 0, 1};
int row_den2[4] = {1, 1, 1, 1};
int col_num2[4] = {0, 1, 1, 0};
int col_den2[4] = {1, 1, 1, 1};
foo(rows, cols, row_num2, row_den2, col_num2, col_den2);
int row_num3[4] = {1, 0, 0, 1};
int row_den3[4] = {2, 1, 1, 1};
int col_num3[4] = {1, 1, 1, 0};
int col_den3[4] = {2, 1, 1, 1};
foo(rows, cols, row_num3, row_den3, col_num3, col_den3);
return 0;
}