[−][src]Struct rate_common::parser::HashTable
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.
Methods
impl HashTable
[src]
pub fn new() -> HashTable
[src]
Allocate the hash table.
pub fn add_clause(&mut self, clause_db: &ClauseDatabase, clause: Clause)
[src]
Add a new clause to the hashtable.
pub fn find_equal_clause(
&mut self,
clause_db: &ClauseDatabase,
needle: Clause,
delete: bool
) -> Option<Clause>
[src]
&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.
pub fn clause_is_active(
&self,
clause_db: &ClauseDatabase,
needle: Clause
) -> bool
[src]
&self,
clause_db: &ClauseDatabase,
needle: Clause
) -> bool
Return true if this exact clause is active.
pub fn delete_clause(
&mut self,
clause_db: &ClauseDatabase,
needle: Clause
) -> bool
[src]
&mut self,
clause_db: &ClauseDatabase,
needle: Clause
) -> bool
Delete this exact clause, return true if that succeeded.
Trait Implementations
impl HeapSpace for HashTable
[src]
fn heap_space(&self) -> usize
[src]
impl<'a> IntoIterator for &'a HashTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for HashTable
impl Send for HashTable
impl Sync for HashTable
impl Unpin for HashTable
impl UnwindSafe for HashTable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> HeapSpace for T where
T: Copy,
[src]
T: Copy,
fn heap_space(&Self) -> usize
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,