LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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  ConvertToImpl
 
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  extent_v< Array >> 0)> >
 
struct  DimensionImpl< lar::util::simple_geo::Point2D< T >, void >
 
struct  DimensionImpl< lar::util::simple_geo::Point3D< T >, void >
 
struct  DimensionImpl< std::array< T, Dim >, void >
 
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< Vector > NoCoordManager {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 196 of file geo_vectors_utils.h.

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

Definition at line 217 of file geo_vectors_utils.h.

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

Definition at line 206 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 1847 of file geo_vectors_utils.h.

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

Definition at line 110 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 1878 of file geo_vectors_utils.h.

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

Definition at line 1806 of file geo_vectors_utils.h.

1807  {
1808  return static_cast<T&&>(t);
1809  }
template<typename T >
constexpr T&& geo::vect::details::constexpr_forward ( std::remove_reference_t< T > &&  t)

Definition at line 1812 of file geo_vectors_utils.h.

1813  {
1814  static_assert(!std::is_lvalue_reference<T>(),
1815  "template argument substituting T is an lvalue reference type");
1816  return static_cast<T&&>(t);
1817  }
template<typename Vector >
constexpr unsigned int geo::vect::details::dimension ( )

Definition at line 189 of file geo_vectors_utils.h.

Referenced by larg4::dist().

template<typename Op , typename... T>
auto geo::vect::details::extended_accumulate ( Op  op,
T &&...  args 
)

Definition at line 79 of file geo_vectors_utils.h.

Referenced by extended_and().

80  {
81  return AccumulateImpl<Op, T...>::compute(op, std::forward<T>(args)...);
82  }
template<typename... T>
auto geo::vect::details::extended_and ( T...  args) -> decltype(auto)

Definition at line 85 of file geo_vectors_utils.h.

References extended_accumulate().

Referenced by isfiniteImpl().

86  {
87  auto and_op = [](auto&& a, auto&& b) { return a && b; };
88  return extended_accumulate(and_op, std::forward<T>(args)...);
89  }
auto extended_accumulate(Op op, T &&...args)
template<typename Vector >
constexpr bool geo::vect::details::HasT ( )

Definition at line 180 of file geo_vectors_utils.h.

template<typename Vector >
constexpr bool geo::vect::details::HasX ( )

Definition at line 165 of file geo_vectors_utils.h.

template<typename Vector >
constexpr bool geo::vect::details::HasY ( )

Definition at line 170 of file geo_vectors_utils.h.

template<typename Vector >
constexpr bool geo::vect::details::HasZ ( )

Definition at line 175 of file geo_vectors_utils.h.

template<typename Point , std::size_t... I>
bool geo::vect::details::isfiniteImpl ( Point const &  point,
std::index_sequence< I... >   
)

Definition at line 2102 of file geo_vectors_utils.h.

References geo::vect::coord(), extended_and(), and geo::vect::isfinite().

Referenced by geo::vect::isfinite().

2103  {
2104  return extended_and(std::isfinite(coord(point, I).get())...);
2105  }
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 337 of file geo_vectors_utils.h.

338  {
339  using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
340  return CoordManager<Vector_t, Setter>{getter, setter};
341  }
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 280 of file geo_vectors_utils.h.

281  {
282  using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
283  return CoordGetter<Vector_t>{getter};
284  }
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 1884 of file geo_vectors_utils.h.

1885  {
1886  return {accessElement<Indices>(constexpr_forward<Coords>(coords))...};
1887  }
template<typename T , T N>
constexpr auto geo::vect::details::makeIndexSeq ( )

Definition at line 1871 of file geo_vectors_utils.h.

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

Definition at line 1862 of file geo_vectors_utils.h.

References lar::dump::array().

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

Definition at line 1850 of file geo_vectors_utils.h.

1851  {
1852  return VectorIndices_t<Vector>{};
1853  }
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 1856 of file geo_vectors_utils.h.

1857  {
1858  return makeVectorIndices<Vector>();
1859  }

Variable Documentation

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

Definition at line 1891 of file geo_vectors_utils.h.