Last change
on this file since 386 was
386,
checked in by Jari Häkkinen, 18 years ago
|
Extracted the underlying GSL multifit algo from Polynomial into separate
class (MultiDimensional?).
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
865 bytes
|
Line | |
---|
1 | // $Id: MultiDimensional.h 386 2005-08-14 23:16:52Z jari $ |
---|
2 | |
---|
3 | #ifndef _theplu_statistics_regression_multidimensional_ |
---|
4 | #define _theplu_statistics_regression_multidimensional_ |
---|
5 | |
---|
6 | #include <c++_tools/gslapi/matrix.h> |
---|
7 | #include <c++_tools/gslapi/vector.h> |
---|
8 | |
---|
9 | #include <gsl/gsl_multifit.h> |
---|
10 | |
---|
11 | |
---|
12 | namespace theplu { |
---|
13 | namespace statistics { |
---|
14 | namespace regression { |
---|
15 | |
---|
16 | /// |
---|
17 | /// |
---|
18 | /// |
---|
19 | class MultiDimensional |
---|
20 | { |
---|
21 | public: |
---|
22 | |
---|
23 | /// |
---|
24 | /// |
---|
25 | /// |
---|
26 | inline MultiDimensional(void) : chisquare_(0), work_(NULL) {} |
---|
27 | |
---|
28 | /// |
---|
29 | /// @brief Destructor |
---|
30 | /// |
---|
31 | ~MultiDimensional(void); |
---|
32 | |
---|
33 | /// |
---|
34 | /// |
---|
35 | /// |
---|
36 | void fit(const gslapi::matrix& X, const gslapi::vector& y); |
---|
37 | |
---|
38 | /// |
---|
39 | /// |
---|
40 | /// |
---|
41 | gslapi::vector fit_parameters(void) { return fit_parameters_; } |
---|
42 | |
---|
43 | private: |
---|
44 | double chisquare_; |
---|
45 | gslapi::matrix covariance_; |
---|
46 | gslapi::vector fit_parameters_; |
---|
47 | gsl_multifit_linear_workspace* work_; |
---|
48 | |
---|
49 | }; |
---|
50 | |
---|
51 | |
---|
52 | }}} // of namespaces regression, statisitcs and thep |
---|
53 | |
---|
54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.