Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can take one result and finish the program? #1

Open
crptcusco opened this issue Feb 28, 2019 · 3 comments
Open

How can take one result and finish the program? #1

crptcusco opened this issue Feb 28, 2019 · 3 comments

Comments

@crptcusco
Copy link

I only need one result when use the HS-solver, we use the PRS Algorithm, how i can take one result and finish the program?

@agdphd
Copy link
Member

agdphd commented Feb 28, 2019

It's been a while since I looked at this code, but as I read things, the easiest thing would probably be to add an early exit to extend_or_confirm_set (around [1]) to stop looking for MHSes when you've found one. Specifically, something like if (hitting_sets.approx_size() > 0) {return;} should do the job.

[1] https://github.com/VeraLiconaResearchGroup/Minimal-Hitting-Set-Algorithms/blob/master/src/rs.cpp#L121

@crptcusco
Copy link
Author

i do the change but when execute "make -j" say this

g++ -MD --std=c++14 -fPIC -fopenmp -Wall -O3 -Iinclude -o src/rs.o -c src/rs.cpp
src/rs.cpp: In member function ‘void agdmhs::RSAlgorithm::extend_or_confirm_set(const agdmhs::Hypergraph&, const agdmhs::Hypergraph&, agdmhs::RSCounters&,
agdmhs::Hypergraph::EdgeQueue&, agdmhs::Hypergraph::Edge&, agdmhs::Hypergraph&, agdmhs::Hypergraph::Edge&, const Edge&) const’:
src/rs.cpp:123:19: error: ‘using EdgeQueue = class moodycamel::ConcurrentQueue<boost::dynamic_bitset<> > {aka class moodycamel::ConcurrentQueue<boost::dynamic_bitset<> >}’ has no member named ‘approx_size’
if (hitting_sets.approx_size() > 0) {return;}
^~~~~~~~~~~
Makefile:54: recipe for target 'src/rs.o' failed
make: *** [src/rs.o] Error 1

@agdphd
Copy link
Member

agdphd commented Mar 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants