Helios++
Helios software for LiDAR simulations
MaxDragger.hpp
1 #pragma once
2 
3 #include <surfaceinspector/util/draggers/MinDragger.hpp>
4 
6 
7 namespace SurfaceInspector{ namespace util{ namespace draggers{
17 template <typename E> class MaxDragger : public MinDragger<E>{
18 public:
19  // *** CONSTRUCTION / DESTRUCTION *** //
20  // ************************************ //
26  MaxDragger(vector<E> x) : MinDragger<E>(x) {};
27 
31  virtual ~MaxDragger() {};
32 
33 protected:
34  // *** OPTIMIZATION DRAGGER METHODS *** //
35  // ************************************** //
41  inline E pick() override {return this->x[this->x.size()-1-this->c];};
42 
43 };
44 }}}
Max dragger drags the maximum element. The first time next is called the maximum element is returned,...
Definition: MaxDragger.hpp:17
virtual ~MaxDragger()
Default destructor.
Definition: MaxDragger.hpp:31
MaxDragger(vector< E > x)
Build a maximum dragger.
Definition: MaxDragger.hpp:26
E pick() override
Pick the minimum element inside indices.
Definition: MaxDragger.hpp:41
Min dragger drags the minimum element. The first time next is called the minimum element is returned,...
Definition: MinDragger.hpp:18
vector< E > x
The collection (as vector) to min-drag from.
Definition: MinDragger.hpp:25
size_t c
The current index.
Definition: MinDragger.hpp:51