pub struct PerImageEvalStore { /* private fields */ }Expand description
Sparse (k, a, i) -> PerImageEval store backing the streaming
evaluator.
Cells absent from the store represent the same “no detections, no
non-ignore GTs” condition as None entries in the batch
crate::EvalGrid::eval_imgs. Self::flatten re-densifies the
store into the dense Vec<Option<PerImageEval>> shape
crate::accumulate consumes.
Implementations§
Source§impl PerImageEvalStore
impl PerImageEvalStore
Sourcepub fn insert(&mut self, k: usize, a: usize, i: usize, cell: PerImageEval)
pub fn insert(&mut self, k: usize, a: usize, i: usize, cell: PerImageEval)
Insert (or overwrite) the cell at (k, a, i).
Sourcepub fn flatten(&self, meta: &EvalGridMeta) -> Vec<Option<Box<PerImageEval>>>
pub fn flatten(&self, meta: &EvalGridMeta) -> Vec<Option<Box<PerImageEval>>>
Densify into the [k * A * I + a * I + i]-laid-out
Vec<Option<Box<PerImageEval>>> that crate::accumulate
consumes. Cloning is intentional — accumulate borrows the
slice and the store must remain valid for further updates after
a snapshot. The cells are heap-boxed so the dense slot Vec only
pays for a pointer per slot at zero-init time (see
crate::EvalGrid::eval_imgs).
Trait Implementations§
Source§impl Clone for PerImageEvalStore
impl Clone for PerImageEvalStore
Source§fn clone(&self) -> PerImageEvalStore
fn clone(&self) -> PerImageEvalStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerImageEvalStore
impl Debug for PerImageEvalStore
Source§impl Default for PerImageEvalStore
impl Default for PerImageEvalStore
Source§fn default() -> PerImageEvalStore
fn default() -> PerImageEvalStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PerImageEvalStore
impl RefUnwindSafe for PerImageEvalStore
impl Send for PerImageEvalStore
impl Sync for PerImageEvalStore
impl Unpin for PerImageEvalStore
impl UnsafeUnpin for PerImageEvalStore
impl UnwindSafe for PerImageEvalStore
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.