annotate pca.h @ 556:78c5913787ca libavutil

Add prototypes to header (based on code by ramiro)
author michael
date Sun, 17 Aug 2008 15:50:20 +0000
parents 200789f57b62
children 9f3f45596ecf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
550
200789f57b62 Principal component analysis
michael
parents:
diff changeset
1 /*
200789f57b62 Principal component analysis
michael
parents:
diff changeset
2 * Principal component analysis
200789f57b62 Principal component analysis
michael
parents:
diff changeset
3 * Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
200789f57b62 Principal component analysis
michael
parents:
diff changeset
4 *
200789f57b62 Principal component analysis
michael
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
200789f57b62 Principal component analysis
michael
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
200789f57b62 Principal component analysis
michael
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
200789f57b62 Principal component analysis
michael
parents:
diff changeset
8 * version 2 of the License, or (at your option) any later version.
200789f57b62 Principal component analysis
michael
parents:
diff changeset
9 *
200789f57b62 Principal component analysis
michael
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
200789f57b62 Principal component analysis
michael
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
200789f57b62 Principal component analysis
michael
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
200789f57b62 Principal component analysis
michael
parents:
diff changeset
13 * Lesser General Public License for more details.
200789f57b62 Principal component analysis
michael
parents:
diff changeset
14 *
200789f57b62 Principal component analysis
michael
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
200789f57b62 Principal component analysis
michael
parents:
diff changeset
16 * License along with this library; if not, write to the Free Software
200789f57b62 Principal component analysis
michael
parents:
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
200789f57b62 Principal component analysis
michael
parents:
diff changeset
18 *
200789f57b62 Principal component analysis
michael
parents:
diff changeset
19 */
200789f57b62 Principal component analysis
michael
parents:
diff changeset
20
200789f57b62 Principal component analysis
michael
parents:
diff changeset
21 /**
200789f57b62 Principal component analysis
michael
parents:
diff changeset
22 * @file pca.h
200789f57b62 Principal component analysis
michael
parents:
diff changeset
23 * Principal component analysis
200789f57b62 Principal component analysis
michael
parents:
diff changeset
24 */
200789f57b62 Principal component analysis
michael
parents:
diff changeset
25
556
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
26 struct PCA *ff_pca_init(int n);
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
27 void ff_pca_free(struct PCA *pca);
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
28 void ff_pca_add(struct PCA *pca, double *v);
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
29 int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue);
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
30
78c5913787ca Add prototypes to header (based on code by ramiro)
michael
parents: 550
diff changeset
31
550
200789f57b62 Principal component analysis
michael
parents:
diff changeset
32 typedef struct PCA{
200789f57b62 Principal component analysis
michael
parents:
diff changeset
33 int count;
200789f57b62 Principal component analysis
michael
parents:
diff changeset
34 int n;
200789f57b62 Principal component analysis
michael
parents:
diff changeset
35 double *covariance;
200789f57b62 Principal component analysis
michael
parents:
diff changeset
36 double *mean;
200789f57b62 Principal component analysis
michael
parents:
diff changeset
37 }PCA;