nngn
Loading...
Searching...
No Matches
nngn::vec< CRTP, T, N > Struct Template Reference

#include <vec.h>

Public Types

using type = T
 

Public Member Functions

template<typename U >
constexpr operator CRTP< U > (void) const
 
constexpr vecoperator= (const CRTP< T > &v)
 
constexpr Toperator[] (std::size_t i)
 
constexpr const Toperator[] (std::size_t i) const
 
constexpr CRTP< Toperator- (void) const
 
constexpr CRTP< T > & operator+= (T t)
 
constexpr CRTP< T > & operator-= (T t)
 
constexpr CRTP< T > & operator*= (T t)
 
constexpr CRTP< T > & operator/= (T t)
 
constexpr CRTP< T > & operator+= (const CRTP< T > &v)
 
constexpr CRTP< T > & operator-= (const CRTP< T > &v)
 
constexpr CRTP< T > & operator*= (const CRTP< T > &v)
 
constexpr CRTP< T > & operator/= (const CRTP< T > &v)
 
template<std::size_t I>
constexpr Tget (void)
 
template<std::size_t I>
constexpr const Tget (void) const
 
constexpr Tdata (void)
 
constexpr const Tdata (void) const
 
constexpr auto as_tuple (void) const
 

Static Public Member Functions

template<typename R = T, typename F , typename ... Args>
static constexpr CRTP< R > map (F f, Args &&...args)
 
template<typename R = T, typename F , std::size_t ... I>
static constexpr CRTP< R > map_impl (F f, std::index_sequence< I... >, const vec &v)
 
template<typename R = T, typename F , std::size_t ... I>
static constexpr CRTP< R > map_impl (F f, std::index_sequence< I... >, T t, const vec &v0)
 
template<typename R = T, typename F , std::size_t ... I>
static constexpr CRTP< R > map_impl (F f, std::index_sequence< I... >, const vec &v0, T t)
 
template<typename R = T, typename F , std::size_t ... I>
static constexpr CRTP< R > map_impl (F f, std::index_sequence< I... >, const vec &v0, const vec &v1)
 

Static Public Attributes

static constexpr std::size_t n_dim = N
 

Member Typedef Documentation

◆ type

template<template< typename > typename CRTP, typename T , std::size_t N>
using nngn::vec< CRTP, T, N >::type = T

Member Function Documentation

◆ as_tuple()

template<template< typename > typename CRTP, typename T , std::size_t N>
auto nngn::vec< CRTP, T, N >::as_tuple ( void ) const
constexpr

◆ data() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
T * nngn::vec< CRTP, T, N >::data ( void )
constexpr

◆ data() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
const T * nngn::vec< CRTP, T, N >::data ( void ) const
constexpr

◆ get() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<std::size_t I>
T & nngn::vec< CRTP, T, N >::get ( void )
constexpr
Here is the caller graph for this function:

◆ get() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<std::size_t I>
const T & nngn::vec< CRTP, T, N >::get ( void ) const
constexpr

◆ map()

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename R , typename F , typename ... Args>
CRTP< R > nngn::vec< CRTP, T, N >::map ( F f,
Args &&... args )
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_impl() [1/4]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename R , typename F , std::size_t ... I>
CRTP< R > nngn::vec< CRTP, T, N >::map_impl ( F f,
std::index_sequence< I... > ,
const vec< CRTP, T, N > & v )
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_impl() [2/4]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename R , typename F , std::size_t ... I>
CRTP< R > nngn::vec< CRTP, T, N >::map_impl ( F f,
std::index_sequence< I... > ,
const vec< CRTP, T, N > & v0,
const vec< CRTP, T, N > & v1 )
inlinestaticconstexpr
Here is the call graph for this function:

◆ map_impl() [3/4]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename R , typename F , std::size_t ... I>
CRTP< R > nngn::vec< CRTP, T, N >::map_impl ( F f,
std::index_sequence< I... > ,
const vec< CRTP, T, N > & v0,
T t )
inlinestaticconstexpr
Here is the call graph for this function:

◆ map_impl() [4/4]

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename R , typename F , std::size_t ... I>
CRTP< R > nngn::vec< CRTP, T, N >::map_impl ( F f,
std::index_sequence< I... > ,
T t,
const vec< CRTP, T, N > & v0 )
inlinestaticconstexpr
Here is the call graph for this function:

◆ operator CRTP< U >()

template<template< typename > typename CRTP, typename T , std::size_t N>
template<typename U >
nngn::vec< CRTP, T, N >::operator CRTP< U > ( void ) const
inlineexplicitconstexpr
Here is the call graph for this function:

◆ operator*=() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator*= ( const CRTP< T > & v)
inlineconstexpr

◆ operator*=() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator*= ( T t)
inlineconstexpr

◆ operator+=() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator+= ( const CRTP< T > & v)
inlineconstexpr

◆ operator+=() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator+= ( T t)
inlineconstexpr

◆ operator-()

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > nngn::vec< CRTP, T, N >::operator- ( void ) const
inlineconstexpr
Here is the call graph for this function:

◆ operator-=() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator-= ( const CRTP< T > & v)
inlineconstexpr

◆ operator-=() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator-= ( T t)
inlineconstexpr

◆ operator/=() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator/= ( const CRTP< T > & v)
inlineconstexpr

◆ operator/=() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
CRTP< T > & nngn::vec< CRTP, T, N >::operator/= ( T t)
inlineconstexpr

◆ operator=()

template<template< typename > typename CRTP, typename T , std::size_t N>
vec< CRTP, T, N > & nngn::vec< CRTP, T, N >::operator= ( const CRTP< T > & v)
inlineconstexpr

◆ operator[]() [1/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
T & nngn::vec< CRTP, T, N >::operator[] ( std::size_t i)
inlineconstexpr

◆ operator[]() [2/2]

template<template< typename > typename CRTP, typename T , std::size_t N>
const T & nngn::vec< CRTP, T, N >::operator[] ( std::size_t i) const
inlineconstexpr

Member Data Documentation

◆ n_dim

template<template< typename > typename CRTP, typename T , std::size_t N>
std::size_t nngn::vec< CRTP, T, N >::n_dim = N
staticconstexpr

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