Classes | Typedefs | Functions | Variables
geo::vect::details Namespace Reference

Classes

struct  AccumulateImpl
 
struct  AccumulateImpl< Op, First, Second, Others... >
 
struct  AccumulateImpl< Op, T >
 
struct  AlwaysFalse
 
struct  BaseCoordTypes
 
struct  BaseCoordTypes< Vector, void >
 
struct  BindCoordManagersImpl
 
struct  BindCoordManagersImpl< Vector, 2U >
 
struct  BindCoordManagersImpl< Vector, 3U >
 
struct  BindCoordManagersImpl< Vector, 4U >
 
struct  BindCoordManagersImplBase
 
class  BoundCoordGetter
 
class  BoundCoordManager
 
struct  ConvertArrayTo
 
struct  ConvertToDispatcher
 
struct  ConvertToDispatcher< Vector, Vector >
 
struct  ConvertToDispatcher< Vector, Vector, Dim >
 
struct  ConvertToImpl
 
struct  ConvertToImpl< Dest, Source, 2U >
 
struct  ConvertToImpl< Dest, Source, 3U >
 
struct  ConvertToImpl< Dest, Source, 4U >
 
struct  ConvertToImpl< Dest, std::array< T, Dim > >
 
struct  ConvertToImpl< Dest, T * >
 
struct  ConvertToImpl< Dest, T[Dim]>
 
struct  ConvertToImplBase
 
struct  ConvertToImplDim
 
struct  ConvertToImplDim< Dest, Source, 2U >
 
struct  ConvertToImplDim< Dest, Source, 3U >
 
struct  ConvertToImplDim< Dest, Source, 4U >
 
class  CoordGetter
 Helper class for read of a single vector coordinate. More...
 
struct  CoordGetterTraits
 
class  CoordManager
 Helper class for read/write of a single vector coordinate. More...
 
struct  CoordManagerImpl
 
struct  CoordManagerImpl< Vector, 1U >
 
struct  CoordManagerImpl< Vector, 2U >
 
struct  CoordManagerImpl< Vector, 3U >
 
struct  CoordManagerImpl< Vector, 4U >
 
struct  CoordManagersImpl
 
struct  CoordManagersImpl< Vector, 2U >
 
struct  CoordManagersImpl< Vector, 3U >
 
struct  CoordManagersImpl< Vector, 4U >
 
struct  CoordManagersImplBase
 
struct  CoordManagerTraits
 
struct  DimensionImpl
 
struct  DimensionImpl< std::array< T, Dim >, void >
 
