Changeset 1049 for trunk/yat/regression/Local.cc
- Timestamp:
- Feb 7, 2008, 3:50:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/regression/Local.cc
r1015 r1049 32 32 #include <cassert> 33 33 #include <iostream> 34 #include <sstream> 35 #include <stdexcept> 34 36 35 37 namespace theplu { … … 53 55 void Local::fit(const size_t step_size, const size_t nof_points) 54 56 { 55 if (step_size==0 || nof_points<3){ 56 std::cerr << "yat::regression::Local " 57 << "Parameters invalid. Fitting ignored." << std::endl; 58 return; 57 if (step_size==0){ 58 std::stringstream ss; 59 ss << "yat::regression::local: step_size must be larger than zero."; 60 throw std::runtime_error(ss.str()); 61 } 62 if (nof_points<3){ 63 std::stringstream ss; 64 ss << "yat::regression::local: too few data points. " 65 << "At least 3 data points are needed to perform fitting."; 66 throw std::runtime_error(ss.str()); 59 67 } 60 68
Note: See TracChangeset
for help on using the changeset viewer.