Ignore:
Timestamp:
01/10/17 13:52:53 (7 years ago)
Author:
mhnguyen
Message:

Improving missing-value processing
If detect_missing_value is activated, then all missing value will be converted to
NaN (Not-a-number) in input of data flow then they will be reconverted to missing value on output

+) Update SourceFilter?, TemporalFilter? and SpatialTransformFilter? with new processing
+) Update all transformations with new processing

Test
+) On Curie
+) Work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp

    r979 r1018  
    1111#include "context_client.hpp" 
    1212#include "client_client_dht_template.hpp" 
     13#include "utils.hpp" 
    1314 
    1415namespace xios { 
     
    3132                                            const double& defaultValue) 
    3233{ 
    33   int nbLocalIndex = localIndex.size(); 
    34   bool hasMissingValue = (0.0 != defaultValue) ? true : false; 
     34  int nbLocalIndex = localIndex.size();   
     35  bool hasMissingValue = NumTraits<double>::isnan(defaultValue);   
    3536  if (hasMissingValue) 
    3637  { 
    3738    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    3839    { 
    39       if (defaultValue == *(dataInput + idx)) 
     40      if (NumTraits<double>::isnan(*(dataInput + idx))) 
    4041      { 
    4142        flagInitial[localIndex[idx].first] = false; 
Note: See TracChangeset for help on using the changeset viewer.