pub struct MatchSet<Cfg: EGraphConfig> {
pub count: usize,
/* private fields */
}Expand description
Flat, stride-packed storage for all matches of a query.
Each variable kind occupies a single Vec with stride entries per match.
Stride = number of variables of that kind (from MatchShape).
Rest data lives in shared append-only pools; per-match spans are strided.
Fields§
§count: usizeImplementations§
Source§impl<Cfg: EGraphConfig> MatchSet<Cfg>
impl<Cfg: EGraphConfig> MatchSet<Cfg>
pub fn new(shape: &MatchShape) -> Self
Sourcepub fn empty() -> Self
pub fn empty() -> Self
A shapeless set (every stride zero); given a real shape by
Self::reshape before first use. What lets one warm store serve
queries of different shapes across a whole saturation.
Sourcepub fn reshape(&mut self, shape: &MatchShape)
pub fn reshape(&mut self, shape: &MatchShape)
Adopt a query’s shape: set the strides and drop stored matches, keeping every flat allocation (the warm-reuse discipline across queries).
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn get_node(&self, v: VarId, j: usize) -> Cfg::G
pub fn get_mult(&self, v: MultVarId, j: usize) -> Cfg::M
pub fn get_lit_val(&self, v: LitValVarId, j: usize) -> Cfg::V
pub fn set_node(&mut self, v: VarId, j: usize, val: Cfg::G)
pub fn set_mult(&mut self, v: MultVarId, j: usize, val: Cfg::M)
pub fn seq_slice(&self, v: SeqVarId, j: usize) -> &[Cfg::G]
pub fn set_slice(&self, v: SetVarId, j: usize) -> &[Cfg::G]
pub fn mset_slice(&self, v: MsetVarId, j: usize) -> &[Cfg::C]
Auto Trait Implementations§
impl<Cfg> Freeze for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: Freeze,
Vec<<Cfg as EGraphConfig>::M>: Freeze,
Vec<<Cfg as EGraphConfig>::V>: Freeze,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: Freeze,
Vec<<Cfg as EGraphConfig>::C>: Freeze,
impl<Cfg> RefUnwindSafe for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: RefUnwindSafe,
Vec<<Cfg as EGraphConfig>::M>: RefUnwindSafe,
Vec<<Cfg as EGraphConfig>::V>: RefUnwindSafe,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: RefUnwindSafe,
Vec<<Cfg as EGraphConfig>::C>: RefUnwindSafe,
impl<Cfg> Send for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: Send,
Vec<<Cfg as EGraphConfig>::M>: Send,
Vec<<Cfg as EGraphConfig>::V>: Send,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: Send,
Vec<<Cfg as EGraphConfig>::C>: Send,
impl<Cfg> Sync for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: Sync,
Vec<<Cfg as EGraphConfig>::M>: Sync,
Vec<<Cfg as EGraphConfig>::V>: Sync,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: Sync,
Vec<<Cfg as EGraphConfig>::C>: Sync,
impl<Cfg> Unpin for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: Unpin,
Vec<<Cfg as EGraphConfig>::M>: Unpin,
Vec<<Cfg as EGraphConfig>::V>: Unpin,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: Unpin,
Vec<<Cfg as EGraphConfig>::C>: Unpin,
impl<Cfg> UnsafeUnpin for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: UnsafeUnpin,
Vec<<Cfg as EGraphConfig>::M>: UnsafeUnpin,
Vec<<Cfg as EGraphConfig>::V>: UnsafeUnpin,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: UnsafeUnpin,
Vec<<Cfg as EGraphConfig>::C>: UnsafeUnpin,
impl<Cfg> UnwindSafe for MatchSet<Cfg>where
Vec<<Cfg as EGraphConfig>::G>: UnwindSafe,
Vec<<Cfg as EGraphConfig>::M>: UnwindSafe,
Vec<<Cfg as EGraphConfig>::V>: UnwindSafe,
Vec<(<Cfg as EGraphConfig>::Index, <Cfg as EGraphConfig>::Index)>: UnwindSafe,
Vec<<Cfg as EGraphConfig>::C>: UnwindSafe,
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