UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::SoA< Ts > Class Template Reference

Public Types

using const_iterator = std::ranges::iterator_t< zip_view_type< std::vector< Ts > const ... > >
 
using const_reference = std::tuple< Ts const &... >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using data_type = std::tuple< std::vector< Ts >... >
 
using difference_type = std::ptrdiff_t
 
using iterator = std::ranges::iterator_t< zip_view_type< std::vector< Ts >... > >
 
using reference = std::tuple< Ts &... >
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = std::size_t
 
using value_type = std::tuple< Ts... >
 
template<class... Us>
using zip_view_type = std::ranges::zip_view< std::ranges::ref_view< Us >... >
 

Public Member Functions

template<class... Args>
requires (0 < sizeof...(Args)) && (requires { detail::wrap_data(std::declval<Args>()); } && ...)
constexpr SoA (Args &&... args)
 
template<std::input_iterator InputIt>
constexpr SoA (InputIt first, InputIt last)
 
constexpr SoA (size_type count)
 
constexpr SoA (size_type count, value_type const &value)
 
constexpr SoA (SoA &&other) noexcept=default
 
constexpr SoA (SoA const &other)=default
 
template<std::ranges::input_range R>
constexpr SoA (std::from_range_t, R &&range)
 
constexpr SoA (std::initializer_list< value_type > init)
 
constexpr SoA (std::vector< Ts >... vecs)
 
template<std::ranges::input_range R>
constexpr void append_range (R &&rg)
 
template<std::input_iterator I, std::sentinel_for< I > S>
constexpr void assign (I first, S last)
 
constexpr void assign (size_type count, value_type const &value)
 
constexpr void assign (std::initializer_list< value_type > ilist)
 
template<std::ranges::input_range R>
requires (std::same_as<std::ranges::range_value_t<R>, value_type>)
constexpr void assign_range (R &&range)
 
constexpr reference at (size_type pos)
 
constexpr const_reference at (size_type pos) const
 
constexpr reference back ()
 
constexpr const_reference back () const
 
constexpr const_iterator begin () const noexcept
 
constexpr iterator begin () noexcept
 
constexpr size_type capacity () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr void clear () noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
constexpr data_type const * data () const noexcept
 
constexpr data_type * data () noexcept
 
template<class... Us>
constexpr iterator emplace (iterator pos, Us &&... us)
 
template<class... Us>
constexpr reference emplace_back (Us &&... us)
 
constexpr bool empty () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr iterator end () noexcept
 
constexpr iterator erase (iterator first, iterator last)
 
constexpr iterator erase (iterator pos)
 
constexpr reference front ()
 
constexpr const_reference front () const
 
template<std::size_t I>
constexpr std::tuple_element_t< I, value_type > & get (size_type pos)
 
template<class T >
constexpr T & get (size_type pos)
 
template<std::size_t I>
constexpr std::tuple_element_t< I, value_type > const & get (size_type pos) const
 
template<class T >
constexpr T const & get (size_type pos) const
 
template<std::input_iterator I, std::sentinel_for< I > S>
constexpr iterator insert (iterator pos, I first, S last)
 
constexpr iterator insert (iterator pos, size_type count, value_type const &value)
 
constexpr iterator insert (iterator pos, std::initializer_list< value_type > ilist)
 
constexpr iterator insert (iterator pos, value_type &&value)
 
constexpr iterator insert (iterator pos, value_type const &value)
 
template<std::ranges::input_range R>
constexpr iterator insert_range (iterator pos, R &&rg)
 
constexpr size_type max_size () const noexcept
 
constexpr SoAoperator= (SoA &&rhs) noexcept=default
 
constexpr SoAoperator= (SoA const &rhs)=default
 
constexpr SoAoperator= (std::initializer_list< value_type > ilist)
 
constexpr reference operator[] (size_type pos)
 
constexpr const_reference operator[] (size_type pos) const
 
constexpr void pop_back ()
 
template<class... Us>
constexpr void push_back (Us &&... us)
 
constexpr void push_back (value_type &&value)
 
constexpr void push_back (value_type const &value)
 
constexpr const_reverse_iterator rbegin () const noexcept
 
constexpr reverse_iterator rbegin () noexcept
 
constexpr const_reverse_iterator rend () const noexcept
 
constexpr reverse_iterator rend () noexcept
 
constexpr void reserve (size_type new_cap)
 
constexpr void resize (size_type count)
 
constexpr void resize (size_type count, value_type const &value)
 
constexpr void shrink_to_fit ()
 
constexpr size_type size () const noexcept
 
constexpr void swap (SoA &other) noexcept
 
