Skip to main content

IdxTable

Trait IdxTable 

Source
pub trait IdxTable:
    Any
    + Send
    + Sync {
    // Required methods
    fn new_empty(&self) -> Box<dyn IdxTable>;
    fn reserve(&mut self, additional: usize);
    fn num_keys(&self) -> IdxSize;
    fn insert_keys(&mut self, keys: &HashKeys, track_unmatchable: bool);
    unsafe fn insert_keys_subset(
        &mut self,
        keys: &HashKeys,
        subset: &[IdxSize],
        track_unmatchable: bool,
    );
    fn probe(
        &self,
        hash_keys: &HashKeys,
        table_match: &mut Vec<IdxSize>,
        probe_match: &mut Vec<IdxSize>,
        mark_matches: bool,
        emit_unmatched: bool,
        limit: IdxSize,
    ) -> IdxSize;
    unsafe fn probe_subset(
        &self,
        hash_keys: &HashKeys,
        subset: &[IdxSize],
        table_match: &mut Vec<IdxSize>,
        probe_match: &mut Vec<IdxSize>,
        mark_matches: bool,
        emit_unmatched: bool,
        limit: IdxSize,
    ) -> IdxSize;
    fn unmarked_keys(
        &self,
        out: &mut Vec<IdxSize>,
        offset: IdxSize,
        limit: IdxSize,
    ) -> IdxSize;
}

Required Methods§

Source

fn new_empty(&self) -> Box<dyn IdxTable>

Creates a new empty IdxTable similar to this one.

Source

fn reserve(&mut self, additional: usize)

Reserves space for the given number additional keys.

Source

fn num_keys(&self) -> IdxSize

Returns the number of unique keys in this IdxTable.

Source

fn insert_keys(&mut self, keys: &HashKeys, track_unmatchable: bool)

Inserts the given keys into this IdxTable.

Source

unsafe fn insert_keys_subset( &mut self, keys: &HashKeys, subset: &[IdxSize], track_unmatchable: bool, )

Inserts a subset of the given keys into this IdxTable.

§Safety

The provided subset indices must be in-bounds.

Source

fn probe( &self, hash_keys: &HashKeys, table_match: &mut Vec<IdxSize>, probe_match: &mut Vec<IdxSize>, mark_matches: bool, emit_unmatched: bool, limit: IdxSize, ) -> IdxSize

Probe the table, adding an entry to table_match and probe_match for each match. Will stop processing new keys once limit matches have been generated, returning the number of keys processed.

If mark_matches is true, matches are marked in the table as such.

If emit_unmatched is true, for keys that do not have a match we emit a match with ChunkId::null() on the table match.

Source

unsafe fn probe_subset( &self, hash_keys: &HashKeys, subset: &[IdxSize], table_match: &mut Vec<IdxSize>, probe_match: &mut Vec<IdxSize>, mark_matches: bool, emit_unmatched: bool, limit: IdxSize, ) -> IdxSize

The same as probe, except it will only apply to the specified subset of keys.

§Safety

The provided subset indices must be in-bounds.

Source

fn unmarked_keys( &self, out: &mut Vec<IdxSize>, offset: IdxSize, limit: IdxSize, ) -> IdxSize

Get the ChunkIds for each key which was never marked during probing.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§