Skip to main content

Mojo struct

BoundingBox

struct BoundingBox[dtype: DType]

Fields

  • nw (SIMD[dtype, 2]):
  • se (SIMD[dtype, 2]):

Implemented traits

AnyType, ExplicitlyCopyable, ImplicitlyCopyable, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

alias __copyinit__is_trivial = True

__del__is_trivial

alias __del__is_trivial = True

__moveinit__is_trivial

alias __moveinit__is_trivial = True

Methods

__init__

__init__(out self, y1: Scalar[dtype], x1: Scalar[dtype], y2: Scalar[dtype], x2: Scalar[dtype])

iou

iou(self, other: Self) -> Scalar[dtype]

Returns:

Scalar

intersection_area

intersection_area(self, other: Self) -> Scalar[dtype]

Returns:

Scalar

area

area(self) -> Scalar[dtype]

Returns:

Scalar

Was this page helpful?