template<class T >
constexpr std::span< T > view ()
 
template<std::size_t I>
constexpr std::span< std::tuple_element_t< I, value_type > > view ()
 
template<class T >
constexpr std::span< T const > view () const
 
template<std::size_t I>
constexpr std::span< std::tuple_element_t< I, value_type > const > view () const
 

Friends

struct detail::access
 
constexpr void swap (SoA &lhs, SoA &rhs) noexcept
 

Detailed Description

template<class... Ts>
requires (0 < sizeof...(Ts))
class ufo::SoA< Ts >

Definition at line 209 of file structure_of_arrays.hpp.

Member Typedef Documentation

◆ const_iterator

template<class... Ts>
using ufo::SoA< Ts >::const_iterator = std::ranges::iterator_t<zip_view_type<std::vector<Ts> const...> >

Definition at line 229 of file structure_of_arrays.hpp.

◆ const_reference

template<class... Ts>
using ufo::SoA< Ts >::const_reference = std::tuple<Ts const&...>

Definition at line 227 of file structure_of_arrays.hpp.

◆ const_reverse_iterator

template<class... Ts>
using ufo::SoA< Ts >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 231 of file structure_of_arrays.hpp.

◆ data_type

template<class... Ts>
using ufo::SoA< Ts >::data_type = std::tuple<std::vector<Ts>...>

Definition at line 218 of file structure_of_arrays.hpp.

◆ difference_type

template<class... Ts>
using ufo::SoA< Ts >::difference_type = std::ptrdiff_t

Definition at line 225 of file structure_of_arrays.hpp.

◆ iterator

template<class... Ts>
using ufo::SoA< Ts >::iterator = std::ranges::iterator_t<zip_view_type<std::vector<Ts>...> >

Definition at line 228 of file structure_of_arrays.hpp.

◆ reference

template<class... Ts>
using ufo::SoA< Ts >::reference = std::tuple<Ts&...>

Definition at line 226 of file structure_of_arrays.hpp.

◆ reverse_iterator

template<class... Ts>
using ufo::SoA< Ts >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 230 of file structure_of_arrays.hpp.

◆ size_type

template<class... Ts>
using ufo::SoA< Ts >::size_type = std::size_t

Definition at line 224 of file structure_of_arrays.hpp.

◆ value_type

template<class... Ts>
using ufo::SoA< Ts >::value_type = std::tuple<Ts...>

Definition at line 223 of file structure_of_arrays.hpp.

◆ zip_view_type

template<class... Ts>
template<class... Us>
using ufo::SoA< Ts >::zip_view_type = std::ranges::zip_view<std::ranges::ref_view<Us>...>

Definition at line 221 of file structure_of_arrays.hpp.

Constructor & Destructor Documentation

◆ SoA() [1/7]

template<class... Ts>
constexpr ufo::SoA< Ts >::SoA ( size_type  count)
inlineexplicitconstexpr

Definition at line 251 of file structure_of_arrays.hpp.

◆ SoA() [2/7]

template<class... Ts>
constexpr ufo::SoA< Ts >::SoA ( size_type  count,
value_type const &  value 
)
inlineconstexpr

Definition at line 253 of file structure_of_arrays.hpp.

◆ SoA() [3/7]

template<class... Ts>
template<std::input_iterator InputIt>
constexpr ufo::SoA< Ts >::SoA ( InputIt  first,
InputIt  last 
)
inlineconstexpr

Definition at line 256 of file structure_of_arrays.hpp.

◆ SoA() [4/7]

template<class... Ts>
template<std::ranges::input_range R>
constexpr ufo::SoA< Ts >::SoA ( std::from_range_t  ,
R &&  range 
)
inlineconstexpr

Definition at line 262 of file structure_of_arrays.hpp.

◆ SoA() [5/7]

template<class... Ts>
constexpr ufo::SoA< Ts >::SoA ( std::vector< Ts >...  vecs)
inlineconstexpr

Definition at line 267 of file structure_of_arrays.hpp.

◆ SoA() [6/7]

template<class... Ts>
constexpr ufo::SoA< Ts >::SoA ( std::initializer_list< value_type >  init)
inlineconstexpr

Definition at line 273 of file structure_of_arrays.hpp.

◆ SoA() [7/7]

template<class... Ts>
template<class... Args>
requires (0 < sizeof...(Args)) && (requires { detail::wrap_data(std::declval<Args>()); } && ...)
constexpr ufo::SoA< Ts >::SoA ( Args &&...  args)
inlineconstexpr

Definition at line 278 of file structure_of_arrays.hpp.

Member Function Documentation

◆ append_range()

