pub struct HashTable(/* private fields */);
Expand description
A fixed-size hash table that maps clauses (sets of literals) to clause identifiers.
This should work exactly like the one used in drat-trim
.
Given that we expect the number of clauses in the hash table
not to exceed a couple million this should be faster and leaner than
DynamicHashTable.
Implementations§
Source§impl HashTable
impl HashTable
Sourcepub fn add_clause(&mut self, clause_db: &ClauseDatabase, clause: Clause)
pub fn add_clause(&mut self, clause_db: &ClauseDatabase, clause: Clause)
Add a new clause to the hashtable.
Sourcepub fn find_equal_clause(
&mut self,
clause_db: &ClauseDatabase,
needle: Clause,
delete: bool,
) -> Option<Clause>
pub fn find_equal_clause( &mut self, clause_db: &ClauseDatabase, needle: Clause, delete: bool, ) -> Option<Clause>
Find a clause that is equivalent to given clause.
If delete is true, delete the found clause.
Sourcepub fn clause_is_active(
&self,
clause_db: &ClauseDatabase,
needle: Clause,
) -> bool
pub fn clause_is_active( &self, clause_db: &ClauseDatabase, needle: Clause, ) -> bool
Return true if this exact clause is active.
Sourcepub fn delete_clause(
&mut self,
clause_db: &ClauseDatabase,
needle: Clause,
) -> bool
pub fn delete_clause( &mut self, clause_db: &ClauseDatabase, needle: Clause, ) -> bool
Delete this exact clause, return true if that succeeded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashTable
impl RefUnwindSafe for HashTable
impl Send for HashTable
impl Sync for HashTable
impl Unpin for HashTable
impl UnwindSafe for HashTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more