Changeset 64


Ignore:
Timestamp:
Apr 19, 2004, 2:32:22 PM (19 years ago)
Author:
Peter
Message:

minmax GSL added

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/vector.cc

    r63 r64  
    126126  }
    127127
     128
     129
     130
     131  std::pair<u_int,u_int> vector::minmax_index() const
     132  {
     133    size_t min_index=0;
     134    size_t max_index=0;
     135    void gsl_vector_minmax_index (const gsl_vector * v_, size_t * min_index, size_t * max_index);
     136    return std::pair<u_int,u_int>(min_index, max_index);
     137  }
     138
     139
     140
    128141//Peter, add default checking all elements using GSL
    129142  std::pair<u_int,u_int> vector::minmax_index(const std::vector<u_int>& subset ) const
  • trunk/src/vector.h

    r63 r64  
    8989    ///
    9090    inline gsl_vector* gsl_vector_pointer(void) { return v_; }
     91
     92    ///This function returns the indices of the minimum and maximum values in
     93    ///the vector, storing them in imin and imax. When
     94    ///there are several equal minimum or maximum elements then the lowest
     95    ///indices are returned. @return Index corresponding to the smallest
     96    ///and largest value.
     97    ///
     98    std::pair<u_int,u_int> vector::minmax_index() const;
    9199
    92100    ///This function returns the indices of the minimum and maximum values in
     
    96104    ///and largest value.
    97105    ///
    98     std::pair<u_int,u_int> vector::minmax_index(const std::vector<u_int>& subset ) const;
     106    std::pair<size_t,size_t> vector::minmax_index(const std::vector<size_t>& subset ) const;
    99107
    100108    ///
Note: See TracChangeset for help on using the changeset viewer.