template<class... Ts>
template<std::ranges::input_range R>
constexpr void ufo::SoA< Ts >::append_range ( R &&  rg)
inlineconstexpr

Definition at line 573 of file structure_of_arrays.hpp.

◆ assign() [1/3]

template<class... Ts>
template<std::input_iterator I, std::sentinel_for< I > S>
constexpr void ufo::SoA< Ts >::assign ( first,
last 
)
inlineconstexpr

Definition at line 328 of file structure_of_arrays.hpp.

◆ assign() [2/3]

template<class... Ts>
constexpr void ufo::SoA< Ts >::assign ( size_type  count,
value_type const &  value 
)
inlineconstexpr

Definition at line 322 of file structure_of_arrays.hpp.

◆ assign() [3/3]

template<class... Ts>
constexpr void ufo::SoA< Ts >::assign ( std::initializer_list< value_type >  ilist)
inlineconstexpr

Definition at line 333 of file structure_of_arrays.hpp.

◆ assign_range()

template<class... Ts>
template<std::ranges::input_range R>
requires (std::same_as<std::ranges::range_value_t<R>, value_type>)
constexpr void ufo::SoA< Ts >::assign_range ( R &&  range)
inlineconstexpr

Definition at line 340 of file structure_of_arrays.hpp.

◆ at() [1/2]

template<class... Ts>
constexpr reference ufo::SoA< Ts >::at ( size_type  pos)
inlineconstexpr

Definition at line 392 of file structure_of_arrays.hpp.

◆ at() [2/2]

template<class... Ts>
constexpr const_reference ufo::SoA< Ts >::at ( size_type  pos) const
inlineconstexpr

Definition at line 398 of file structure_of_arrays.hpp.

◆ back() [1/2]

template<class... Ts>
constexpr reference ufo::SoA< Ts >::back ( )
inlineconstexpr

Definition at line 408 of file structure_of_arrays.hpp.

◆ back() [2/2]

template<class... Ts>
constexpr const_reference ufo::SoA< Ts >::back ( ) const
inlineconstexpr

Definition at line 410 of file structure_of_arrays.hpp.

◆ begin() [1/2]

template<class... Ts>
constexpr const_iterator ufo::SoA< Ts >::begin ( ) const
inlineconstexprnoexcept

Definition at line 424 of file structure_of_arrays.hpp.

◆ begin() [2/2]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::begin ( )
inlineconstexprnoexcept

Definition at line 422 of file structure_of_arrays.hpp.

◆ capacity()

template<class... Ts>
constexpr size_type ufo::SoA< Ts >::capacity ( ) const
inlineconstexprnoexcept

Definition at line 487 of file structure_of_arrays.hpp.

◆ cbegin()

template<class... Ts>
constexpr const_iterator ufo::SoA< Ts >::cbegin ( ) const
inlineconstexprnoexcept

Definition at line 429 of file structure_of_arrays.hpp.

◆ cend()

template<class... Ts>
constexpr const_iterator ufo::SoA< Ts >::cend ( ) const
inlineconstexprnoexcept

Definition at line 435 of file structure_of_arrays.hpp.

◆ clear()

template<class... Ts>
constexpr void ufo::SoA< Ts >::clear ( )
inlineconstexprnoexcept

Definition at line 500 of file structure_of_arrays.hpp.

◆ crbegin()

template<class... Ts>
constexpr const_reverse_iterator ufo::SoA< Ts >::crbegin ( ) const
inlineconstexprnoexcept

Definition at line 447 of file structure_of_arrays.hpp.

◆ crend()

template<class... Ts>
constexpr const_reverse_iterator ufo::SoA< Ts >::crend ( ) const
inlineconstexprnoexcept

Definition at line 462 of file structure_of_arrays.hpp.

◆ data() [1/2]

template<class... Ts>
constexpr data_type const * ufo::SoA< Ts >::data ( ) const
inlineconstexprnoexcept

Definition at line 414 of file structure_of_arrays.hpp.

◆ data() [2/2]

template<class... Ts>
constexpr data_type * ufo::SoA< Ts >::data ( )
inlineconstexprnoexcept

Definition at line 412 of file structure_of_arrays.hpp.

◆ emplace()

template<class... Ts>
template<class... Us>
constexpr iterator ufo::SoA< Ts >::emplace ( iterator  pos,
Us &&...  us 
)
inlineconstexpr

Definition at line 535 of file structure_of_arrays.hpp.

◆ emplace_back()

template<class... Ts>
template<class... Us>
constexpr reference ufo::SoA< Ts >::emplace_back ( Us &&...  us)
inlineconstexpr

