Changeset 170 for trunk/src/SDMathWrapper.cc
- Timestamp:
- 01/06/05 13:52:30 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMathWrapper.cc
r169 r170 32 32 33 33 #include "SDMathWrapper.h" 34 #include "SDMath.h" 35 34 36 35 37 using namespace asap; … … 39 41 const SDMemTableWrapper& off) 40 42 { 41 return SDMemTableWrapper(SDMath::quotient(on.getCP(),42 43 SDMath sdm; 44 return SDMemTableWrapper(sdm.quotient(on.getCP(), off.getCP())); 43 45 } 44 46 45 47 46 void SDMathWrapper::scaleInSitu(SDMemTableWrapper& in, casa::Float factor, casa::Bool doAll)48 void SDMathWrapper::scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll) 47 49 { 48 50 SDMemTable* pIn = in.getPtr(); 49 51 const uInt what = 0; 50 SDMemTable* pOut = SDMath::simpleOperate (*pIn, factor, doAll, what); 52 // 53 SDMath sdm; 54 SDMemTable* pOut = sdm.simpleOperate (*pIn, Float(factor), Bool(doAll), what); 51 55 *pIn = *pOut; 52 56 delete pOut; … … 54 58 55 59 SDMemTableWrapper SDMathWrapper::scale(const SDMemTableWrapper& in, 56 casa::Float factor, casa::Bool doAll)60 float factor, bool doAll) 57 61 { 58 62 const CountedPtr<SDMemTable>& pIn = in.getCP(); 59 63 const uInt what = 0; 60 return CountedPtr<SDMemTable>(SDMath::simpleOperate(*pIn, factor, doAll, what)); 64 SDMath sdm; 65 return CountedPtr<SDMemTable>(sdm.simpleOperate(*pIn, Float(factor), Bool(doAll), what)); 61 66 } 62 67 63 68 64 69 65 void SDMathWrapper::addInSitu(SDMemTableWrapper& in, casa::Float offset, casa::Bool doAll)70 void SDMathWrapper::addInSitu(SDMemTableWrapper& in, float offset, bool doAll) 66 71 { 67 72 SDMemTable* pIn = in.getPtr(); 68 73 const uInt what = 1; 69 SDMemTable* pOut = SDMath::simpleOperate (*pIn, offset, doAll, what); 74 // 75 SDMath sdm; 76 SDMemTable* pOut = sdm.simpleOperate (*pIn, Float(offset), Bool(doAll), what); 70 77 *pIn = *pOut; 71 78 delete pOut; … … 73 80 74 81 SDMemTableWrapper SDMathWrapper::add(const SDMemTableWrapper& in, 75 casa::Float offset, casa::Bool doAll)82 float offset, bool doAll) 76 83 { 77 84 const CountedPtr<SDMemTable>& pIn = in.getCP(); 78 85 const uInt what = 1; 79 return CountedPtr<SDMemTable>(SDMath::simpleOperate(*pIn, offset, doAll, what)); 86 SDMath sdm; 87 return CountedPtr<SDMemTable>(sdm.simpleOperate(*pIn, Float(offset), Bool(doAll), what)); 80 88 } 81 89 … … 83 91 SDMemTableWrapper SDMathWrapper::hanning(const SDMemTableWrapper& in) 84 92 { 85 return SDMemTableWrapper(SDMath::hanning(in.getCP())); 93 SDMath sdm; 94 return SDMemTableWrapper(sdm.hanning(in.getCP())); 86 95 } 87 96 … … 90 99 { 91 100 SDMemTable* pIn = in.getPtr(); 92 SDMemTable* pOut = SDMath::bin (*pIn, Int(width)); 101 SDMath sdm; 102 SDMemTable* pOut = sdm.bin (*pIn, Int(width)); 93 103 *pIn = *pOut; 94 104 delete pOut; … … 99 109 { 100 110 const CountedPtr<SDMemTable>& pIn = in.getCP(); 101 return CountedPtr<SDMemTable>(SDMath::bin(*pIn, Int(width))); 111 SDMath sdm; 112 return CountedPtr<SDMemTable>(sdm.bin(*pIn, Int(width))); 102 113 } 103 114 … … 106 117 { 107 118 SDMemTable* pIn = in.getPtr(); 108 SDMemTable* pOut = SDMath::averagePol (*pIn, mask); 119 SDMath sdm; 120 SDMemTable* pOut = sdm.averagePol (*pIn, mask); 109 121 *pIn = *pOut; 110 122 delete pOut; … … 115 127 { 116 128 const CountedPtr<SDMemTable>& pIn = in.getCP(); 117 return CountedPtr<SDMemTable>(SDMath::averagePol(*pIn, mask)); 129 SDMath sdm; 130 return CountedPtr<SDMemTable>(sdm.averagePol(*pIn, mask)); 118 131 } 119 132 … … 123 136 const std::string& which) 124 137 { 125 return SDMath::statistic(in.getCP(), mask, which); 138 SDMath sdm; 139 return sdm.statistic(in.getCP(), mask, which); 126 140 }
Note: See TracChangeset
for help on using the changeset viewer.