source: trunk/test/pca_test.cc @ 865

Last change on this file since 865 was 865, checked in by Peter, 16 years ago

changing URL to http://trac.thep.lu.se/trac/yat

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1// $Id: pca_test.cc 865 2007-09-10 19:41:04Z peter $
2
3/*
4  Copyright (C) 2003 Daniel Dalevi
5  Copyright (C) 2004 Jari Häkkinen
6  Copyright (C) 2005 Peter Johansson
7  Copyright (C) 2006, 2007 Jari Häkkinen
8
9  This file is part of the yat library, http://trac.thep.lu.se/trac/yat
10
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 2 of the
14  License, or (at your option) any later version.
15
16  The yat library is distributed in the hope that it will be useful,
17  but 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, write to the Free Software
23  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  02111-1307, USA.
25*/
26
27#include "yat/utility/matrix.h"
28#include "yat/utility/PCA.h"
29
30#include <cmath>
31#include <fstream>
32#include <string>
33#include <vector>
34
35
36using namespace theplu::yat;
37int main()
38{
39  utility::matrix A( 3, 4 );
40  for( size_t i = 0; i < 3; ++i )
41    for( size_t j = 0; j < 4; ++j )
42      A(i,j)= sin( static_cast<double>(i+j+2+(i+1)*(j+1)) );
43  A.transpose();
44  utility::PCA pca(A);
45
46  return 0;
47}
48
Note: See TracBrowser for help on using the repository browser.