GooFit  v2.1.3
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
GooFit::strided_range< Iterator > Class Template Reference

#include <DalitzPlotHelpers.h>

Classes

struct  stride_functor
 

Public Types

typedef thrust::iterator_difference< Iterator >::type difference_type
 
typedef thrust::counting_iterator< difference_typeCountingIterator
 
typedef thrust::transform_iterator< stride_functor, CountingIteratorTransformIterator
 
typedef thrust::permutation_iterator< Iterator, TransformIteratorPermutationIterator
 
typedef PermutationIterator iterator
 

Public Member Functions

 strided_range (Iterator first, Iterator last, difference_type stride)
 
iterator begin () const
 
iterator end () const
 

Protected Attributes

Iterator first
 
Iterator last
 
difference_type stride
 

Detailed Description

template<typename Iterator>
class GooFit::strided_range< Iterator >

Definition at line 122 of file DalitzPlotHelpers.h.

Member Typedef Documentation

◆ CountingIterator

template<typename Iterator >
typedef thrust::counting_iterator<difference_type> GooFit::strided_range< Iterator >::CountingIterator

Definition at line 134 of file DalitzPlotHelpers.h.

◆ difference_type

template<typename Iterator >
typedef thrust::iterator_difference<Iterator>::type GooFit::strided_range< Iterator >::difference_type

Definition at line 124 of file DalitzPlotHelpers.h.

◆ iterator

template<typename Iterator >
typedef PermutationIterator GooFit::strided_range< Iterator >::iterator

Definition at line 139 of file DalitzPlotHelpers.h.

◆ PermutationIterator

template<typename Iterator >
typedef thrust::permutation_iterator<Iterator, TransformIterator> GooFit::strided_range< Iterator >::PermutationIterator

Definition at line 136 of file DalitzPlotHelpers.h.

◆ TransformIterator

template<typename Iterator >
typedef thrust::transform_iterator<stride_functor, CountingIterator> GooFit::strided_range< Iterator >::TransformIterator

Definition at line 135 of file DalitzPlotHelpers.h.

Constructor & Destructor Documentation

◆ strided_range()

template<typename Iterator >
GooFit::strided_range< Iterator >::strided_range ( Iterator  first,
Iterator  last,
difference_type  stride 
)
inline

Definition at line 142 of file DalitzPlotHelpers.h.

143  : first(first)
144  , last(last)
145  , stride(stride) {}

Member Function Documentation

◆ begin()

template<typename Iterator >
iterator GooFit::strided_range< Iterator >::begin ( ) const
inline

Definition at line 147 of file DalitzPlotHelpers.h.

147  {
148  return PermutationIterator(first, TransformIterator(CountingIterator(0), stride_functor(stride)));
149  }
thrust::transform_iterator< stride_functor, CountingIterator > TransformIterator
thrust::counting_iterator< difference_type > CountingIterator
thrust::permutation_iterator< Iterator, TransformIterator > PermutationIterator

◆ end()

template<typename Iterator >
iterator GooFit::strided_range< Iterator >::end ( ) const
inline

Definition at line 151 of file DalitzPlotHelpers.h.

151 { return begin() + ((last - first) + (stride - 1)) / stride; }
iterator begin() const

Member Data Documentation

◆ first

template<typename Iterator >
Iterator GooFit::strided_range< Iterator >::first
protected

Definition at line 154 of file DalitzPlotHelpers.h.

◆ last

template<typename Iterator >
Iterator GooFit::strided_range< Iterator >::last
protected

Definition at line 155 of file DalitzPlotHelpers.h.

◆ stride

template<typename Iterator >
difference_type GooFit::strided_range< Iterator >::stride
protected

Definition at line 156 of file DalitzPlotHelpers.h.


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