1 #ifndef _SURFACEINSPECTOR_UTIL_DRAGGERS_MIN_DRAGGER_HPP_
2 #define _SURFACEINSPECTOR_UTIL_DRAGGERS_MIN_DRAGGER_HPP_
4 #include <surfaceinspector/util/draggers/OptimizationDragger.hpp>
8 namespace SurfaceInspector {
namespace util {
namespace draggers{
87 inline E
pick()
override {
return x[
c];}
124 #include <surfaceinspector/util/draggers/MinDragger.tpp>
Dragger interface provide methods to drag elements from a given collection following a certain order....
Definition: IDragger.hpp:21
Min dragger drags the minimum element. The first time next is called the minimum element is returned,...
Definition: MinDragger.hpp:18
bool hasNext() override
Definition: MinDragger.hpp:119
size_t stopSize
The number of elements in the collection x, minus 1.
Definition: MinDragger.hpp:31
size_t b
The end index.
Definition: MinDragger.hpp:47
virtual void partialSort()
Do a partial sort.
vector< E > x
The collection (as vector) to min-drag from.
Definition: MinDragger.hpp:25
virtual void initialize()
Initialize the minimum dragger to the initial status.
size_t a
The start index.
Definition: MinDragger.hpp:43
size_t c
The current index.
Definition: MinDragger.hpp:51
void update() override
Update the minimum dragger status which basically means updating and values while partially sorting...
virtual ~MinDragger()
Default destructor.
Definition: MinDragger.hpp:66
bool initialized
Specify if the min dragger has been initialized (true) or nor (false).
Definition: MinDragger.hpp:39
MinDragger(vector< E > x)
Build a minimum dragger.
Definition: MinDragger.hpp:61
E pick() override
Pick the minimum element inside indices.
Definition: MinDragger.hpp:87
Optimization dragger interface provide methods expanding dragger definition to become a optimization ...
Definition: OptimizationDragger.hpp:25