CMS 3D CMS Logo

Public Member Functions | Public Attributes

evf::iDie::sorted_indices Struct Reference

List of all members.

Public Member Functions

int ii (size_t ind)
bool operator() (const size_t a, const size_t b) const
int operator[] (size_t ind) const
 sorted_indices (const std::vector< int > &arr)

Public Attributes

const std::vector< int > & arr_
std::vector< int > ind_

Detailed Description

Definition at line 92 of file iDie.h.


Constructor & Destructor Documentation

evf::iDie::sorted_indices::sorted_indices ( const std::vector< int > &  arr) [inline]

Definition at line 93 of file iDie.h.

References arr_, i, ind_, and python::multivaluedict::sort().

                                                : arr_(arr)
      {
        ind_.resize(arr_.size(),0);
        unsigned int i = 0;
        while(i<ind_.size()) {ind_[i] = i; i++;}
        std::sort(ind_.rbegin(),ind_.rend(),*this);
      }

Member Function Documentation

int evf::iDie::sorted_indices::ii ( size_t  ind) [inline]

Definition at line 106 of file iDie.h.

References ind_.

Referenced by evf::iDie::iChoke().

{return ind_[ind];}
bool evf::iDie::sorted_indices::operator() ( const size_t  a,
const size_t  b 
) const [inline]

Definition at line 102 of file iDie.h.

References a, arr_, and b.

      {
        return arr_[a]<arr_[b];
      }
int evf::iDie::sorted_indices::operator[] ( size_t  ind) const [inline]

Definition at line 100 of file iDie.h.

References arr_, and ind_.

{return arr_[ind_[ind]];}

Member Data Documentation

const std::vector<int>& evf::iDie::sorted_indices::arr_

Definition at line 108 of file iDie.h.

Referenced by operator()(), operator[](), and sorted_indices().

Definition at line 107 of file iDie.h.

Referenced by ii(), operator[](), and sorted_indices().