Helios++
Helios software for LiDAR simulations
SurfaceInspector::util::draggers::MaxDragger< E > Class Template Reference

Max dragger drags the maximum element. The first time next is called the maximum element is returned, the second time the second maximum element is returned and so on. More...

#include <MaxDragger.hpp>

Inheritance diagram for SurfaceInspector::util::draggers::MaxDragger< E >:
Collaboration diagram for SurfaceInspector::util::draggers::MaxDragger< E >:

Public Member Functions

 MaxDragger (vector< E > x)
 Build a maximum dragger. More...
 
virtual ~MaxDragger ()
 Default destructor.
 
- Public Member Functions inherited from SurfaceInspector::util::draggers::MinDragger< E >
 MinDragger (vector< E > x)
 Build a minimum dragger. More...
 
virtual ~MinDragger ()
 Default destructor.
 
bool hasNext () override
 
- Public Member Functions inherited from SurfaceInspector::util::draggers::OptimizationDragger< E >
next () override
 Implementation of next method for optimization draggers. More...
 

Protected Member Functions

pick () override
 Pick the minimum element inside \([a, b]\) indices. More...
 
- Protected Member Functions inherited from SurfaceInspector::util::draggers::MinDragger< E >
virtual void initialize ()
 Initialize the minimum dragger to the initial status. More...
 
pick () override
 Pick the minimum element inside \([a, b]\) indices. More...
 
void update () override
 Update the minimum dragger status which basically means updating \(a\) and \(b\) values while partially sorting the collection. More...
 
virtual void partialSort ()
 Do a partial sort. More...
 

Additional Inherited Members

- Protected Attributes inherited from SurfaceInspector::util::draggers::MinDragger< E >
vector< E > x
 The collection (as vector) to min-drag from.
 
size_t stopSize
 The number of elements in the collection x, minus 1. More...
 
bool initialized = false
 Specify if the min dragger has been initialized (true) or nor (false). More...
 
size_t a = 0
 The start index.
 
size_t b = 0
 The end index.
 
size_t c = 0
 The current index.
 

Detailed Description

template<typename E>
class SurfaceInspector::util::draggers::MaxDragger< E >

Max dragger drags the maximum element. The first time next is called the maximum element is returned, the second time the second maximum element is returned and so on.

Author
Alberto M. Esmoris PEna
Version
1.0
Template Parameters
EType of elements to drag

Constructor & Destructor Documentation

◆ MaxDragger()

template<typename E >
SurfaceInspector::util::draggers::MaxDragger< E >::MaxDragger ( vector< E >  x)
inline

Build a maximum dragger.

Parameters
xThe collection to drag over
See also
SurfaceInspector::util::draggers::MinDragger::MinDragger(vector<E>)

Member Function Documentation

◆ pick()

template<typename E >
E SurfaceInspector::util::draggers::MaxDragger< E >::pick ( )
inlineoverrideprotectedvirtual

Pick the minimum element inside \([a, b]\) indices.

Returns
Minimum element inside \([a, b]\) indices
See also
SurfaceInspector::util::draggers::OptimizationDragger::pick

Implements SurfaceInspector::util::draggers::OptimizationDragger< E >.


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