pub struct Q42TensorVolume<'a> { /* private fields */ }Expand description
Zero-heap tensor volume backed by caller-owned storage.
Implementations§
Source§impl<'a> Q42TensorVolume<'a>
impl<'a> Q42TensorVolume<'a>
Sourcepub fn new(
nquins: &'a mut [NQuin],
tensor_metadata: &'a mut [TensorMetadata],
) -> Result<Self, TensorVolumeError>
pub fn new( nquins: &'a mut [NQuin], tensor_metadata: &'a mut [TensorMetadata], ) -> Result<Self, TensorVolumeError>
Create a new tensor volume over caller-supplied storage.
Sourcepub fn with_config(
nquins: &'a mut [NQuin],
tensor_metadata: &'a mut [TensorMetadata],
config: TensorVolumeConfig,
) -> Result<Self, TensorVolumeError>
pub fn with_config( nquins: &'a mut [NQuin], tensor_metadata: &'a mut [TensorMetadata], config: TensorVolumeConfig, ) -> Result<Self, TensorVolumeError>
Create a new tensor volume with specific configuration.
Sourcepub fn as_view(&self) -> Q42TensorView<'_>
pub fn as_view(&self) -> Q42TensorView<'_>
Borrow this volume as a zero-heap query view.
Sourcepub fn add_nquin_with_tensor(
&mut self,
nquin: NQuin,
tensor: Tensor10D,
) -> Result<usize, TensorVolumeError>
pub fn add_nquin_with_tensor( &mut self, nquin: NQuin, tensor: Tensor10D, ) -> Result<usize, TensorVolumeError>
Add an NQuin to the volume with tensor coordinates.
Sourcepub fn add_nquin(&mut self, nquin: NQuin) -> Result<usize, TensorVolumeError>
pub fn add_nquin(&mut self, nquin: NQuin) -> Result<usize, TensorVolumeError>
Add an NQuin to the volume without tensor coordinates.
Sourcepub fn get_tensor_metadata(&self, index: usize) -> Option<&TensorMetadata>
pub fn get_tensor_metadata(&self, index: usize) -> Option<&TensorMetadata>
Get tensor metadata for an NQuin by index.
pub fn config(&self) -> &TensorVolumeConfig
pub fn update_config(&mut self, config: TensorVolumeConfig)
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn tensor_count(&self) -> usize
pub fn get_tensorized_nquins_into<'b>( &'b self, out: &mut [TensorizedEntry<'b>], ) -> Result<usize, TensorVolumeError>
pub fn visit_tensorized_nquins<F>( &self, on_entry: F, ) -> Result<(), TensorVolumeError>
pub fn tensor_search_into( &self, query: &Tensor10D, max_distance: f32, out: &mut [usize], ) -> Result<usize, TensorVolumeError>
pub fn visit_tensor_search<F>( &self, query: &Tensor10D, max_distance: f32, on_match: F, ) -> Result<(), TensorVolumeError>
pub fn temporal_query_into( &self, target_t: f32, tolerance: f32, out: &mut [usize], ) -> Result<usize, TensorVolumeError>
pub fn visit_temporal_query<F>( &self, target_t: f32, tolerance: f32, on_match: F, ) -> Result<(), TensorVolumeError>
pub fn manifold_query_into( &self, target_w: f32, max_distance: f32, out: &mut [usize], ) -> Result<usize, TensorVolumeError>
pub fn visit_manifold_query<F>( &self, target_w: f32, max_distance: f32, on_match: F, ) -> Result<(), TensorVolumeError>
Auto Trait Implementations§
impl<'a> Freeze for Q42TensorVolume<'a>
impl<'a> RefUnwindSafe for Q42TensorVolume<'a>
impl<'a> Send for Q42TensorVolume<'a>
impl<'a> Sync for Q42TensorVolume<'a>
impl<'a> Unpin for Q42TensorVolume<'a>
impl<'a> UnsafeUnpin for Q42TensorVolume<'a>
impl<'a> !UnwindSafe for Q42TensorVolume<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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