Public Types | |
typedef HxTagTransInVar | TransVarianceCategory |
Functor is translation invariant. More... | |
Public Methods | |
HxBpoAddSat (HxTagList &t) | |
Constructor : empty. More... | |
DstValT | doIt (const Src1ValT &arg1, const Src2ValT &arg2) |
Actual operation : # if(x+y)<=MAXVAL return (x + y) else return MAXVAL #. More... | |
Static Public Methods | |
HxString | className () |
The name : "addSat". More... |
|
Functor is translation invariant.
|
|
Constructor : empty.
00031 { 00032 //better use taglist to get minSat maxSat values 00033 int maxSat = HxGetTag<int>(t, "maxSat", 0); 00034 for (int i=1; i<=maxValSat.dim(); i++) 00035 maxValSat.setValue(i, maxSat); 00036 //lt maxValSat.setValue(i, std::numeric_limits<Src1ValT::ValueType>::max()); 00037 // std::cout << "welcome in " << typeid(*this).name() << ", maxValSat=" << maxValSat << std::endl; 00038 00039 } |
|
Actual operation : # if(x+y)<=MAXVAL return (x + y) else return MAXVAL #.
00047 { 00048 DstValT ret; 00049 for (int i=1; i<=arg1.dim(); i++) { 00050 ret.setValue(i, 00051 (double)arg1.getValue(i)+(double)arg2.getValue(i)>maxValSat.getValue(i) ? 00052 maxValSat.getValue(i) : 00053 arg1.getValue(i)+arg2.getValue(i) 00054 ); 00055 } 00056 return ret; 00057 } |
|
The name : "addSat".
00061 { return HxString("addSat"); } |