RankAtoms Namespace Reference

Utility functionality used by atom rankers. More...


Classes

struct  pairGTFunctor
 functor for implementing > on two std::pairs. The first entries are compared. More...

Typedefs

typedef std::vector
< int > 
INT_VECT
typedef std::list< int > INT_LIST

Functions

void updateInPlayIndices (const INT_VECT &ranks, INT_LIST &indicesInPlay)
 utility function for ranking atoms
template<typename T>
unsigned int countClasses (const std::vector< T > &vect)
 returns the count of unique items in an std::vector
template<typename T>
bool pairLess (const std::pair< T, int > &v1, const std::pair< T, int > &v2)
 function for implementing < on two std::pairs. The first entries are compared.
template<typename T>
void rankVect (const std::vector< T > &vect, INT_VECT &res)
 ranks the entries in a vector
template<typename T>
void sortAndRankVect (unsigned int nAtoms, const std::vector< T > &vals, const INT_LIST &indicesInPlay, INT_VECT &ranks)
 finds the relative rankings of the entries in vals.


Detailed Description

Utility functionality used by atom rankers.

Typedef Documentation

typedef std::list<int> RankAtoms::INT_LIST

Definition at line 21 of file RankAtoms.h.

typedef std::vector<int> RankAtoms::INT_VECT

Definition at line 20 of file RankAtoms.h.


Function Documentation

template<typename T>
unsigned int RankAtoms::countClasses ( const std::vector< T > &  vect  )  [inline]

returns the count of unique items in an std::vector

Definition at line 28 of file RankAtoms.h.

template<typename T>
bool RankAtoms::pairLess ( const std::pair< T, int > &  v1,
const std::pair< T, int > &  v2 
) [inline]

function for implementing < on two std::pairs. The first entries are compared.

Definition at line 45 of file RankAtoms.h.

template<typename T>
void RankAtoms::rankVect ( const std::vector< T > &  vect,
INT_VECT &  res 
) [inline]

ranks the entries in a vector

Parameters:
vect the vector to rank
res is used to return the ranks of each entry

Definition at line 55 of file RankAtoms.h.

References PRECONDITION.

Referenced by sortAndRankVect().

template<typename T>
void RankAtoms::sortAndRankVect ( unsigned int  nAtoms,
const std::vector< T > &  vals,
const INT_LIST &  indicesInPlay,
INT_VECT &  ranks 
) [inline]

finds the relative rankings of the entries in vals.

Parameters:
nAtoms the number of points in play
vals the values to be ranked
indicesInPlay a list containing the indices that are being considered (only those entries in ranks that appear in indicesInPlay will be modified)
ranks the current ranks of entries, this is updated with new ranks

Definition at line 89 of file RankAtoms.h.

References rankVect().

void RankAtoms::updateInPlayIndices ( const INT_VECT &  ranks,
INT_LIST &  indicesInPlay 
)

utility function for ranking atoms


Generated on Sat May 24 08:36:33 2008 for RDCode by  doxygen 1.5.3