Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMath.cc
r130 r139 204 204 } 205 205 206 void SDMath::multiplyInSitu(SDMemTable* in, Float factor) { 207 SDMemTable* sdmt = new SDMemTable(*in); 208 Table t = sdmt->table(); 209 ArrayColumn<Float> spec(t,"SPECTRA"); 210 for (uInt i=0; i < t.nrow(); i++) { 211 MaskedArray<Float> marr(sdmt->rowAsMaskedArray(i)); 212 marr *= factor; 213 spec.put(i, marr.getArray()); 214 } 215 in = sdmt; 216 delete sdmt;sdmt=0; 217 } 218 206 219 CountedPtr<SDMemTable> 207 220 SDMath::multiply(const CountedPtr<SDMemTable>& in, Float factor) -
trunk/src/SDMath.h
r130 r139 46 46 casa::CountedPtr<SDMemTable> quotient(const casa::CountedPtr<SDMemTable>& on, 47 47 const casa::CountedPtr<SDMemTable>& off); 48 void multiplyInSitu(SDMemTable* in, casa::Float factor); 49 48 50 casa::CountedPtr<SDMemTable> multiply(const casa::CountedPtr<SDMemTable>& in, 49 51 casa::Float factor); -
trunk/src/SDMathWrapper.h
r131 r139 57 57 return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor)); 58 58 } 59 void scaleInSitu(SDMemTableWrapper& in, casa::Float factor) { 60 SDMemTable* sdmt = in.getPtr(); 61 SDMath::multiplyInSitu(in.getPtr(),factor); 62 } 59 63 60 64 SDMemTableWrapper add(const SDMemTableWrapper& in,
Note:
See TracChangeset
for help on using the changeset viewer.