UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::Label Struct Reference

Represents a semantic class label as a single unsigned integer value. More...

#include <lib/core/include/ufo/core/label.hpp>

Public Types

using value_type = std::uint32_t
 Underlying integer type.
 

Public Member Functions

constexpr operator value_type () const noexcept
 Implicitly converts to the underlying integer type.
 

Public Attributes

value_type label {}
 The raw class label identifier.
 

Friends

constexpr auto operator<=> (Label lhs, Label rhs) noexcept=default
 Three-way comparison (total order on the underlying integer).
 
constexpr bool operator== (Label lhs, Label rhs) noexcept=default
 Equality comparison.
 

Detailed Description

Represents a semantic class label as a single unsigned integer value.

Label is a lightweight, trivially-copyable value type with no overhead over a bare uint32_t. It is implicitly convertible to and from uint32_t, fully ordered via <=>, and supports std::ostream streaming and std::format.

Intended for use as a per-point or per-node attribute in a semantic segmentation pipeline, where it can be stored as a separate SoA channel alongside position or intensity data. The integer backing allows up to ~4 billion distinct categories (e.g., "car", "wall", "ground").

Label is the category component of Semantic; pair it with Confidence when you also need a per-label confidence score.

Definition at line 72 of file label.hpp.

Member Typedef Documentation

◆ value_type

using ufo::Label::value_type = std::uint32_t

Underlying integer type.

Definition at line 76 of file label.hpp.

Member Function Documentation

◆ operator value_type()

constexpr ufo::Label::operator value_type ( ) const
inlineconstexprnoexcept

Implicitly converts to the underlying integer type.

Returns
The label value as a uint32_t.

Allows Label to be used wherever a uint32_t is expected.

Definition at line 90 of file label.hpp.

Friends And Related Symbol Documentation

◆ operator<=>

constexpr auto operator<=> ( Label  lhs,
Label  rhs 
)
friend

Three-way comparison (total order on the underlying integer).

Parameters
[in]lhsLeft operand.
[in]rhsRight operand.
Returns
Comparison result.

◆ operator==

constexpr bool operator== ( Label  lhs,
Label  rhs 
)
friend

Equality comparison.

Parameters
[in]lhsLeft operand.
[in]rhsRight operand.
Returns
True if both label values are equal.

Member Data Documentation

◆ label

value_type ufo::Label::label {}

The raw class label identifier.

Definition at line 81 of file label.hpp.


The documentation for this struct was generated from the following file: