pub enum Bits {
One,
Four,
}Expand description
How many bits a coordinate is rounded to.
Variants§
One
The sign, which is 96 bytes for a 768 dimensional vector.
Four
Sixteen levels, which is 384 bytes for the same vector and about a quarter of the error.
Implementations§
Source§impl Bits
impl Bits
Sourcepub fn count(self) -> usize
pub fn count(self) -> usize
How many bits one coordinate takes, which is also how many planes a code is written in.
Sourcepub fn query_bits(self) -> usize
pub fn query_bits(self) -> usize
How many bits a query is quantised to before it is scanned against codes this wide.
Four bits either side is what RaBitQ specifies, and it is right for a one bit code and wrong for a four bit one, because a four bit code is ten times more accurate and a four bit query is not. Eight is what puts the query’s error back under the code’s, and the cost is four more ANDs and four more popcounts per word on the path that was already paying for four times the bytes.
Trait Implementations§
impl Copy for Bits
impl Eq for Bits
impl StructuralPartialEq for Bits
Auto Trait Implementations§
impl Freeze for Bits
impl RefUnwindSafe for Bits
impl Send for Bits
impl Sync for Bits
impl Unpin for Bits
impl UnsafeUnpin for Bits
impl UnwindSafe for Bits
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