prepare for batch processing.

This commit is contained in:
Mark Thom
2018-01-28 23:25:39 -07:00
parent f72ad860c6
commit e148152eef
4 changed files with 18 additions and 5 deletions

View File

@@ -7,12 +7,21 @@ use std::rc::Rc;
pub type TabledData<T> = Rc<RefCell<HashSet<Rc<T>>>>;
#[derive(Clone, PartialEq, Eq)]
#[derive(Clone)]
pub struct TabledRc<T: Hash + Eq> {
atom: Rc<T>,
table: TabledData<T>
}
impl<T: Hash + Eq> PartialEq for TabledRc<T> {
fn eq(&self, other: &TabledRc<T>) -> bool
{
self.atom == other.atom
}
}
impl<T: Hash + Eq> Eq for TabledRc<T> {}
impl<T: Hash + Eq> Hash for TabledRc<T> {
fn hash<H: Hasher>(&self, state: &mut H)
{