-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTDistribution.h
executable file
·54 lines (48 loc) · 1.3 KB
/
TDistribution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* TDistribution.h
*
* Created on: May 4, 2012
* Author: nhatuan
*/
#ifndef TDISTRIBUTION_H_
#define TDISTRIBUTION_H_
#include <fstream>
#include "Sample.h"
#include <vector>
#include "utils.h"
#include <stdio.h>
class TDistribution {
public:
TDistribution();
TDistribution(const TDistribution &t);
virtual ~TDistribution();
void setDegreeOfFreedom(float d);
void addNewSample(Sample sample);
void removeSampleWithName(string name);
void calculateParams();
float calculateProb(float x, float y);
float * calculateProbArray(float *x, float *y);
vector<float> calculateWeights();
void updateParams();
int getNumberOfSamples();
bool isEqual(TDistribution t);
string toString();
void toFile(string fileName);
void removeAll();
void updateAveCDistance();
float getDeterminant();
float ** getCov();
float * getLocParam();
//float ** getCor();
float ** getInv();
int getDOF();
vector<Sample> getSamples();
float dof; // degree of freedom
float determinant; // determinant of correlation matrix
//float ** cor, ** inv, ** cov; // correlation, inverse of correlation, covariance matrix
float ** cov, ** inv;
float * locParam; // location parameters
vector<Sample> samples; // list of samples
float aveCDistance; // average contrast distance to the mean
};
#endif /* TDISTRIBUTION_H_ */