pub struct WindowOutput {
pub start_time: f32,
pub end_time: f32,
pub logits: Vec<f32>,
pub num_frames: usize,
}Expand description
One window’s segmentation output.
Fields§
§start_time: f32§end_time: f32§logits: Vec<f32>Row-major (num_frames, 7) logits.
num_frames: usizeImplementations§
Source§impl WindowOutput
impl WindowOutput
Sourcepub fn new(
start_time: f32,
end_time: f32,
logits: Vec<f32>,
num_frames: usize,
) -> Result<Self, SegmentationError>
pub fn new( start_time: f32, end_time: f32, logits: Vec<f32>, num_frames: usize, ) -> Result<Self, SegmentationError>
{ true }
pub fn new( start_time: f32, end_time: f32, logits: Vec<f32>, num_frames: usize, ) -> Result<Self, SegmentationError>
{ ret.as_ref().map_or(true, |w| w.logits.len() == w.num_frames * 7) }
Sourcepub fn frame_stride(&self) -> f32
pub fn frame_stride(&self) -> f32
{ true } pub fn frame_stride(&self) -> f32 { ret >= 0.0 || self.num_frames == 0 }
Sourcepub fn frame_time(&self, frame_idx: usize) -> f32
pub fn frame_time(&self, frame_idx: usize) -> f32
{ true } pub fn frame_time(&self, frame_idx: usize) -> f32 { ret == self.start_time + frame_idx as f32 * self.frame_stride() }
Trait Implementations§
Source§impl Clone for WindowOutput
impl Clone for WindowOutput
Source§fn clone(&self) -> WindowOutput
fn clone(&self) -> WindowOutput
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 moreAuto Trait Implementations§
impl Freeze for WindowOutput
impl RefUnwindSafe for WindowOutput
impl Send for WindowOutput
impl Sync for WindowOutput
impl Unpin for WindowOutput
impl UnsafeUnpin for WindowOutput
impl UnwindSafe for WindowOutput
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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