Changeset 295
- Timestamp:
- 01/25/05 14:57:23 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMathWrapper.cc
r272 r295 43 43 { 44 44 SDMath sdm; 45 Bool doTSys = True; 45 46 return SDMemTableWrapper(sdm.binaryOperate(on.getCP(), off.getCP(), 46 String("QUOTIENT"), preserveContinuum ));47 String("QUOTIENT"), preserveContinuum, doTSys)); 47 48 } 48 49 … … 50 51 SDMemTableWrapper SDMathWrapper::binaryOperate(const SDMemTableWrapper& left, 51 52 const SDMemTableWrapper& right, 52 const std::string& op )53 const std::string& op, bool doTSys) 53 54 { 54 55 SDMath sdm; 55 56 return SDMemTableWrapper(sdm.binaryOperate(left.getCP(), right.getCP(), 56 String(op), False ));57 } 58 59 60 void SDMathWrapper::scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll )57 String(op), False, Bool(doTSys))); 58 } 59 60 61 void SDMathWrapper::scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll, bool doTSys) 61 62 { 62 63 SDMemTable* pIn = in.getPtr(); … … 65 66 SDMath sdm; 66 67 SDMemTable* pOut = sdm.unaryOperate (*pIn, Float(factor), 67 Bool(doAll), what );68 Bool(doAll), what, Bool(doTSys)); 68 69 *pIn = *pOut; 69 70 delete pOut; … … 71 72 72 73 SDMemTableWrapper SDMathWrapper::scale(const SDMemTableWrapper& in, 73 float factor, bool doAll)74 float factor, bool doAll, bool doTSys) 74 75 { 75 76 const CountedPtr<SDMemTable>& pIn = in.getCP(); 76 77 const uInt what = 0; 77 78 SDMath sdm; 78 return CountedPtr<SDMemTable>(sdm.unaryOperate(*pIn, 79 Float(factor), 80 Bool(doAll), what)); 79 return CountedPtr<SDMemTable>(sdm.unaryOperate(*pIn, Float(factor), Bool(doAll), 80 what, Bool (doTSys))); 81 81 } 82 82 … … 89 89 // 90 90 SDMath sdm; 91 Bool doTSys = False; 91 92 SDMemTable* pOut = sdm.unaryOperate (*pIn, Float(offset), 92 Bool(doAll), what );93 Bool(doAll), what, doTSys); 93 94 *pIn = *pOut; 94 95 delete pOut; … … 101 102 const uInt what = 1; 102 103 SDMath sdm; 104 Bool doTSys = False; 103 105 return CountedPtr<SDMemTable>(sdm.unaryOperate(*pIn, Float(offset), 104 Bool(doAll), what ));106 Bool(doAll), what, doTSys)); 105 107 } 106 108 -
trunk/src/SDMathWrapper.h
r272 r295 51 51 SDMemTableWrapper binaryOperate (const SDMemTableWrapper& left, 52 52 const SDMemTableWrapper& right, 53 const std::string& op );53 const std::string& op, bool doTSys); 54 54 55 55 // Multiply 56 void scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll); 57 SDMemTableWrapper scale(const SDMemTableWrapper& in, 58 float factor, bool all); 56 void scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll, bool doTSys); 57 SDMemTableWrapper scale(const SDMemTableWrapper& in, float factor, bool all, bool doTSys); 59 58 60 59 // Add
Note:
See TracChangeset
for help on using the changeset viewer.