Newer
Older
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* glim.h
Mark Woolrich, FMRIB Image Analysis Group
Copyright (C) 1999-2000 University of Oxford */
/* CCOPYRIGHT */
#include <iostream>
#include <fstream>
#define WANT_STREAM
#define WANT_MATH
#include "newmatap.h"
#include "newmatio.h"
#include "VolumeSeries.h"
#include "Volume.h"
#ifndef NO_NAMESPACE
using namespace NEWMAT;
using namespace TACO;
namespace SIGPROC{
#endif
#if !defined(__glim_h)
#define __glim_h
#define FALSE 0
#define TRUE 1
#define BATCHSIZE 50
class Glim
{
public:
Glim(const VolumeSeries& p_y, const Matrix& p_x);
void Save();
const VolumeSeries& ComputeResids();
void ComputePes();
void SetVrow(const ColumnVector& p_vrow, const int ind);
void SetGlobalVrow(const ColumnVector& p_vrow);
void ComputeSigmaSquared(const int ind);
void UseGlobalVrow();
private:
Glim();
Glim(const Glim&);
Glim& operator=(const Glim& p_glim);
void SetCorrection(const Matrix& corr, const int ind);
void ConstructV(const ColumnVector& p_vrow);
// y = bx + r
const VolumeSeries& y;
const Matrix& x;
int numTS;
int sizeTS;
int numParams;
VolumeSeries r;
Matrix pinv_x;
Matrix V;
Matrix RV;
Matrix RMat;
int batch_size;
// Data to be saved:
Matrix corrections;
Matrix b;
Volume sigmaSquareds;
float dof;
};
#ifndef NO_NAMESPACE
}
#endif
#endif