Last change
on this file since 389 was
389,
checked in by Peter, 18 years ago
|
moved kernel to regression namespace and tried to fix some dox issues
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Line | |
---|
1 | // $Id: Polynomial.h 389 2005-08-15 11:37:07Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_statistics_regression_polynomial_ |
---|
4 | #define _theplu_statistics_regression_polynomial_ |
---|
5 | |
---|
6 | #include <c++_tools/statistics/OneDimensional.h> |
---|
7 | #include <c++_tools/statistics/MultiDimensional.h> |
---|
8 | |
---|
9 | #include <c++_tools/gslapi/vector.h> |
---|
10 | |
---|
11 | #include <gsl/gsl_multifit.h> |
---|
12 | |
---|
13 | |
---|
14 | namespace theplu { |
---|
15 | namespace statistics { |
---|
16 | namespace regression { |
---|
17 | |
---|
18 | /// |
---|
19 | /// @todo document |
---|
20 | /// |
---|
21 | class Polynomial : public OneDimensional |
---|
22 | { |
---|
23 | public: |
---|
24 | |
---|
25 | /// |
---|
26 | /// |
---|
27 | /// |
---|
28 | inline Polynomial(size_t power) |
---|
29 | : OneDimensional(), power_(power) {} |
---|
30 | |
---|
31 | /// |
---|
32 | /// @brief Destructor |
---|
33 | /// |
---|
34 | inline ~Polynomial(void) {}; |
---|
35 | |
---|
36 | /// |
---|
37 | /// |
---|
38 | /// |
---|
39 | void fit(const gslapi::vector& x, const gslapi::vector& y); |
---|
40 | |
---|
41 | /// |
---|
42 | /// |
---|
43 | /// |
---|
44 | gslapi::vector fit_parameters(void) { return md_.fit_parameters(); } |
---|
45 | |
---|
46 | inline void fit(const gslapi::vector& x, const gslapi::vector& y, |
---|
47 | const gslapi::vector& w) { assert(0); } |
---|
48 | |
---|
49 | inline void predict(const double x, double& y, double& y_err, |
---|
50 | const double w=1) { assert(0); } |
---|
51 | |
---|
52 | inline std::ostream& print(std::ostream& s) const |
---|
53 | { assert(0); return s; } |
---|
54 | |
---|
55 | inline std::ostream& print_header(std::ostream& s) const |
---|
56 | { assert(0); return s; } |
---|
57 | |
---|
58 | |
---|
59 | private: |
---|
60 | MultiDimensional md_; |
---|
61 | size_t power_; |
---|
62 | |
---|
63 | }; |
---|
64 | |
---|
65 | |
---|
66 | }}} // of namespaces regression, statisitcs and thep |
---|
67 | |
---|
68 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.