-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpdfmath.h
63 lines (55 loc) · 1.45 KB
/
pdfmath.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
55
56
57
58
59
60
61
62
63
#ifndef _pdfmath_
#define _pdfmath_
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include "cpdf.h"
#include <vector>
using namespace std;
//Mutual dependency
//#pragma message "cell_cpdf incomplete"
//class cell_cpdf;
//#pragma message "gate_cpdf incomplete"
//class gate_cpdf;
//#pragma message "wire_cpdf incomplete"
//class wire_cpdf;
class cpdf;
static float SMALLPHI_COEFF = 1 / sqrt(2 * M_PI);
// protypes for pdf math
cpdf max(cpdf & a, cpdf & b);
cpdf min(cpdf & a, cpdf & b);
float sigma(cpdf & a);
float rho(cpdf &a, cpdf &b, float sigmaA, float sigmaB);
float theta(float sigmaA, float sigmaB, float rho);
float calc_x(cpdf &a, cpdf &b, float theta);
float bigphi(float y);
float smallphi(float x);
float maxmean(cpdf &a, cpdf &b, float bigphi, float theta, float smallphi);
float minmean(cpdf &a, cpdf &b, float bigphi, float theta, float smallphi);
float maxvariance(
cpdf & a,
cpdf & b,
float sigmaA,
float sigmaB,
float theta,
float bigphi,
float smallphi,
float mean
);
float minvariance(
cpdf & a,
cpdf & b,
float sigmaA,
float sigmaB,
float theta,
float bigphi,
float smallphi,
float mean
);
cpdf multi_max(vector<cpdf> & to_max);
cpdf multi_min(vector<cpdf> & to_min);
//float variance
float variance(vector<float> values);
// prototypes for test functions
void test_math();
#endif