pub struct MicroscopeReader {
pub headers: Mmap,
pub data: DataStore,
pub block_count: usize,
pub depth_ranges: [(u32, u32); 9],
}Expand description
High-performance memory-mapped reader for the Microscope index.
Fields§
§headers: Mmap§data: DataStore§block_count: usize§depth_ranges: [(u32, u32); 9]Implementations§
Source§impl MicroscopeReader
impl MicroscopeReader
pub fn open(config: &Config) -> Result<Self, String>
pub fn header(&self, i: usize) -> &BlockHeader
pub fn text(&self, i: usize) -> &str
Sourcepub fn look(
&self,
config: &Config,
x: f32,
y: f32,
z: f32,
zoom: u8,
k: usize,
) -> Vec<(f32, usize, bool)>
pub fn look( &self, config: &Config, x: f32, y: f32, z: f32, zoom: u8, k: usize, ) -> Vec<(f32, usize, bool)>
The MICROSCOPE: exact depth + spatial L2 search.
Sourcepub fn look_soft(
&self,
config: &Config,
x: f32,
y: f32,
z: f32,
zoom: u8,
k: usize,
zw: f32,
) -> Vec<(f32, usize, bool)>
pub fn look_soft( &self, config: &Config, x: f32, y: f32, z: f32, zoom: u8, k: usize, zw: f32, ) -> Vec<(f32, usize, bool)>
4D soft zoom search with SIMD.
Sourcepub fn radial_search(
&self,
config: &Config,
x: f32,
y: f32,
z: f32,
depth: u8,
radius: f32,
k: usize,
) -> ResultSet
pub fn radial_search( &self, config: &Config, x: f32, y: f32, z: f32, depth: u8, radius: f32, k: usize, ) -> ResultSet
Radial search: find all blocks within radius of (x, y, z) at a specific depth.
Returns a ResultSet with the closest match as primary and neighbors distance-weighted.
pub fn print_result(&self, i: usize, dist: f32)
Auto Trait Implementations§
impl Freeze for MicroscopeReader
impl RefUnwindSafe for MicroscopeReader
impl Send for MicroscopeReader
impl Sync for MicroscopeReader
impl Unpin for MicroscopeReader
impl UnsafeUnpin for MicroscopeReader
impl UnwindSafe for MicroscopeReader
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more