Last change
on this file since 265 was
265,
checked in by hozdoba, 13 years ago
|
Corrections après tests sur titane
|
File size:
1.0 KB
|
Rev | Line | |
---|
[265] | 1 | #include "maximum.hpp" |
---|
| 2 | #include <algorithm> |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | namespace xmlioserver |
---|
| 6 | { |
---|
| 7 | namespace func |
---|
| 8 | { |
---|
| 9 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 10 | |
---|
| 11 | CMaximum::CMaximum(DoubleArray doutput) |
---|
| 12 | : SuperClass(StdString("maximum"), doutput) |
---|
| 13 | { /* Ne rien faire de plus */ } |
---|
| 14 | |
---|
| 15 | CMaximum::~CMaximum(void) |
---|
| 16 | { /* Ne rien faire de plus */ } |
---|
| 17 | |
---|
| 18 | //--------------------------------------------------------------- |
---|
| 19 | |
---|
| 20 | void CMaximum::apply(const DoubleArray _dinput, |
---|
| 21 | DoubleArray _doutput) |
---|
| 22 | { |
---|
| 23 | const double * it1 = _dinput->data(), |
---|
| 24 | * end1 = _dinput->data() + _dinput->num_elements(); |
---|
| 25 | double * it = _doutput->data(); |
---|
| 26 | if (this->nbcall == 1) |
---|
| 27 | for (; it1 != end1; it1++, it++) *it = *it1; |
---|
| 28 | else for (; it1 != end1; it1++, it++) *it = std::max(*it1, *it); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | //--------------------------------------------------------------- |
---|
| 32 | |
---|
| 33 | } // namespace func |
---|
| 34 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.