Definition at line 565 of file structure_of_arrays.hpp.

◆ empty()

template<class... Ts>
constexpr bool ufo::SoA< Ts >::empty ( ) const
inlineconstexprnoexcept

Definition at line 470 of file structure_of_arrays.hpp.

◆ end() [1/2]

template<class... Ts>
constexpr const_iterator ufo::SoA< Ts >::end ( ) const
inlineconstexprnoexcept

Definition at line 433 of file structure_of_arrays.hpp.

◆ end() [2/2]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::end ( )
inlineconstexprnoexcept

Definition at line 431 of file structure_of_arrays.hpp.

◆ erase() [1/2]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::erase ( iterator  first,
iterator  last 
)
inlineconstexpr

Definition at line 545 of file structure_of_arrays.hpp.

◆ erase() [2/2]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::erase ( iterator  pos)
inlineconstexpr

Definition at line 543 of file structure_of_arrays.hpp.

◆ front() [1/2]

template<class... Ts>
constexpr reference ufo::SoA< Ts >::front ( )
inlineconstexpr

Definition at line 404 of file structure_of_arrays.hpp.

◆ front() [2/2]

template<class... Ts>
constexpr const_reference ufo::SoA< Ts >::front ( ) const
inlineconstexpr

Definition at line 406 of file structure_of_arrays.hpp.

◆ get() [1/4]

template<class... Ts>
template<std::size_t I>
constexpr std::tuple_element_t< I, value_type > & ufo::SoA< Ts >::get ( size_type  pos)
inlineconstexpr

Definition at line 592 of file structure_of_arrays.hpp.

◆ get() [2/4]

template<class... Ts>
template<class T >
constexpr T & ufo::SoA< Ts >::get ( size_type  pos)
inlineconstexpr

Definition at line 605 of file structure_of_arrays.hpp.

◆ get() [3/4]

template<class... Ts>
template<std::size_t I>
constexpr std::tuple_element_t< I, value_type > const & ufo::SoA< Ts >::get ( size_type  pos) const
inlineconstexpr

Definition at line 598 of file structure_of_arrays.hpp.

◆ get() [4/4]

template<class... Ts>
template<class T >
constexpr T const & ufo::SoA< Ts >::get ( size_type  pos) const
inlineconstexpr

Definition at line 613 of file structure_of_arrays.hpp.

◆ insert() [1/5]

template<class... Ts>
template<std::input_iterator I, std::sentinel_for< I > S>
constexpr iterator ufo::SoA< Ts >::insert ( iterator  pos,
first,
last 
)
inlineconstexpr

Definition at line 518 of file structure_of_arrays.hpp.

◆ insert() [2/5]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::insert ( iterator  pos,
size_type  count,
value_type const &  value 
)
inlineconstexpr

Definition at line 512 of file structure_of_arrays.hpp.

◆ insert() [3/5]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::insert ( iterator  pos,
std::initializer_list< value_type >  ilist 
)
inlineconstexpr

Definition at line 523 of file structure_of_arrays.hpp.

◆ insert() [4/5]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::insert ( iterator  pos,
value_type &&  value 
)
inlineconstexpr

Definition at line 507 of file structure_of_arrays.hpp.

◆ insert() [5/5]

template<class... Ts>
constexpr iterator ufo::SoA< Ts >::insert ( iterator  pos,
value_type const &  value 
)
inlineconstexpr

Definition at line 502 of file structure_of_arrays.hpp.

◆ insert_range()

template<class... Ts>
template<std::ranges::input_range R>
constexpr iterator ufo::SoA< Ts >::insert_range ( iterator  pos,
R &&  rg 
)
inlineconstexpr

Definition at line 529 of file structure_of_arrays.hpp.

◆ max_size()

template<class... Ts>
constexpr size_type ufo::SoA< Ts >::max_size ( ) const
inlineconstexprnoexcept

Definition at line 480 of file structure_of_arrays.hpp.

◆ operator=()

template<class... Ts>
constexpr SoA & ufo::SoA< Ts >::operator= ( std::initializer_list< value_type >  ilist)
inlineconstexpr

Definition at line 310 of file structure_of_arrays.hpp.

◆ operator[]() [1/2]

template<class... Ts>
constexpr reference ufo::SoA< Ts >::operator[] ( size_type  pos)
inlineconstexpr

Definition at line 382 of file structure_of_arrays.hpp.

◆ operator[]() [2/2]

template<class... Ts>
constexpr const_reference ufo::SoA< Ts >::operator[] ( size_type  pos) const
inlineconstexpr

Definition at line 387 of file structure_of_arrays.hpp.

