This is just a ClauseDatabase wrapper around a ClauseBuufer. More...
#include <ClauseDatabaseSingleBuffer.hpp>
Public Member Functions | |
ClauseDatabaseSingleBuffer ()=delete | |
Default Constructor deleted to enforce parameterized constructor. | |
ClauseDatabaseSingleBuffer (size_t bufferSize) | |
~ClauseDatabaseSingleBuffer () override=default | |
Virtual destructor. | |
bool | addClause (ClauseExchangePtr clause) override |
Adds a clause to the database. | |
size_t | giveSelection (std::vector< ClauseExchangePtr > &selectedCls, unsigned int literalCountLimit) override |
Selects clauses up to the specified total size. | |
void | getClauses (std::vector< ClauseExchangePtr > &v_cls) override |
Retrieves all clauses from the database. | |
bool | getOneClause (ClauseExchangePtr &cls) override |
Retrieves a single clause from the database. | |
size_t | getSize () const override |
Returns the current number of clauses in the database. | |
size_t | shrinkDatabase () override |
Shrinks the database by clearing all clauses. | |
void | clearDatabase () override |
Clears all clauses from the database. | |
Public Member Functions inherited from ClauseDatabase | |
ClauseDatabase () | |
Default Constructor. | |
virtual | ~ClauseDatabase () |
Virtual destructor to ensure proper cleanup of derived classes. | |
This is just a ClauseDatabase wrapper around a ClauseBuufer.
This class provides a simple implementation of the ClauseDatabase interface using a single ClauseBuffer for clause storage and management.
I wanted ClauseBuffer to not implement ClauseDatabase to make it easier to change(independent).
|
inlineoverridevirtual |
Adds a clause to the database.
clause | The clause to be added. |
Implements ClauseDatabase.
|
inlineoverridevirtual |
Clears all clauses from the database.
Implements ClauseDatabase.
|
inlineoverridevirtual |
Retrieves all clauses from the database.
v_cls | Vector to store the retrieved clauses. |
Implements ClauseDatabase.
|
inlineoverridevirtual |
Retrieves a single clause from the database.
cls | Shared pointer to store the retrieved clause. |
Implements ClauseDatabase.
|
inlineoverridevirtual |
Returns the current number of clauses in the database.
Implements ClauseDatabase.
|
inlineoverridevirtual |
Selects clauses up to the specified total size.
selectedCls | Vector to store the selected clauses. |
literalCountLimit | The maximum number of literals to select. |
Implements ClauseDatabase.
|
inlineoverridevirtual |
Shrinks the database by clearing all clauses.
Implements ClauseDatabase.