pub struct Ring {
pub factor: i32,
pub tau: i32,
pub radius: i32,
pub native_width: f64,
pub native_height: f64,
pub analysis_width: usize,
pub analysis_height: usize,
pub budget_bytes: usize,
pub slots: Vec<RegionSlot>,
/* private fields */
}Fields§
§factor: i32§tau: i32§radius: i32§native_width: f64§native_height: f64§analysis_width: usize§analysis_height: usize§budget_bytes: usize§slots: Vec<RegionSlot>Implementations§
Source§impl Ring
impl Ring
pub fn new( factor: i32, noise: f64, native_width: usize, native_height: usize, analysis_width: usize, analysis_height: usize, budget_bytes: usize, regions: Vec<Region>, ) -> Ring
pub fn resident_frames(&self) -> usize
Sourcepub fn observe(
&mut self,
slot: usize,
canvas: u32,
pose_x: f64,
pose_y: f64,
gray: &[u8],
)
pub fn observe( &mut self, slot: usize, canvas: u32, pose_x: f64, pose_y: f64, gray: &[u8], )
Adds this frame’s evidence for one region: builds its box gray, votes against ring partners and holds the
layer until push_frame. gray is the whole analysis frame.
Sourcepub fn push_frame(&mut self, index: u32) -> Vec<Finalized>
pub fn push_frame(&mut self, index: u32) -> Vec<Finalized>
Commits the frame under construction (if any region observed) and finalises whatever the byte budget pushes out, oldest first.
Auto Trait Implementations§
impl Freeze for Ring
impl RefUnwindSafe for Ring
impl Send for Ring
impl Sync for Ring
impl Unpin for Ring
impl UnsafeUnpin for Ring
impl UnwindSafe for Ring
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