Skip to content

Commit 33ebf86

Browse files
authored
fix teaser from being broken by pmc upgrade (#199)
1 parent e5441de commit 33ebf86

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

teaser/src/graph.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
#include "teaser/graph.h"
1010
#include "pmc/pmc.h"
1111

12-
vector<int> teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) {
12+
std::vector<int> teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) {
1313

1414
// Handle deprecated field
1515
if (!params_.solve_exactly) {
1616
params_.solver_mode = CLIQUE_SOLVER_MODE::PMC_HEU;
1717
}
1818

1919
// Create a PMC graph from the TEASER graph
20-
vector<int> edges;
21-
vector<long long> vertices;
20+
std::vector<int> edges;
21+
std::vector<long long> vertices;
2222
vertices.push_back(edges.size());
2323

2424
const auto all_vertices = graph.getVertices();
@@ -52,7 +52,7 @@ vector<int> teaser::MaxCliqueSolver::findMaxClique(teaser::Graph graph) {
5252
in.vertex_search_order = "deg";
5353

5454
// vector to represent max clique
55-
vector<int> C;
55+
std::vector<int> C;
5656

5757
// upper-bound of max clique
5858
G.compute_cores();

test/teaser/graph-test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pmc::input generateMockInput() {
4747
* @param adj a bool** to the adjcency matrix
4848
* @param nodes number of nodes in the graph
4949
*/
50-
void printAdjMatirx(const std::vector<std::vector<bool>>& adj, int nodes) {
50+
void printAdjMatirx(const std::vector<std::vector<pmc::bool_wrapper>>& adj, int nodes) {
5151
std::cout << "Adjacency matrix: " << std::endl;
5252
for (auto& i : adj) {
5353
for (auto j : i) {
@@ -158,7 +158,7 @@ TEST(PMCTest, FindMaximumClique1) {
158158
}
159159

160160
// lower-bound of max clique
161-
vector<int> C;
161+
std::vector<int> C;
162162
if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input
163163
pmc::pmc_heu maxclique(G, in);
164164
in.lb = maxclique.search(G, C);
@@ -202,7 +202,7 @@ TEST(PMCTest, FindMaximumClique2) {
202202
}
203203

204204
// lower-bound of max clique
205-
vector<int> C;
205+
std::vector<int> C;
206206
if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input
207207
pmc::pmc_heu maxclique(G, in);
208208
in.lb = maxclique.search(G, C);
@@ -245,7 +245,7 @@ TEST(PMCTest, FindMaximumClique3) {
245245
}
246246

247247
// lower-bound of max clique
248-
vector<int> C;
248+
std::vector<int> C;
249249
if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input
250250
pmc::pmc_heu maxclique(G, in);
251251
in.lb = maxclique.search(G, C);
@@ -335,7 +335,7 @@ TEST(PMCTest, FindMaximumCliqueSingleThreaded) {
335335
}
336336

337337
// lower-bound of max clique
338-
vector<int> C;
338+
std::vector<int> C;
339339
if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input
340340
pmc::pmc_heu maxclique(G, in);
341341
in.lb = maxclique.search(G, C);
@@ -387,7 +387,7 @@ TEST(PMCTest, FindMaximumCliqueMultiThreaded) {
387387
}
388388

389389
// lower-bound of max clique
390-
vector<int> C;
390+
std::vector<int> C;
391391
if (in.lb == 0 && in.heu_strat != "0") { // skip if given as input
392392
pmc::pmc_heu maxclique(G, in);
393393
in.lb = maxclique.search(G, C);

0 commit comments

Comments
 (0)