pub struct ConnectedStatsPrimitive<B: Backend> {
pub area: IntTensor<B>,
pub left: IntTensor<B>,
pub top: IntTensor<B>,
pub right: IntTensor<B>,
pub bottom: IntTensor<B>,
pub max_label: IntTensor<B>,
}Expand description
Primitive version of ConnectedStats, to be returned by the backend
Fields§
§area: IntTensor<B>Total area of each component
left: IntTensor<B>Leftmost x coordinate in the component
top: IntTensor<B>Topmost y coordinate in the component
right: IntTensor<B>Rightmost x coordinate in the component
bottom: IntTensor<B>Bottommost y coordinate in the component
max_label: IntTensor<B>Scalar tensor of the max label
Trait Implementations§
Source§impl<B: Backend> From<ConnectedStatsPrimitive<B>> for ConnectedStats<B>
impl<B: Backend> From<ConnectedStatsPrimitive<B>> for ConnectedStats<B>
Source§fn from(value: ConnectedStatsPrimitive<B>) -> Self
fn from(value: ConnectedStatsPrimitive<B>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<B> Freeze for ConnectedStatsPrimitive<B>
impl<B> RefUnwindSafe for ConnectedStatsPrimitive<B>
impl<B> Send for ConnectedStatsPrimitive<B>
impl<B> Sync for ConnectedStatsPrimitive<B>
impl<B> Unpin for ConnectedStatsPrimitive<B>
impl<B> UnwindSafe for ConnectedStatsPrimitive<B>
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> 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