-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new flaw type and update related files
- Loading branch information
1 parent
ea02c36
commit 9fa308a
Showing
6 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include "flaw.hpp" | ||
|
||
namespace ratio | ||
{ | ||
class exact_one_flaw : public flaw | ||
{ | ||
public: | ||
exact_one_flaw(solver &s, std::vector<std::reference_wrapper<resolver>> &&causes, std::vector<utils::lit> &&lits) noexcept; | ||
|
||
[[nodiscard]] const std::vector<utils::lit> &get_lits() const noexcept { return lits; } | ||
|
||
private: | ||
void compute_resolvers() override; | ||
|
||
private: | ||
std::vector<utils::lit> lits; | ||
}; | ||
} // namespace ratio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <cassert> | ||
#include "exact_one_flaw.hpp" | ||
#include "solver.hpp" | ||
|
||
namespace ratio | ||
{ | ||
exact_one_flaw::exact_one_flaw(solver &s, std::vector<std::reference_wrapper<resolver>> &&causes, std::vector<utils::lit> &&lits) noexcept : flaw(s, std::move(causes)), lits(lits) | ||
{ | ||
assert(!lits.empty()); | ||
} | ||
|
||
void exact_one_flaw::compute_resolvers() | ||
{ | ||
throw std::runtime_error("Not implemented yet"); | ||
} | ||
} // namespace ratio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters