Ignore:
Timestamp:
Sep 21, 2007, 4:10:07 PM (14 years ago)
Author:
Markus Ringnér
Message:

Added support to utility::vector for gsl-functions that finds indices to the k largest/smallest elements in a vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/vector.h

    r878 r879  
    547547  void sort_index(std::vector<size_t>& sort_index, const vector& invec);
    548548
     549  /** Similar to sort_index but creates a vector with indices to the \a k
     550  smallest elements in \a invec. 
     551  */
     552  void sort_smallest_index(std::vector<size_t>& sort_index, size_t k, const
     553  vector& invec);
     554
     555  /** Similar to sort_index but creates a vector with indices to the \a k
     556  largest elements in \a invec. 
     557  */
     558  void sort_largest_index(std::vector<size_t>& sort_index, size_t k, const
     559  vector& invec);
     560
     561 
    549562
    550563  /**
Note: See TracChangeset for help on using the changeset viewer.