ARTS  2.4.0(git:4fb77825)
CmpArrayOfNumeric Class Reference

Helper comparison class to sort an array or vector based on an ArrayOfNumeric. More...

#include <array.h>

Public Member Functions

 CmpArrayOfNumeric (const ArrayOfNumeric &vec)
 
bool operator() (const int &a, const int &b) const
 

Public Attributes

const ArrayOfNumericvalues
 

Detailed Description

Helper comparison class to sort an array or vector based on an ArrayOfNumeric.

Usage:

Vector v1 ArrayOfNumeric v2; ... std::sort(v1.begin(), v1.end(), CmpArrayOfNumeric(v2));

Source: http://stackoverflow.com/questions/8147911/locking-two-vectors-and-sorting-them

Definition at line 331 of file array.h.

Constructor & Destructor Documentation

◆ CmpArrayOfNumeric()

CmpArrayOfNumeric::CmpArrayOfNumeric ( const ArrayOfNumeric vec)
inline

Definition at line 333 of file array.h.

Member Function Documentation

◆ operator()()

bool CmpArrayOfNumeric::operator() ( const int &  a,
const int &  b 
) const
inline

Definition at line 334 of file array.h.

References values.

Member Data Documentation

◆ values

const ArrayOfNumeric& CmpArrayOfNumeric::values

Definition at line 338 of file array.h.

Referenced by operator()().


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