MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
mmcfilters::local_attributes::ObservationWindow Class Reference

Indexed finite set of translated-sample offsets. More...

#include <FiniteWindowLocalAttributeComputer.hpp>

Public Member Functions

 ObservationWindow (std::vector< WindowOffset > offsets)
 Creates and validates an ordered window.
 
 ObservationWindow (std::initializer_list< WindowOffset > offsets)
 Creates and validates an ordered window.
 
template<std::size_t N>
 ObservationWindow (const std::array< WindowOffset, N > &offsets)
 Creates and validates an ordered fixed-size window.
 
std::size_t size () const noexcept
 Returns the number of state coordinates.
 
const WindowOffsetoperator[] (std::size_t index) const noexcept
 Returns one offset in semantic coordinate order.
 
std::span< const WindowOffsetoffsets () const noexcept
 Returns all offsets in semantic coordinate order.
 
auto begin () const noexcept
 Starts ordered offset iteration.
 
auto end () const noexcept
 Ends ordered offset iteration.
 

Static Public Attributes

static constexpr std::size_t maxNumOffsets = 32
 Maximum coordinate count supported by the visibility mask.
 

Detailed Description

Indexed finite set of translated-sample offsets.

The offset order is part of the contract: offset j permanently identifies coordinate j of every BinaryVisibilityState. A valid window contains (0, 0) exactly once, contains no duplicate offsets, and has at most 32 coordinates because visibility is stored in a std::uint32_t mask.

Definition at line 48 of file FiniteWindowLocalAttributeComputer.hpp.

Constructor & Destructor Documentation

◆ ObservationWindow() [1/3]

mmcfilters::local_attributes::ObservationWindow::ObservationWindow ( std::vector< WindowOffset offsets)
inlineexplicit

Creates and validates an ordered window.

Parameters
offsetsOrdered distinct offsets containing zero exactly once.

Definition at line 54 of file FiniteWindowLocalAttributeComputer.hpp.

◆ ObservationWindow() [2/3]

mmcfilters::local_attributes::ObservationWindow::ObservationWindow ( std::initializer_list< WindowOffset offsets)
inline

Creates and validates an ordered window.

Parameters
offsetsOrdered distinct offsets containing zero exactly once.

Definition at line 57 of file FiniteWindowLocalAttributeComputer.hpp.

◆ ObservationWindow() [3/3]

template<std::size_t N>
mmcfilters::local_attributes::ObservationWindow::ObservationWindow ( const std::array< WindowOffset, N > &  offsets)
inlineexplicit

Creates and validates an ordered fixed-size window.

Template Parameters
NNumber of offsets.
Parameters
offsetsOrdered offset array.

Definition at line 61 of file FiniteWindowLocalAttributeComputer.hpp.

Member Function Documentation

◆ begin()

auto mmcfilters::local_attributes::ObservationWindow::begin ( ) const
inlinenoexcept

Starts ordered offset iteration.

Returns
Constant iterator to the first offset.

Definition at line 70 of file FiniteWindowLocalAttributeComputer.hpp.

◆ end()

auto mmcfilters::local_attributes::ObservationWindow::end ( ) const
inlinenoexcept

Ends ordered offset iteration.

Returns
Constant past-the-end iterator.

Definition at line 72 of file FiniteWindowLocalAttributeComputer.hpp.

◆ offsets()

std::span< const WindowOffset > mmcfilters::local_attributes::ObservationWindow::offsets ( ) const
inlinenoexcept

Returns all offsets in semantic coordinate order.

Returns
Read-only offset span.

Definition at line 68 of file FiniteWindowLocalAttributeComputer.hpp.

◆ operator[]()

const WindowOffset & mmcfilters::local_attributes::ObservationWindow::operator[] ( std::size_t  index) const
inlinenoexcept

Returns one offset in semantic coordinate order.

Parameters
indexCoordinate index.
Returns
Offset at index.

Definition at line 66 of file FiniteWindowLocalAttributeComputer.hpp.

◆ size()

std::size_t mmcfilters::local_attributes::ObservationWindow::size ( ) const
inlinenoexcept

Returns the number of state coordinates.

Returns
Number of offsets.

Definition at line 64 of file FiniteWindowLocalAttributeComputer.hpp.

Member Data Documentation

◆ maxNumOffsets

constexpr std::size_t mmcfilters::local_attributes::ObservationWindow::maxNumOffsets = 32
staticconstexpr

Maximum coordinate count supported by the visibility mask.

Definition at line 51 of file FiniteWindowLocalAttributeComputer.hpp.


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