Changeset 178
- Timestamp:
- 01/07/05 11:19:31 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMathWrapper.cc
r175 r178 88 88 } 89 89 90 void SDMathWrapper::hanningInSitu(SDMemTableWrapper& in, bool doAll) 90 91 void SDMathWrapper::smoothInSitu(SDMemTableWrapper& in, const std::string& kernel, float width, bool doAll) 91 92 { 92 93 SDMemTable* pIn = in.getPtr(); 93 94 SDMath sdm; 94 SDMemTable* pOut = sdm. hanning (*pIn, Bool(doAll));95 SDMemTable* pOut = sdm.smooth(*pIn, String(kernel), Float(width), Bool(doAll)); 95 96 *pIn = *pOut; 96 97 delete pOut; 97 98 } 98 99 99 SDMemTableWrapper SDMathWrapper::hanning (const SDMemTableWrapper& in, bool doAll) 100 101 SDMemTableWrapper SDMathWrapper::smooth (const SDMemTableWrapper& in, const std::string& kernel, 102 float width, bool doAll) 100 103 { 101 104 const CountedPtr<SDMemTable>& pIn = in.getCP(); 102 105 SDMath sdm; 103 return CountedPtr<SDMemTable>(sdm. hanning(*pIn, Bool(doAll)));106 return CountedPtr<SDMemTable>(sdm.smooth(*pIn, String(kernel), Float(width), Bool(doAll))); 104 107 } 105 108 -
trunk/src/SDMathWrapper.h
r175 r178 56 56 SDMemTableWrapper add(const SDMemTableWrapper& in, float offset, bool all); 57 57 58 // Hanning59 void hanningInSitu (SDMemTableWrapper& in, bool doAll);60 SDMemTableWrapper hanning(const SDMemTableWrapper& in, bool doAll);58 // Smooth 59 void smoothInSitu (SDMemTableWrapper& in, const std::string& kernel, float width, bool doAll); 60 SDMemTableWrapper smooth (const SDMemTableWrapper& in, const std::string& kernel, float width, bool doAll); 61 61 62 62 // Bin up -
trunk/src/python_SDMath.cc
r173 r178 72 72 def("add_insitu", &SDMathWrapper::addInSitu); 73 73 // 74 def(" hanning", &SDMathWrapper::hanning);75 def(" hanning_insitu", &SDMathWrapper::hanningInSitu);74 def("smooth", &SDMathWrapper::smooth); 75 def("smooth_insitu", &SDMathWrapper::smoothInSitu); 76 76 // 77 77 def("average", &SDMathWrapper::average);
Note:
See TracChangeset
for help on using the changeset viewer.