Last change
on this file since 403 was
369,
checked in by ymipsl, 12 years ago
|
Major Update
- redesign Type and attribute manipulation
- add enumerate type and attribute
- use blitz class array instead of boost class array
YM
|
File size:
1.0 KB
|
Rev | Line | |
---|
[266] | 1 | #include "maximum.hpp" |
---|
[369] | 2 | #include "array_new.hpp" |
---|
[266] | 3 | |
---|
| 4 | |
---|
[369] | 5 | |
---|
[335] | 6 | namespace xios |
---|
[266] | 7 | { |
---|
| 8 | namespace func |
---|
| 9 | { |
---|
| 10 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 11 | |
---|
[369] | 12 | CMaximum::CMaximum(CArray<double,1>& doutput) |
---|
[266] | 13 | : SuperClass(StdString("maximum"), doutput) |
---|
| 14 | { /* Ne rien faire de plus */ } |
---|
| 15 | |
---|
| 16 | CMaximum::~CMaximum(void) |
---|
| 17 | { /* Ne rien faire de plus */ } |
---|
| 18 | |
---|
| 19 | //--------------------------------------------------------------- |
---|
| 20 | |
---|
[369] | 21 | void CMaximum::apply(const CArray<double,1>& _dinput, |
---|
| 22 | CArray<double,1>& _doutput) |
---|
[266] | 23 | { |
---|
[369] | 24 | const double * it1 = _dinput.dataFirst(), |
---|
| 25 | * end1 = _dinput.dataFirst() + _dinput.numElements(); |
---|
| 26 | double * it = _doutput.dataFirst(); |
---|
| 27 | if (this->nbcall == 1) for (; it1 != end1; it1++, it++) *it = *it1; |
---|
[286] | 28 | else for (; it1 != end1; it1++, it++) *it = std::max(*it1, *it); |
---|
| 29 | |
---|
[369] | 30 | |
---|
[266] | 31 | } |
---|
| 32 | |
---|
| 33 | //--------------------------------------------------------------- |
---|
| 34 | |
---|
| 35 | } // namespace func |
---|
| 36 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.