mmcfilters
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 <LocalEventModel.hpp>

Public Member Functions

 ObservationWindow (std::vector< WindowOffset > offsets)
 Builds and validates a window.
 
 ObservationWindow (std::initializer_list< WindowOffset > offsets)
 Builds and validates a window.
 
template<std::size_t N>
 ObservationWindow (const std::array< WindowOffset, N > &offsets)
 Builds and validates a fixed-size window.
 
std::size_t size () const noexcept
 Returns the number of offsets.
 
const WindowOffsetoperator[] (std::size_t index) const noexcept
 Returns one offset without bounds checking.
 
std::span< const WindowOffsetoffsets () const noexcept
 Returns all ordered offsets.
 
auto begin () const noexcept
 Returns the first offset iterator.
 
auto end () const noexcept
 Returns the past-the-end offset iterator.
 

Static Public Attributes

static constexpr std::size_t maxNumOffsets = 32
 Maximum number of offsets representable by one visibility bit mask.
 

Detailed Description

Indexed finite set of translated-sample offsets.

The offset order permanently identifies visibility-state coordinates. A valid window contains (0, 0) exactly once, has no duplicates, and contains at most 32 offsets because the production state is a std::uint32_t mask.

Definition at line 32 of file LocalEventModel.hpp.

Constructor & Destructor Documentation

◆ ObservationWindow() [1/3]

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

Builds and validates a window.

Parameters
offsetsOrdered translated-sample offsets.

Definition at line 38 of file LocalEventModel.hpp.

◆ ObservationWindow() [2/3]

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

Builds and validates a window.

Parameters
offsetsOrdered translated-sample offsets.

Definition at line 40 of file LocalEventModel.hpp.

◆ ObservationWindow() [3/3]

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

Builds and validates a fixed-size window.

Template Parameters
NNumber of offsets.
Parameters
offsetsOrdered translated-sample offsets.

Definition at line 44 of file LocalEventModel.hpp.

Member Function Documentation

◆ begin()

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

Returns the first offset iterator.

Returns
Beginning iterator.

Definition at line 53 of file LocalEventModel.hpp.

◆ end()

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

Returns the past-the-end offset iterator.

Returns
Ending iterator.

Definition at line 55 of file LocalEventModel.hpp.

◆ offsets()

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

Returns all ordered offsets.

Returns
Borrowed offset span.

Definition at line 51 of file LocalEventModel.hpp.

◆ operator[]()

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

Returns one offset without bounds checking.

Parameters
indexWindow coordinate.
Returns
Offset at index.

Definition at line 49 of file LocalEventModel.hpp.

◆ size()

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

Returns the number of offsets.

Returns
Number of window coordinates.

Definition at line 47 of file LocalEventModel.hpp.

Member Data Documentation

◆ maxNumOffsets

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

Maximum number of offsets representable by one visibility bit mask.

Definition at line 35 of file LocalEventModel.hpp.


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