ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::brute_force_collection< value_t, container_t >::brute_forcer Struct Reference

A nested surface finder that returns all surfaces in a range (brute force). More...

#include <detray/navigation/accelerators/brute_force.hpp>

Inheritance diagram for detray::brute_force_collection< value_t, container_t >::brute_forcer:
[legend]
Collaboration diagram for detray::brute_force_collection< value_t, container_t >::brute_forcer:
[legend]

Public Types

using base = detray::ranges::subrange<const vector_type<value_t>>
 Range base providing iteration over the selected surfaces.
using query_type = bool
 Query value accepted by the brute-force search interface.
using value_type = value_t
 Surface descriptor stored in the collection.
Public Types inherited from detray::ranges::subrange< const vector_type< value_t > >
using base_type
 Base view storing the selected iterators.
using difference_t
 Difference type used for source range positions.
using iterator_t
 Iterator type of the source range.
Public Types inherited from detray::ranges::detail::subrange_view< range_t >
using const_iterator_t = typename detray::ranges::const_iterator_t<range_t>
 Iterator type used when accessing a const view.
using difference_t = typename detray::ranges::range_difference_t<range_t>
 Difference type used for range positions.
using iterator_t = typename detray::ranges::iterator_t<range_t>
 Iterator type used to delimit the range.

Public Member Functions

 brute_forcer ()=default
 Default constructor.
constexpr brute_forcer (const vector_type< value_t > &surfaces, const dindex_range &range)
 Construct a range over the surfaces belonging to one volume.
auto all ()
constexpr auto all () const
constexpr value_t & at (const dindex i)
 Return a mutable surface at a position in this volume's range.
constexpr value_t at (const dindex i) const
 Return the surface at a position in this volume's range.
template<concepts::detector detector_t, typename track_t, concepts::arithmetic window_size_t>
constexpr auto search (const detector_t &, const typename detector_t::volume_type &, const track_t &, const search_window< window_size_t, 2 > &, const typename detector_t::geometry_context &) const
constexpr auto search (query_type) const
template<concepts::arithmetic window_size_t>
constexpr auto search (query_type, search_window< window_size_t, 2 >) const
Public Member Functions inherited from detray::ranges::subrange< const vector_type< value_t > >
constexpr subrange ()=default
 Default constructor.
constexpr subrange (deduced_range_t &&range)
 Construct from a range.
constexpr subrange (deduced_range_t &&range, const deduced_index_range_t &pos)
 Construct from a range and an index range pos.
constexpr subrange (deduced_range_t &&range, index_t pos)
 Construct from a range and starting position pos.
constexpr subrange (index_t start, index_t end)
 Construct from two indices, storing them for later range composition.
constexpr subrange (iterator_t start, iterator_t end)
 Construct from an start and end iterator pair.
constexpr auto operator() (deduced_range_t &&range)
 Call operator for range composition.
Public Member Functions inherited from detray::ranges::detail::subrange_view< range_t >
constexpr subrange_view ()=default
 Default constructor.
constexpr subrange_view (iterator_t start, iterator_t end)
 Construct from an start and end iterator pair.
constexpr auto begin () -> iterator_t
 Return the first iterator.
constexpr auto begin () const -> const_iterator_t
 Return the first iterator of a const view.
constexpr auto end () -> iterator_t
 Return the end iterator.
constexpr auto end () const -> const_iterator_t
 Return the end iterator of a const view.
constexpr auto operator== (const subrange_view &rhs) const -> bool
 Equality operator.
Public Member Functions inherited from detray::ranges::view_interface< subrange_view< range_t > >
constexpr decltype(auto) back () const
 Return a reference to the last element.
constexpr auto data () const
 Return a pointer to the first element, or null for an empty view.
constexpr auto empty () const -> bool
 Check whether the view contains no elements.
constexpr decltype(auto) front () const
 Return a reference to the first element.
constexpr operator bool () const
 Test whether the view contains at least one element.
constexpr decltype(auto) operator[] (const dindex i) const
 Subscript operator that takes detray dindex.
constexpr auto size () const
 Return the number of elements in the view.

Detailed Description

template<class value_t, typename container_t = host_container_types>
struct detray::brute_force_collection< value_t, container_t >::brute_forcer

A nested surface finder that returns all surfaces in a range (brute force).

This type will be returned when the surface collection is queried for the surfaces of a particular volume.

Constructor & Destructor Documentation

◆ brute_forcer()

template<class value_t, typename container_t = host_container_types>
detray::brute_force_collection< value_t, container_t >::brute_forcer::brute_forcer ( const vector_type< value_t > & surfaces,
const dindex_range & range )
constexpr

Construct a range over the surfaces belonging to one volume.

Parameters
surfacesComplete surface store.
rangeIndex range delimiting this volume's surfaces.

Member Function Documentation

◆ all() [1/2]

template<class value_t, typename container_t = host_container_types>
auto detray::brute_force_collection< value_t, container_t >::brute_forcer::all ( )
Returns
an iterator over all surfaces in the data structure

◆ all() [2/2]

template<class value_t, typename container_t = host_container_types>
auto detray::brute_force_collection< value_t, container_t >::brute_forcer::all ( ) const
constexpr
Returns
an iterator over all surfaces in the data structure

◆ at() [1/2]

template<class value_t, typename container_t = host_container_types>
value_t & detray::brute_force_collection< value_t, container_t >::brute_forcer::at ( const dindex i)
constexpr

Return a mutable surface at a position in this volume's range.

Parameters
iPosition within the selected range.
Returns
the surface at a given index i - non-const

◆ at() [2/2]

template<class value_t, typename container_t = host_container_types>
value_t detray::brute_force_collection< value_t, container_t >::brute_forcer::at ( const dindex i) const
constexpr

Return the surface at a position in this volume's range.

Parameters
iPosition within the selected range.
Returns
the surface at a given index i - const

◆ search() [1/3]

template<class value_t, typename container_t = host_container_types>
template<concepts::detector detector_t, typename track_t, concepts::arithmetic window_size_t>
auto detray::brute_force_collection< value_t, container_t >::brute_forcer::search ( const detector_t & ,
const typename detector_t::volume_type & ,
const track_t & ,
const search_window< window_size_t, 2 > & ,
const typename detector_t::geometry_context &  ) const
constexpr
Returns
the complete surface range of the search volume

◆ search() [2/3]

template<class value_t, typename container_t = host_container_types>
auto detray::brute_force_collection< value_t, container_t >::brute_forcer::search ( query_type ) const
constexpr
Returns
the complete surface range of the search volume

◆ search() [3/3]

template<class value_t, typename container_t = host_container_types>
template<concepts::arithmetic window_size_t>
auto detray::brute_force_collection< value_t, container_t >::brute_forcer::search ( query_type ,
search_window< window_size_t, 2 >  ) const
constexpr
Returns
the complete surface range of the search volume