Changeset 266 for XMLIO_V2/dev/common/src/xmlio/functor
- Timestamp:
- 09/06/11 16:45:08 (13 years ago)
- Location:
- XMLIO_V2/dev/common/src/xmlio/functor
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/common/src/xmlio/functor/average.cpp
r219 r266 16 16 //--------------------------------------------------------------- 17 17 18 void CAverage::apply(const DoubleArray UNUSED(dinput),19 DoubleArray UNUSED(doutput))18 void CAverage::apply(const DoubleArray _dinput, 19 DoubleArray _doutput) 20 20 { 21 ERROR("CAverage::apply(...)", << "Not implemented yet !"); 21 const double * it1 = _dinput->data(), 22 * end1 = _dinput->data() + _dinput->num_elements(); 23 double * it = _doutput->data(); 24 if (this->nbcall == 1) 25 for (; it1 != end1; it1++, it++) *it = *it1; 26 else for (; it1 != end1; it1++, it++) *it += *it1; 22 27 } 23 24 //--------------------------------------------------------------- 25 28 29 void CAverage::final(void) 30 { 31 double * it1 = this->getDataOutput()->data(), 32 * end1 = this->getDataOutput()->data() + this->getDataOutput()->num_elements(); 33 for (; it1 != end1; it1++) *it1 /= this->nbcall; 34 this->nbcall = 0; 35 } 26 36 } // namespace func 27 37 } // namespace xmlioserver -
XMLIO_V2/dev/common/src/xmlio/functor/average.hpp
r219 r266 27 27 /// Traitement /// 28 28 virtual void apply(const DoubleArray dinput, DoubleArray doutput); 29 29 virtual void final(void) ; 30 30 31 /// Destructeur /// 31 32 virtual ~CAverage(void); -
XMLIO_V2/dev/common/src/xmlio/functor/functor_type.hpp
r219 r266 5 5 #include "instant.hpp" 6 6 #include "once.hpp" 7 #include "maximum.hpp" 8 #include "minimum.hpp" 7 9 8 10 #endif //__XMLIO_functor_type__ -
XMLIO_V2/dev/common/src/xmlio/functor/instant.cpp
r219 r266 16 16 //--------------------------------------------------------------- 17 17 18 void CInstant::apply(const DoubleArray UNUSED(dinput),19 DoubleArray UNUSED(doutput))18 void CInstant::apply(const DoubleArray _dinput, 19 DoubleArray _doutput) 20 20 { 21 ERROR("CInstant::apply(...)", << "Not implemented yet !"); 21 const double * it1 = _dinput->data(), 22 * end1 = _dinput->data() + _dinput->num_elements(); 23 double * it = _doutput->data(); 24 for (; it1 != end1; it1++, it++) *it = *it1; 22 25 } 23 26 -
XMLIO_V2/dev/common/src/xmlio/functor/once.cpp
r219 r266 16 16 //--------------------------------------------------------------- 17 17 18 void COnce::apply(const DoubleArray UNUSED(dinput),19 DoubleArray UNUSED(doutput))18 void COnce::apply(const DoubleArray _dinput, 19 DoubleArray _doutput) 20 20 { 21 ERROR("COnce::apply(...)", << "Not implemented yet !"); 21 const double * it1 = _dinput->data(), 22 * end1 = _dinput->data() + _dinput->num_elements(); 23 double * it = _doutput->data(); 24 for (; it1 != end1; it1++, it++) *it = *it1; 22 25 } 23 26
Note: See TracChangeset
for help on using the changeset viewer.