OpenKalman
Static Public Member Functions | Static Public Attributes | List of all members
OpenKalman::interface::detail::SphericalBase< T, Min, Max, Down, Up, d_i, a_i, i_i > Struct Template Reference

Static Public Member Functions

static constexpr auto dimension (const T &)
 
static constexpr auto stat_dimension (const T &)
 
static constexpr auto is_euclidean (const T &)
 
static constexpr std::size_t hash_code (const T &)
 
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto to_euclidean_component (const T &t, const Getter &g, const L &euclidean_local_index)
 Maps an element to coordinates in Euclidean space. More...
 
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto from_euclidean_component (const T &t, const Getter &g, const L &local_index)
 Maps a coordinate in Euclidean space to an element. More...
 
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto get_wrapped_component (const T &t, const Getter &g, const L &local_index)
 Perform modular wrapping of spherical coordinates. More...
 
template<typename Setter , typename Getter , typename X , typename L , std::enable_if_t< values::value< X > and values::index< L > and std::is_invocable< const Setter &, const X &, std::size_t >::value and std::is_invocable< const Setter &, typename std::invoke_result< const Getter &, std::size_t >::type, std::size_t >::value, int > = 0>
static constexpr void set_wrapped_component (const T &t, const Setter &s, const Getter &g, const X &x, const L &local_index)
 Set an element and then perform any necessary modular wrapping. More...
 

Static Public Attributes

static constexpr bool is_specialized = true
 

Member Function Documentation

◆ from_euclidean_component()

template<typename T, typename Min, typename Max, typename Down, typename Up, std::size_t d_i, std::size_t a_i, std::size_t i_i>
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto OpenKalman::interface::detail::SphericalBase< T, Min, Max, Down, Up, d_i, a_i, i_i >::from_euclidean_component ( const T &  t,
const Getter &  g,
const L &  local_index 
)
inlinestatic

Maps a coordinate in Euclidean space to an element.

This function takes d, x, y, and z Cartesian coordinates representing a location on a 4D unit half-cylinder, and converts them to spherical coordinates.

Parameters
gAn element getter (std::function<Scalar(std::size_t))
local_indexA local index relative to the original coordinates (starting at 0)
startThe starting index within the Euclidean-transformed indices

◆ get_wrapped_component()

template<typename T, typename Min, typename Max, typename Down, typename Up, std::size_t d_i, std::size_t a_i, std::size_t i_i>
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto OpenKalman::interface::detail::SphericalBase< T, Min, Max, Down, Up, d_i, a_i, i_i >::get_wrapped_component ( const T &  t,
const Getter &  g,
const L &  local_index 
)
inlinestatic

Perform modular wrapping of spherical coordinates.

The wrapping operation is equivalent to mapping to, and then back from, Euclidean space.

Parameters
gAn element getter (std::function<Scalar(std::size_t))
local_indexA local index accessing the angle (in this case, it must be 0)
startThe starting location of the angle within any larger set of coordinates::pattern

◆ set_wrapped_component()

template<typename T, typename Min, typename Max, typename Down, typename Up, std::size_t d_i, std::size_t a_i, std::size_t i_i>
template<typename Setter , typename Getter , typename X , typename L , std::enable_if_t< values::value< X > and values::index< L > and std::is_invocable< const Setter &, const X &, std::size_t >::value and std::is_invocable< const Setter &, typename std::invoke_result< const Getter &, std::size_t >::type, std::size_t >::value, int > = 0>
static constexpr void OpenKalman::interface::detail::SphericalBase< T, Min, Max, Down, Up, d_i, a_i, i_i >::set_wrapped_component ( const T &  t,
const Setter &  s,
const Getter &  g,
const X &  x,
const L &  local_index 
)
inlinestatic

Set an element and then perform any necessary modular wrapping.

The operation is equivalent to setting the angle and then mapping to, and then back from, Euclidean space.

Parameters
sAn element setter (std::function<void(std::size_t, Scalar))
gAn element getter (std::function<Scalar(std::size_t))
xThe scalar value to be set.
local_indexA local index accessing the angle (in this case, it must be 0)
startThe starting location of the angle within any larger set of coordinates::pattern

◆ to_euclidean_component()

template<typename T, typename Min, typename Max, typename Down, typename Up, std::size_t d_i, std::size_t a_i, std::size_t i_i>
template<typename Getter , typename L , std::enable_if_t< values::index< L > and values::value< typename std::invoke_result< const Getter &, std::size_t >::type >, int > = 0>
static constexpr auto OpenKalman::interface::detail::SphericalBase< T, Min, Max, Down, Up, d_i, a_i, i_i >::to_euclidean_component ( const T &  t,
const Getter &  g,
const L &  euclidean_local_index 
)
inlinestatic

Maps an element to coordinates in Euclidean space.

This function takes a set of spherical coordinates and converts them to d, x, y, and z Cartesian coordinates representing a location on a unit 4D half-cylinder.

Parameters
gAn element getter (std::function<Scalar(std::size_t))
euclidean_local_indexA local index relative to the Euclidean-transformed coordinates (starting at 0)
startThe starting index within the coordinates::pattern object

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