Class Paramita::Testing::PropagatorDummy¶
Inherits the following classes: Paramita::Propagator
Public Static Attributes inherited from Paramita::Propagator¶
| Type | Name |
|---|---|
| constexpr const char *const | m_interface_id = "Paramita::Propagator" |
Public Static Attributes inherited from Paramita::Plugin¶
See Paramita::Plugin
| Type | Name |
|---|---|
| constexpr const char *const | m_interface_id = "Paramita::Plugin" |
Public Functions¶
| Type | Name |
|---|---|
| virtual bool | check_found_model (const std::vector< int > & model) override Checks whether a candidate model is acceptable. |
| virtual std::vector< int > | get_external_clause () override Returns an external clause to be added to the solver. |
| virtual std::vector< int > | get_reason_clause (int propagated_lit) override Returns the reason clause for a propagated literal. |
| virtual bool | has_external_clause () override Indicates whether the propagator has an external clause to add. |
| virtual | on_assignment (const std::vector< int > & lits) override Notifies the propagator of newly assigned literals. |
| virtual | on_backtrack (std::size_t new_level) override Notifies the propagator that the solver has backtracked. |
| virtual | on_new_decision_level () override Notifies the propagator about a new decision level. |
| virtual std::vector< int > | propagate () override Performs external propagation. |
Public Functions inherited from Paramita::Propagator¶
| Type | Name |
|---|---|
| Propagator () = default |
|
| Propagator (const Propagator &) = delete Deleted copy constructor (pure interface). |
|
| Propagator (Propagator &&) = delete Deleted move constructor (pure interface). |
|
| virtual bool | check_found_model (const std::vector< int > & model) = 0 Checks whether a candidate model is acceptable. |
| virtual int | decide () Suggests the next branching literal. |
| virtual std::vector< int > | get_external_clause () = 0 Returns an external clause to be added to the solver. |
| virtual OutData::Value | get_out_data (const std::string & key) const |
| virtual std::vector< std::string > | get_out_data_keys () const |
| virtual std::vector< int > | get_reason_clause (int propagated_lit) Returns the reason clause for a propagated literal. |
| virtual bool | has_external_clause () = 0 Indicates whether the propagator has an external clause to add. |
| virtual | on_assignment (const std::vector< int > & lits) = 0 Notifies the propagator of newly assigned literals. |
| virtual | on_backtrack (std::size_t new_level) = 0 Notifies the propagator that the solver has backtracked. |
| virtual | on_new_decision_level () = 0 Notifies the propagator about a new decision level. |
| Propagator & | operator= (const Propagator & container) = delete Deleted copy assignment (pure interface). |
| Propagator & | operator= (Propagator &&) = delete Deleted move assignment (pure interface). |
| virtual std::vector< int > | propagate () Performs external propagation. |
| ~Propagator () override |
Public Functions inherited from Paramita::Plugin¶
See Paramita::Plugin
| Type | Name |
|---|---|
| Plugin () = default |
|
| Plugin (const Plugin &) = delete Deleted constructor (pure interface). |
|
| Plugin (Plugin &&) = delete Deleted constructor (pure interface). |
|
| virtual ParameterType | get (const std::string & name) Get the parameter's value. |
| virtual ParameterSpace | get_parameter_space () Get the parameter space for this class. |
| Plugin & | operator= (const Plugin & container) = delete Deleted constructor (pure interface). |
| Plugin & | operator= (Plugin &&) = delete Deleted constructor (pure interface). |
| virtual | set (const std::string & name, const ParameterType & value) Set a parameter. |
| virtual | ~Plugin () = default |
Public Functions Documentation¶
function check_found_model¶
Checks whether a candidate model is acceptable.
inline virtual bool Paramita::Testing::PropagatorDummy::check_found_model (
const std::vector< int > & model
) override
The solver calls this method when it has found a model.
Parameters:
modelThe candidate model.
Returns:
true if the model is accepted, false otherwise.
Implements Paramita::Propagator::check_found_model
function get_external_clause¶
Returns an external clause to be added to the solver.
inline virtual std::vector< int > Paramita::Testing::PropagatorDummy::get_external_clause () override
This method is called only if has_external_clause() returns true.
Returns:
The external clause.
Implements Paramita::Propagator::get_external_clause
function get_reason_clause¶
Returns the reason clause for a propagated literal.
inline virtual std::vector< int > Paramita::Testing::PropagatorDummy::get_reason_clause (
int propagated_lit
) override
The returned clause must justify the propagation of propagated_lit.
Parameters:
propagated_litThe propagated literal.
Returns:
The reason clause.
Implements Paramita::Propagator::get_reason_clause
function has_external_clause¶
Indicates whether the propagator has an external clause to add.
Returns:
true if an external clause is available, false otherwise.
Implements Paramita::Propagator::has_external_clause
function on_assignment¶
Notifies the propagator of newly assigned literals.
inline virtual Paramita::Testing::PropagatorDummy::on_assignment (
const std::vector< int > & lits
) override
The propagator should update its internal state to reflect the assignments.
Parameters:
litsThe literals assigned since the previous notification.
Implements Paramita::Propagator::on_assignment
function on_backtrack¶
Notifies the propagator that the solver has backtracked.
The propagator should restore its internal state to match the given decision level.
Parameters:
new_levelThe decision level after backtracking.
Implements Paramita::Propagator::on_backtrack
function on_new_decision_level¶
Notifies the propagator about a new decision level.
Implements Paramita::Propagator::on_new_decision_level
function propagate¶
Performs external propagation.
Returns:
A list of literals that should be propagated by the solver.
Implements Paramita::Propagator::propagate