OpenKalman
Classes | Public Member Functions | List of all members
OpenKalman::collections::update_view< V, F > Struct Template Reference

A collection_view that updates an underlying collection_view on an element-by-element basis. More...

#include <update.hpp>

Inheritance diagram for OpenKalman::collections::update_view< V, F >:
Inheritance graph
[legend]
Collaboration diagram for OpenKalman::collections::update_view< V, F >:
Collaboration graph
[legend]

Classes

class  iterator
 Iterator for update_view. More...
 
class  proxy
 A proxy object for accessing the base view. More...
 

Public Member Functions

template<bool Enable = true, std::enable_if_t< Enable and std::is_default_constructible_v< V > and std::is_default_constructible_v< F_box > and std::is_default_constructible_v< S_box >, int > = 0>
constexpr update_view ()
 Default constructor.
 
template<typename G_ , typename S_ >
constexpr update_view (V &v, G_ &&g, S_ &&s)
 Construct from a collection, a getter function, and a setter function.
 
template<typename G_ , typename S_ >
constexpr update_view (V &&v, G_ &&g, S_ &&s)
 
constexpr auto begin ()
 
constexpr auto begin () const
 
constexpr auto end ()
 
constexpr auto end () const
 
template<bool Enable = true, std::enable_if_t< Enable and sized< V >, int > = 0>
constexpr auto size () const
 The size of the resulting object.
 
template<std::size_t i>
decltype(auto) constexpr get ()
 Get element i.
 
template<std::size_t i>
decltype(auto) constexpr get () const
 
- Public Member Functions inherited from OpenKalman::ranges::view_interface< update_view< V, F > >
constexpr bool empty ()
 
constexpr bool empty () const
 
constexpr auto cbegin ()
 
constexpr auto cbegin () const
 
constexpr auto cend ()
 
constexpr auto cend () const
 
constexpr operator bool ()
 
constexpr operator bool () const
 
constexpr auto size ()
 
constexpr auto size () const
 
decltype(auto) constexpr front ()
 
decltype(auto) constexpr front () const
 
decltype(auto) constexpr back ()
 
decltype(auto) constexpr back () const
 
decltype(auto) constexpr operator[] (range_difference_t< D > n)
 
decltype(auto) constexpr operator[] (range_difference_t< D > n) const
 

Detailed Description

template<typename V, typename F>
struct OpenKalman::collections::update_view< V, F >

A collection_view that updates an underlying collection_view on an element-by-element basis.

Template Parameters
VAn underlying collection_view to be updated
FA callable update object of the form [](V&& t, values::index auto i) -> std::convertible_to<std::ranges::range_value_t<V>*gt;, which calculates an updated value of element i of V.

Constructor & Destructor Documentation

◆ update_view()

template<typename V , typename F >
template<typename G_ , typename S_ >
constexpr OpenKalman::collections::update_view< V, F >::update_view ( V &&  v,
G_ &&  g,
S_ &&  s 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Function Documentation

◆ begin() [1/2]

template<typename V , typename F >
constexpr auto OpenKalman::collections::update_view< V, F >::begin ( )
inline
Returns
An iterator at the beginning, if the base object is a range.

◆ begin() [2/2]

template<typename V , typename F >
constexpr auto OpenKalman::collections::update_view< V, F >::begin ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ end() [1/2]

template<typename V , typename F >
constexpr auto OpenKalman::collections::update_view< V, F >::end ( )
inline
Returns
An iterator at the end, if the base object is a range.

◆ end() [2/2]

template<typename V , typename F >
constexpr auto OpenKalman::collections::update_view< V, F >::end ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ get()

template<typename V , typename F >
template<std::size_t i>
decltype(auto) constexpr OpenKalman::collections::update_view< V, F >::get ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


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