source: Sophya/trunk/ArchTOIPipe/Processors/correl.h@ 2070

Last change on this file since 2070 was 1944, checked in by aubourg, 24 years ago

decorrelateur wiener

File size: 1.0 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2
3// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
4// Eric Aubourg
5// Christophe Magneville
6// Reza Ansari
7// $Id: correl.h,v 1.1 2002-03-23 23:05:21 aubourg Exp $
8
9#ifndef CORREL_H
10#define CORREL_H
11
12#include "config.h"
13
14#ifndef NO_SOPHYA
15#include "machdefs.h"
16using namespace SOPHYA;
17#endif
18
19
20class CorrelEstimator {
21public:
22 CorrelEstimator(int n, int wsize); // n = longueur calcul autocorr, wsize = nsamples pour calcul
23 ~CorrelEstimator();
24
25 void push(int_4 t, r_8 x, r_8 y);
26 void push(int_4 t, r_8 x); // auto-correlation
27
28 r_8 correl(int k); // correlation r_k
29 int_4 ns4correl(int k); // n. samples used for correl
30
31 void reset();
32
33protected:
34 int winsize;
35 int ncor;
36
37 int_4* mT;
38 r_8* mX;
39 r_8* mY;
40
41 int_4 mNDat;
42 int_4 mINext;
43 int_4 mIFirst;
44
45 r_8* mC;
46 int_4* mNC;
47
48 void pop();
49 void recompute();
50};
51
52
53
54#endif
55
Note: See TracBrowser for help on using the repository browser.