Changeset 295


Ignore:
Timestamp:
01/25/05 14:57:23 (19 years ago)
Author:
kil064
Message:

track some small changes to SDMath interface (addition of
doTSys arg here and there)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMathWrapper.cc

    r272 r295  
    4343{
    4444    SDMath sdm;
     45    Bool doTSys = True;
    4546    return SDMemTableWrapper(sdm.binaryOperate(on.getCP(), off.getCP(),
    46                              String("QUOTIENT"), preserveContinuum));
     47                             String("QUOTIENT"), preserveContinuum, doTSys));
    4748}
    4849
     
    5051SDMemTableWrapper SDMathWrapper::binaryOperate(const SDMemTableWrapper& left,
    5152                                               const SDMemTableWrapper& right,
    52                                                const std::string& op)
     53                                               const std::string& op, bool doTSys)
    5354{
    5455    SDMath sdm;
    5556    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
     61void SDMathWrapper::scaleInSitu(SDMemTableWrapper& in, float factor, bool doAll, bool doTSys)
    6162{
    6263  SDMemTable* pIn = in.getPtr();
     
    6566  SDMath sdm;
    6667  SDMemTable* pOut = sdm.unaryOperate (*pIn, Float(factor),
    67                                         Bool(doAll), what);
     68                                        Bool(doAll), what, Bool(doTSys));
    6869  *pIn = *pOut;
    6970   delete pOut;
     
    7172
    7273SDMemTableWrapper SDMathWrapper::scale(const SDMemTableWrapper& in,
    73                           float factor, bool doAll)
     74                                       float factor, bool doAll, bool doTSys)
    7475{
    7576  const CountedPtr<SDMemTable>& pIn = in.getCP();
    7677  const uInt what = 0;
    7778  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)));
    8181}
    8282
     
    8989//
    9090  SDMath sdm;
     91  Bool doTSys = False;
    9192  SDMemTable* pOut = sdm.unaryOperate (*pIn, Float(offset),
    92                                         Bool(doAll), what);
     93                                        Bool(doAll), what, doTSys);
    9394  *pIn = *pOut;
    9495   delete pOut;
     
    101102  const uInt what = 1;
    102103  SDMath sdm;
     104  Bool doTSys = False;
    103105  return CountedPtr<SDMemTable>(sdm.unaryOperate(*pIn, Float(offset),
    104                                                   Bool(doAll), what));
     106                                                  Bool(doAll), what, doTSys));
    105107}
    106108
  • trunk/src/SDMathWrapper.h

    r272 r295  
    5151  SDMemTableWrapper binaryOperate (const SDMemTableWrapper& left,
    5252                                   const SDMemTableWrapper& right,
    53                                    const std::string& op);
     53                                   const std::string& op, bool doTSys);
    5454
    5555// 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);
    5958
    6059// Add
Note: See TracChangeset for help on using the changeset viewer.