[][src]Struct mih_rs::mih::Index

pub struct Index<'db> { /* fields omitted */ }

An index implementation of MIH.

Implementations

impl<'_> Index<'_>[src]

pub fn new<'db>(codes: &'db [u64]) -> Result<Index, Error>[src]

Constructs the index from 64-bit codes. If invalid inputs are given, return ErrorKind::InvalidInput.

pub fn new_with_blocks<'db>(
    codes: &'db [u64],
    blocks: usize
) -> Result<Index, Error>
[src]

Constructs the index from 64-bit codes using manual parameter of blocks. If invalid inputs are given, return ErrorKind::InvalidInput.

Finds the neighbor codes whose Hamming distances to qcode are within radius. Returns the ids of the neighbor codes.

pub fn range_search_with_buf(
    &self,
    qcode: u64,
    radius: usize,
    answers: &mut Vec<usize>
)
[src]

Finds the neighbor codes whose Hamming distances to qcode are within radius. The ids of the neighbor codes are stored in answers.

Finds the topk codes that are closest to qcode. Returns the ids of the topk codes.

pub fn topk_search_with_buf(
    &self,
    qcode: u64,
    topk: usize,
    answers: &mut Vec<usize>
)
[src]

Finds the topk codes that are closest to qcode. The ids of the topk codes are stored in answers.

Auto Trait Implementations

impl<'db> RefUnwindSafe for Index<'db>

impl<'db> Send for Index<'db>

impl<'db> Sync for Index<'db>

impl<'db> Unpin for Index<'db>

impl<'db> UnwindSafe for Index<'db>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.