Go to the documentation of this file. 1 #ifndef AIKIDO_COMMON_VANDERCORPUT_HPP_
2 #define AIKIDO_COMMON_VANDERCORPUT_HPP_
7 #include <boost/iterator/iterator_facade.hpp>
32 bool includeStartpoint =
false,
33 bool includeEndpoint =
false,
34 double minResolution = 0.0);
52 std::pair<double, double>
operator[](
int n)
const;
60 constexpr
static int BASE{2};
61 constexpr
static int MAX{std::numeric_limits<int>::max()};
72 :
public boost::iterator_facade<
73 VanDerCorput::const_iterator,
75 boost::forward_traversal_tag,
98 std::pair<double, double>
mCurr;
104 #endif // AIKIDO_COMMON_VANDERCORPUT_HPP_
constexpr static int MAX
Definition: VanDerCorput.hpp:61
void increment()
Increment implementation for boost::iterator_facade.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
const_iterator end() const
Returns an iterator to the element following the last element of the sequence.
double dereference() const
Dereference implementation for boost::iterator_facade.
std::pair< double, double > computeVanDerCorput(int n) const
const_iterator begin() const
Returns an iterator to the first element of the sequence.
const_iterator(const VanDerCorput *seq)
Private constructor that should always be constructed from VanDerCorput::begin()
Definition: VanDerCorput.hpp:71
std::pair< double, double > mCurr
Definition: VanDerCorput.hpp:98
Generator for the Van der Corput sequence, a low-discripancy sequence defined over a real interval.
Definition: VanDerCorput.hpp:16
std::pair< double, double > operator[](int n) const
Returns the n-th element of the sequence (first element in the pair) and the current resolution (seco...
const double mSpan
Definition: VanDerCorput.hpp:65
int mN
Definition: VanDerCorput.hpp:96
bool mFinalIter
Definition: VanDerCorput.hpp:97
const VanDerCorput * mSeq
Definition: VanDerCorput.hpp:95
const bool mIncludeStartpoint
Definition: VanDerCorput.hpp:66
constexpr static int BASE
Definition: VanDerCorput.hpp:60
std::size_t getLength() const
Returns the total length of sequence.
double mMinResolution
Definition: VanDerCorput.hpp:68
const bool mIncludeEndpoint
Definition: VanDerCorput.hpp:67
VanDerCorput(double span=1.0, bool includeStartpoint=false, bool includeEndpoint=false, double minResolution=0.0)
Construts the Van der Corput sequence over an interval of length span that terminates when the maximu...
bool equal(const VanDerCorput::const_iterator &other) const
equal implementation for boost::iterator_facade