1 | // $Id: qQN.cc 989 2009-03-14 10:55:23Z jari $ |
---|
2 | |
---|
3 | /* |
---|
4 | Copyright (C) 2009 Jari Häkkinen |
---|
5 | |
---|
6 | This file is part of the Normalizers plug-in package for BASE |
---|
7 | (net.sf.based.normalizers). The package is available at |
---|
8 | http://baseplugins.thep.lu.se/ BASE main site is |
---|
9 | http://base.thep.lu.se/ |
---|
10 | |
---|
11 | This is free software; you can redistribute it and/or modify it |
---|
12 | under the terms of the GNU General Public License as published by |
---|
13 | the Free Software Foundation; either version 3 of the License, or |
---|
14 | (at your option) any later version. |
---|
15 | |
---|
16 | The software is distributed in the hope that it will be useful, but |
---|
17 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
19 | General Public License for more details. |
---|
20 | |
---|
21 | You should have received a copy of the GNU General Public License |
---|
22 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | */ |
---|
24 | |
---|
25 | #include "yat/normalizer/ColumnNormalizer.h" |
---|
26 | #include "yat/normalizer/qQuantileNormalizer.h" |
---|
27 | |
---|
28 | #include "yat/utility/Matrix.h" |
---|
29 | |
---|
30 | #include <fstream> |
---|
31 | #include <iostream> |
---|
32 | |
---|
33 | using namespace theplu::yat; |
---|
34 | |
---|
35 | int main(int argc, char* argv[]) |
---|
36 | { |
---|
37 | using namespace normalizer; |
---|
38 | |
---|
39 | utility::Matrix m(std::cin,'\t'); |
---|
40 | utility::Matrix result(m.rows(),m.columns()); |
---|
41 | qQuantileNormalizer qqn(m.begin_column(0), m.end_column(0),100); |
---|
42 | ColumnNormalizer<qQuantileNormalizer> cn(qqn); |
---|
43 | cn(m,result); |
---|
44 | std::cout << result << std::endl; |
---|
45 | |
---|
46 | return 0; |
---|
47 | } |
---|