Last change
on this file since 390 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
|
Line | |
---|
1 | #include "minimum.hpp" |
---|
2 | #include "array_new.hpp" |
---|
3 | #include <algorithm> |
---|
4 | |
---|
5 | namespace xios |
---|
6 | { |
---|
7 | namespace func |
---|
8 | { |
---|
9 | /// ////////////////////// Définitions ////////////////////// /// |
---|
10 | |
---|
11 | CMinimum::CMinimum(CArray<double,1>& doutput) |
---|
12 | : SuperClass(StdString("minimum"), doutput) |
---|
13 | { /* Ne rien faire de plus */ } |
---|
14 | |
---|
15 | CMinimum::~CMinimum(void) |
---|
16 | { /* Ne rien faire de plus */ } |
---|
17 | |
---|
18 | //--------------------------------------------------------------- |
---|
19 | |
---|
20 | void CMinimum::apply(const CArray<double,1>& _dinput, |
---|
21 | CArray<double,1>& _doutput) |
---|
22 | { |
---|
23 | const double * it1 = _dinput.dataFirst(), |
---|
24 | * end1 = _dinput.dataFirst() + _dinput.numElements(); |
---|
25 | double * it = _doutput.dataFirst(); |
---|
26 | |
---|
27 | if (this->nbcall == 1) for (; it1 != end1; it1++, it++) *it = *it1; |
---|
28 | else for (; it1 != end1; it1++, it++) *it = std::min(*it1, *it); |
---|
29 | |
---|
30 | } |
---|
31 | |
---|
32 | //--------------------------------------------------------------- |
---|
33 | |
---|
34 | } // namespace func |
---|
35 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.