A clause database that organizes clauses based on their size.
More...
#include <ClauseDatabasePerSize.hpp>
|
|
| ClauseDatabasePerSize ()=delete |
| | Default constructor deleted to enforce use of parameterized constructor.
|
| |
| | ClauseDatabasePerSize (int maxClauseSize) |
| | Constructor with a specified maximum clause size.
|
| |
|
| ~ClauseDatabasePerSize () |
| | Virtual destructor.
|
| |
| bool | addClause (ClauseExchangePtr clause) override |
| | Adds a clause to the appropriate size-based buffer.
|
| |
| size_t | giveSelection (std::vector< ClauseExchangePtr > &selectedCls, unsigned int literalCountLimit) override |
| | Selects clauses up to a specified total size.
|
| |
| void | getClauses (std::vector< ClauseExchangePtr > &v_cls) override |
| | Retrieves all clauses from all size-based buffers.
|
| |
| bool | getOneClause (ClauseExchangePtr &cls) override |
| | Retrieves the smallest clause from the database.
|
| |
| size_t | getSize () const override |
| | Gets the total number of clauses across all size-based buffers.
|
| |
| size_t | shrinkDatabase () override |
| | Does nothing in this implementation.
|
| |
| void | clearDatabase () override |
| | Clears all size-based buffers.
|
| |
|
| ClauseDatabase () |
| | Default Constructor.
|
| |
|
virtual | ~ClauseDatabase () |
| | Virtual destructor to ensure proper cleanup of derived classes.
|
| |
|
|
size_t | initLiteralCount |
| | Initial literal count used for buffer sizing.
|
| |
|
int | maxClauseSize |
| | The maximum clause size accepted in this clause database.
|
| |
A clause database that organizes clauses based on their size.
This class implements the ClauseDatabase interface, storing clauses in separate buffers based on their size.
- Todo
- resize by changing maxClauseSize for dynamically managing the maximum size
◆ ClauseDatabasePerSize()
| ClauseDatabasePerSize::ClauseDatabasePerSize |
( |
int | maxClauseSize | ) |
|
|
explicit |
Constructor with a specified maximum clause size.
- Parameters
-
| maxClauseSize | The maximum size of clauses to be stored. |
◆ addClause()
| bool ClauseDatabasePerSize::addClause |
( |
ClauseExchangePtr | clause | ) |
|
|
overridevirtual |
Adds a clause to the appropriate size-based buffer.
- Parameters
-
| clause | The clause to be added. |
- Returns
- true if the clause was successfully added, false otherwise.
Implements ClauseDatabase.
◆ clearDatabase()
| void ClauseDatabasePerSize::clearDatabase |
( |
| ) |
|
|
overridevirtual |
◆ getClauses()
| void ClauseDatabasePerSize::getClauses |
( |
std::vector< ClauseExchangePtr > & | v_cls | ) |
|
|
overridevirtual |
Retrieves all clauses from all size-based buffers.
- Parameters
-
| v_cls | Vector to store the retrieved clauses. |
Implements ClauseDatabase.
◆ getOneClause()
| bool ClauseDatabasePerSize::getOneClause |
( |
ClauseExchangePtr & | cls | ) |
|
|
overridevirtual |
Retrieves the smallest clause from the database.
- Parameters
-
| cls | Reference to store the retrieved clause. |
- Returns
- true if a clause was retrieved, false if all buffers are empty.
Implements ClauseDatabase.
◆ getSize()
| size_t ClauseDatabasePerSize::getSize |
( |
| ) |
const |
|
overridevirtual |
Gets the total number of clauses across all size-based buffers.
- Returns
- The total number of clauses.
Implements ClauseDatabase.
◆ giveSelection()
| size_t ClauseDatabasePerSize::giveSelection |
( |
std::vector< ClauseExchangePtr > & | selectedCls, |
|
|
unsigned int | literalCountLimit ) |
|
overridevirtual |
Selects clauses up to a specified total size.
- Parameters
-
| selectedCls | Vector to store the selected clauses. |
| literalCountLimit | The maximum literals count to select. |
- Returns
- The number of literals in the selected clauses.
Implements ClauseDatabase.
◆ shrinkDatabase()
| size_t ClauseDatabasePerSize::shrinkDatabase |
( |
| ) |
|
|
inlineoverridevirtual |
Does nothing in this implementation.
- Returns
- The maximum size_t value.
Implements ClauseDatabase.
The documentation for this class was generated from the following file: