ProfileCovariance.h
1 /***************************************************************************
2  *
3  * Copyright (C) 2011 by Stefan Oslowski
4  * Licensed under the Academic Free License version 2.1
5  *
6  ****************************************************************************/
7 
8 #ifndef __Pulsar_ProfileCovariance_h
9 #define __Pulsar_ProfileCovariance_h
10 
11 #include "Pulsar/Algorithm.h"
12 
13 namespace Pulsar
14 {
15  class Profile;
16 
20  class ProfileCovariance : public Algorithm
21  {
22  public:
23 
25  // virtual ProfileCovariance* clone () const = 0;
26 
28  virtual std::string get_name () const = 0;
29 
31  virtual void add_Profile (const Profile* ) = 0;
32 
34  virtual void finalize () = 0;
35 
37  virtual void eigen () = 0;
38 
40  virtual unsigned get_count () = 0;
41 
43  virtual void set_count ( unsigned ) = 0;
44 
46  virtual unsigned get_rank () = 0;
47 
49  virtual void set_rank ( unsigned ) = 0;
50 
52  virtual void reset () = 0;
53 
54  protected:
55 
58 
60  bool finalized;
61 
63  unsigned rank;
64 
66  unsigned count;
67 
69  double wt_sum;
70 
72  double wt_sum2;
73  };
74 }
75 
76 #endif
double wt_sum2
Sum of squard weights.
Definition: ProfileCovariance.h:77
double wt_sum
Sum of weights.
Definition: ProfileCovariance.h:74
unsigned count
The count of profiles used to estimate the covariance matrix.
Definition: ProfileCovariance.h:71
virtual void set_count(unsigned)=0
Set the count of profiles used to estimate the covariance matrix.
virtual std::string get_name() const =0
Return a copy constructed from instance of self.
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
ProfileCovariance()
Default constructor initializes the following attributes to nil.
Definition: ProfileCovariance.C:11
virtual unsigned get_rank()=0
Get the rank of covariance matrix.
bool finalized
Has the covariance matrix.
Definition: ProfileCovariance.h:65
virtual void set_rank(unsigned)=0
Set the rank of covariance matrix.
virtual void eigen()=0
Perform eigen decomposition of covariance matrix.
virtual unsigned get_count()=0
Get the count of profiles used to estimate the covariance matrix.
virtual void reset()=0
Reset the covariance matrix calculations.
unsigned rank
Rank of the covariance matrix.
Definition: ProfileCovariance.h:68
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual void add_Profile(const Profile *)=0
Adds the given Profile to the covariance matrix estimate.
virtual void finalize()=0
Compute the covariance matrix after all the profiles were added.

Generated using doxygen 1.8.17