pub struct DeltaDecoder;Expand description
Reconstructs full vectors from keyframes and delta chains.
Implementations§
Source§impl DeltaDecoder
impl DeltaDecoder
Sourcepub fn apply(base: &[f32], delta: &DeltaEntry) -> Vec<f32>
pub fn apply(base: &[f32], delta: &DeltaEntry) -> Vec<f32>
Apply a delta entry to a base vector to reconstruct the full vector.
base: the previous full vector (typically a keyframe or already-reconstructed vector)delta: the delta entry to apply
Returns the reconstructed full vector.
§Panics
Panics if any delta index is out of bounds for the base vector.
Sourcepub fn reconstruct(keyframe: &[f32], deltas: &[DeltaEntry]) -> Vec<f32>
pub fn reconstruct(keyframe: &[f32], deltas: &[DeltaEntry]) -> Vec<f32>
Reconstruct a full vector from a keyframe and a chain of deltas.
keyframe: the base full vectordeltas: sequence of delta entries to apply in order
Returns the final reconstructed vector.
Auto Trait Implementations§
impl Freeze for DeltaDecoder
impl RefUnwindSafe for DeltaDecoder
impl Send for DeltaDecoder
impl Sync for DeltaDecoder
impl Unpin for DeltaDecoder
impl UnwindSafe for DeltaDecoder
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