Changeset 2727 for trunk/src/Interpolator1D.cpp
- Timestamp:
- 01/11/13 18:48:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Interpolator1D.cpp
r2720 r2727 17 17 #include "Interpolator1D.h" 18 18 #include "BisectionLocator.h" 19 #include "HuntLocator.h" 19 20 20 21 using namespace casa; … … 23 24 24 25 Interpolator1D::Interpolator1D() 25 : order_( 0),26 : order_(1), 26 27 n_(0), 27 28 x_(0), 28 y_(0) 29 y_(0), 30 locator_(0) 29 31 { 30 locator_ = new BisectionLocator();31 32 } 32 33 … … 42 43 y_ = y; 43 44 n_ = n; 45 createLocator(); 44 46 locator_->set(x, n); 45 47 } … … 50 52 x_ = x; 51 53 n_ = n; 54 createLocator(); 52 55 locator_->set(x, n); 53 56 } … … 65 68 x_ = 0; 66 69 y_ = 0; 70 if (locator_) { 71 delete locator_; 72 locator_ = 0; 73 } 67 74 } 68 75 … … 77 84 } 78 85 86 void Interpolator1D::createLocator() 87 { 88 if (!locator_) { 89 if (n_ > 1000) 90 locator_ = new HuntLocator(); 91 else 92 locator_ = new BisectionLocator(); 93 } 79 94 } 95 96 }
Note: See TracChangeset
for help on using the changeset viewer.