Ignore:
Timestamp:
Aug 16, 2004, 2:01:15 PM (18 years ago)
Author:
Peter
Message:

added sorting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ConsensusInputRanker.h

    r115 r133  
    66// C++ tools include
    77/////////////////////
     8#include "InputRanker.h"
     9#include "matrix.h"
     10#include "Score.h"
     11#include "vector.h"
    812
    913// Standard C++ includes
     
    1519
    1620  ///
    17   /// Class for
     21  /// Class for ranking rows in a data matrix versus a target vector
     22  /// in a cross validation manner. The rows are sorted with respect
     23  /// to median of their ranks.
    1824  ///   
    1925  class ConsensusInputRanker
     
    2228  public:
    2329    ///
    24     /// Constructor taking data, target, Score object
     30    /// Constructor taking \a data, \a target, Score object
    2531    ///
    26     ConsensusInputRanker(const gslapi::matrix&,
    27                          const gslapi::vector&,
     32    ConsensusInputRanker(const gslapi::matrix& data,
     33                         const gslapi::vector& target,
    2834                         Score&,
    2935                         const size_t = 1,
    3036                         const size_t = 3);
    3137
     38    ///
     39    /// @return id of input ranked as number \a i
     40    ///
     41    inline size_t id(const size_t i) const {return id_[i];}
     42   
     43    ///
     44    /// @return rank for id \a i
     45    ///
     46    inline size_t rank(const size_t i) const {return rank_[i];}
    3247
    3348
    3449  private:
     50    std::vector<size_t> id_;
    3551    std::vector<InputRanker> input_rankers_;
    3652    size_t k_;
    3753    size_t nof_rankers_;
     54    std::vector<size_t> rank_;
    3855  };
    3956
Note: See TracChangeset for help on using the changeset viewer.