◆ pop_back()

template<class... Ts>
constexpr void ufo::SoA< Ts >::pop_back ( )
inlineconstexpr

Definition at line 578 of file structure_of_arrays.hpp.

◆ push_back() [1/3]

template<class... Ts>
template<class... Us>
constexpr void ufo::SoA< Ts >::push_back ( Us &&...  us)
inlineconstexpr

Definition at line 558 of file structure_of_arrays.hpp.

◆ push_back() [2/3]

template<class... Ts>
constexpr void ufo::SoA< Ts >::push_back ( value_type &&  value)
inlineconstexpr

Definition at line 552 of file structure_of_arrays.hpp.

◆ push_back() [3/3]

template<class... Ts>
constexpr void ufo::SoA< Ts >::push_back ( value_type const &  value)
inlineconstexpr

Definition at line 550 of file structure_of_arrays.hpp.

◆ rbegin() [1/2]

template<class... Ts>
constexpr const_reverse_iterator ufo::SoA< Ts >::rbegin ( ) const
inlineconstexprnoexcept

Definition at line 442 of file structure_of_arrays.hpp.

◆ rbegin() [2/2]

template<class... Ts>
constexpr reverse_iterator ufo::SoA< Ts >::rbegin ( )
inlineconstexprnoexcept

Definition at line 437 of file structure_of_arrays.hpp.

◆ rend() [1/2]

template<class... Ts>
constexpr const_reverse_iterator ufo::SoA< Ts >::rend ( ) const
inlineconstexprnoexcept

Definition at line 457 of file structure_of_arrays.hpp.

◆ rend() [2/2]

template<class... Ts>
constexpr reverse_iterator ufo::SoA< Ts >::rend ( )
inlineconstexprnoexcept

Definition at line 452 of file structure_of_arrays.hpp.

◆ reserve()

template<class... Ts>
constexpr void ufo::SoA< Ts >::reserve ( size_type  new_cap)
inlineconstexpr

Definition at line 485 of file structure_of_arrays.hpp.

◆ resize() [1/2]

template<class... Ts>
constexpr void ufo::SoA< Ts >::resize ( size_type  count)
inlineconstexpr

Definition at line 580 of file structure_of_arrays.hpp.

◆ resize() [2/2]

template<class... Ts>
constexpr void ufo::SoA< Ts >::resize ( size_type  count,
value_type const &  value 
)
inlineconstexpr

Definition at line 582 of file structure_of_arrays.hpp.

◆ shrink_to_fit()

template<class... Ts>
constexpr void ufo::SoA< Ts >::shrink_to_fit ( )
inlineconstexpr

Definition at line 492 of file structure_of_arrays.hpp.

◆ size()

template<class... Ts>
constexpr size_type ufo::SoA< Ts >::size ( ) const
inlineconstexprnoexcept

Definition at line 475 of file structure_of_arrays.hpp.

◆ swap()

template<class... Ts>
constexpr void ufo::SoA< Ts >::swap ( SoA< Ts > &  other)
inlineconstexprnoexcept

Definition at line 587 of file structure_of_arrays.hpp.

◆ view() [1/4]

template<class... Ts>
template<class T >
constexpr std::span< T > ufo::SoA< Ts >::view ( )
inlineconstexpr

Definition at line 352 of file structure_of_arrays.hpp.

◆ view() [2/4]

template<class... Ts>
template<std::size_t I>
constexpr std::span< std::tuple_element_t< I, value_type > > ufo::SoA< Ts >::view ( )
inlineconstexpr

Definition at line 364 of file structure_of_arrays.hpp.

◆ view() [3/4]

template<class... Ts>
template<class T >
constexpr std::span< T const > ufo::SoA< Ts >::view ( ) const
inlineconstexpr

Definition at line 358 of file structure_of_arrays.hpp.

◆ view() [4/4]

template<class... Ts>
template<std::size_t I>
constexpr std::span< std::tuple_element_t< I, value_type > const > ufo::SoA< Ts >::view ( ) const
inlineconstexpr

Definition at line 370 of file structure_of_arrays.hpp.

Friends And Related Symbol Documentation

◆ SoA

template<class... Ts>
template<class... Us>
friend class SoA
friend

Definition at line 235 of file structure_of_arrays.hpp.

◆ detail::access

template<class... Ts>
friend struct detail::access
friend

Definition at line 237 of file structure_of_arrays.hpp.

◆ swap

template<class... Ts>
constexpr void swap ( SoA< Ts > &  lhs,
SoA< Ts > &  rhs 
)
friend

Definition at line 589 of file structure_of_arrays.hpp.


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