struct  enable_if_t<(std::extent_v< Array > >
 
struct  HasGetter
 
struct  MemberFuncClassType
 
struct  MemberFuncClassType< Func Class::* >
 
struct  MemberFuncReturnType
 
struct  VectorScalar
 

Typedefs

template<typename Vector >
using VectorScalar_t = typename VectorScalar< Vector >::type
 
template<typename Vector >
using CoordinateArray_t = std::array< VectorScalar_t< Vector >, dimension< Vector >()>
 A STL array suitable to contain all coordinate values of a Vector. More...
 
template<typename T >
using MemberFuncReturn_t = typename MemberFuncReturnType< T >::type
 
template<typename T >
using MemberFuncClass_t = typename MemberFuncClassType< T >::type
 
template<typename Vector >
using VectorIndices_t = std::make_index_sequence< dimension< Vector >()>
 Type of sequence of indices up to Vector size. More...
 

Functions

template<typename Op , typename... T>
auto extended_accumulate (Op op, T &&...args)
 
template<typename... T>
auto extended_and (T...args) -> decltype(auto)
 
template<typename Vector >
constexpr bool HasX ()
 
template<typename Vector >
constexpr bool HasY ()
 
template<typename Vector >
constexpr bool HasZ ()
 
template<typename Vector >
constexpr bool HasT ()
 
template<typename Vector >
constexpr unsigned int dimension ()
 
template<typename Getter >
constexpr auto makeCoordReader (Getter getter)
 
template<typename Getter , typename Setter >
constexpr auto makeCoordManager (Getter getter, Setter setter)
 
template<typename T >
constexpr T && constexpr_forward (std::remove_reference_t< T > &t)
 
template<typename T >
constexpr T && constexpr_forward (std::remove_reference_t< T > &&t)
 
template<typename Vector >
constexpr auto makeVectorIndices ()
 
template<typename Vector >
constexpr auto makeVectorIndices (Vector &&)
 
template<typename T , T... Indices>
constexpr auto makeIndexSeqImpl (std::integer_sequence< T, Indices... >)
 
template<typename T , T N>
constexpr auto makeIndexSeq ()
 
template<std::size_t I, typename Data >
constexpr auto accessElement (Data &&data)
 
template<typename Vector , typename Coords , std::size_t... Indices>
constexpr Vector makeFromCoordsImpl (Coords &&coords, std::index_sequence< Indices... >)
 
template<typename Point , std::size_t... I>
bool isfiniteImpl (Point const &point, std::index_sequence< I... >)
 

Variables

template<typename Vector >
constexpr CoordManager_t< VectorNoCoordManager { nullptr, nullptr }
 

Typedef Documentation

template<typename Vector >
using geo::vect::details::CoordinateArray_t = typedef std::array<VectorScalar_t<Vector>, dimension<Vector>()>

A STL array suitable to contain all coordinate values of a Vector.

Definition at line 151 of file geo_vectors_utils.h.

template<typename T >
using geo::vect::details::MemberFuncClass_t = typedef typename MemberFuncClassType<T>::type

Definition at line 172 of file geo_vectors_utils.h.

template<typename T >
using geo::vect::details::MemberFuncReturn_t = typedef typename MemberFuncReturnType<T>::type

Definition at line 163 of file geo_vectors_utils.h.

template<typename Vector >
using geo::vect::details::VectorIndices_t = typedef std::make_index_sequence<dimension<Vector>()>

Type of sequence of indices up to Vector size.

Definition at line 1369 of file geo_vectors_utils.h.

template<typename Vector >
using geo::vect::details::VectorScalar_t = typedef typename VectorScalar<Vector>::type

Definition at line 97 of file geo_vectors_utils.h.

Function Documentation

template<std::size_t I, typename Data >
constexpr auto geo::vect::details::accessElement ( Data &&  data)

Definition at line 1393 of file geo_vectors_utils.h.

1393 { return data[I]; }
template<typename T >
constexpr T && geo::vect::details::constexpr_forward ( std::remove_reference_t< T > &  t)

Definition at line 1355 of file geo_vectors_utils.h.

template<typename T >
constexpr T && geo::vect::details::constexpr_forward ( std::remove_reference_t< T > &&  t)

Definition at line 1359 of file geo_vectors_utils.h.

1360  {
1361  static_assert(!std::is_lvalue_reference<T>(),
1362  "template argument substituting T is an lvalue reference type");
1363  return static_cast<T&&>(t);
1364  }
template<typename Vector >
constexpr unsigned int geo::vect::details::dimension ( )

Definition at line 139 of file geo_vectors_utils.h.

139  {
140  return HasT<Vector>()? 4U
141  : HasZ<Vector>()? 3U
142  : HasY<Vector>()? 2U
143  : HasX<Vector>()? 1U
144  : 0U;
145  } // dimension()
template<typename Op , typename... T>
auto geo::vect::details::extended_accumulate ( Op  op,
T &&...  args 
)

Definition at line 69 of file geo_vectors_utils.h.

70  { return AccumulateImpl<Op, T...>::compute(op, std::forward<T>(args)...); }
static QCString args
Definition: declinfo.cpp:674
template<typename... T>
auto geo::vect::details::extended_and ( T...  args) -> decltype(auto)

Definition at line 74 of file geo_vectors_utils.h.

75  {
76  auto and_op = [](auto&& a, auto&& b) { return a && b; };
77  return extended_accumulate(and_op, std::forward<T>(args)...);
78  }
static QCString args
Definition: declinfo.cpp:674
const double a
auto extended_accumulate(Op op, T &&...args)
static bool * b
Definition: config.cpp:1043
template<typename Vector >
constexpr bool geo::vect::details::HasT ( )
template<typename Vector >
constexpr bool geo::vect::details::HasX ( )
template<typename Vector >
constexpr bool geo::vect::details::HasY ( )
template<typename Vector >
constexpr bool geo::vect::details::HasZ ( )
template<typename Point , std::size_t... I>
bool geo::vect::details::isfiniteImpl ( Point const &  point,
std::index_sequence< I... >   
)

Definition at line 1642 of file geo_vectors_utils.h.

1643  { return extended_and(std::isfinite(coord(point, I).get())...); }
auto coord(Vector &v, unsigned int n) noexcept
Returns an object to manage the coordinate n of a vector.
bool isfinite(Vector const &v)
Returns whether all components of the vector are finite.
auto extended_and(T...args) -> decltype(auto)
template<typename Getter , typename Setter >
constexpr auto geo::vect::details::makeCoordManager ( Getter  getter,
Setter  setter 
)

Definition at line 298 of file geo_vectors_utils.h.

299  {
300  using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
301  return CoordManager<Vector_t, Setter>{getter, setter};
302  }
Helper class for read/write of a single vector coordinate.
recob::tracking::Vector_t Vector_t
template<typename Getter >
constexpr auto geo::vect::details::makeCoordReader ( Getter  getter)

Definition at line 239 of file geo_vectors_utils.h.

240  {
241  using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
242  return CoordGetter<Vector_t>{ getter };
243  }
Helper class for read of a single vector coordinate.
recob::tracking::Vector_t Vector_t
template<typename Vector , typename Coords , std::size_t... Indices>
constexpr Vector geo::vect::details::makeFromCoordsImpl ( Coords &&  coords,
std::index_sequence< Indices... >   
)

Definition at line 1397 of file geo_vectors_utils.h.

1398  {
1399  return
1400  { accessElement<Indices>(constexpr_forward<Coords>(coords))... };
1401  }
template<typename T , T N>
constexpr auto geo::vect::details::makeIndexSeq ( )

Definition at line 1387 of file geo_vectors_utils.h.

1388  { return makeIndexSeqImpl<T>(std::make_integer_sequence<T, N>{}); }
template<typename T , T... Indices>
constexpr auto geo::vect::details::makeIndexSeqImpl ( std::integer_sequence< T, Indices... >  )

Definition at line 1380 of file geo_vectors_utils.h.

1383  { return std::array<T, sizeof...(Indices)>{{ Indices... }}; }
auto array(Array const &a)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:228
template<typename Vector >
constexpr auto geo::vect::details::makeVectorIndices ( )

Definition at line 1372 of file geo_vectors_utils.h.

1372 { return VectorIndices_t<Vector>{}; }
std::make_index_sequence< dimension< Vector >()> VectorIndices_t
Type of sequence of indices up to Vector size.
template<typename Vector >
constexpr auto geo::vect::details::makeVectorIndices ( Vector &&  )

Definition at line 1375 of file geo_vectors_utils.h.

1376  { return makeVectorIndices<Vector>(); }

Variable Documentation

template<typename Vector >
constexpr CoordManager_t< Vector > geo::vect::details::NoCoordManager { nullptr, nullptr }

Definition at line 1406 of file geo_vectors_utils.h.