source: trunk/lib/utility/kNNI.h @ 303

Last change on this file since 303 was 303, checked in by Peter, 17 years ago

docs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1014 bytes
Line 
1// $Id: kNNI.h 303 2005-04-30 16:17:35Z peter $
2
3#ifndef _theplu_utility_knni_
4#define _theplu_utility_knni_
5
6#include <c++_tools/utility/NNI.h>
7
8#include <iostream>
9#include <vector>
10
11namespace theplu {
12namespace utility {
13
14  ///
15  /// kNNI is the binary weight implementation of NNI. This follows
16  /// the work done by Troyanskaya et al. cited in the NNI document
17  /// referred to in the NNI class documentation.
18  ///
19  /// This is a special case of the WeNNI, but is maintained since it
20  /// is faster than the more general WeNNI.
21  ///
22  /// @see NNI and WeNNI
23  ///
24  class kNNI : public NNI
25  {
26  public:
27    ///
28    /// Constructor
29    ///
30    kNNI(const gslapi::matrix& matrix,const gslapi::matrix& weight,
31         const u_int neighbours);
32
33    ///
34    /// Perform kNNI on data in \a matrix with binary uncertainty
35    /// weights in \a weight using \a neighbours for the new impute
36    /// value.
37    ///
38    u_int estimate(void);
39
40  private:
41    vector<u_int> mv_rows_; // index to rows that have values to estimate
42  };
43
44}} // of namespace utility and namespace theplu
45
46#endif
Note: See TracBrowser for help on using the repository browser.