MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::MinArg< T, I > Struct Template Reference

#include <MRMinMaxArg.h>

Public Member Functions

auto asPair () const
 
void include (const std::pair< T, I > &p)
 changes val and arg if given point is smaller
 
void include (T testVal, I testArg)
 changes val and arg if given point is smaller
 
void include (const MinArg &s)
 changes val and arg if given point is smaller
 

Public Attributes

val = std::numeric_limits<T>::max()
 
arg
 

Detailed Description

template<typename T, typename I>
struct MR::MinArg< T, I >

minimum of some elements of type T, and the index of where minimum is reached of type I

Member Function Documentation

◆ asPair()

template<typename T , typename I >
auto MR::MinArg< T, I >::asPair ( ) const
inline

◆ include() [1/3]

template<typename T , typename I >
void MR::MinArg< T, I >::include ( const MinArg< T, I > & s)
inline

changes val and arg if given point is smaller

◆ include() [2/3]

template<typename T , typename I >
void MR::MinArg< T, I >::include ( const std::pair< T, I > & p)
inline

changes val and arg if given point is smaller

◆ include() [3/3]

template<typename T , typename I >
void MR::MinArg< T, I >::include ( T testVal,
I testArg )
inline

changes val and arg if given point is smaller

Member Data Documentation

◆ arg

template<typename T , typename I >
I MR::MinArg< T, I >::arg

◆ val

template<typename T , typename I >
T MR::MinArg< T, I >::val = std::numeric_limits<T>::max()

The documentation for this struct was generated from the following files: