TECA
The Toolkit for Extreme Climate Analysis
teca_coordinate_util::teca_validate_arrays Class Reference

compares a set of arrays against a reference array More...

#include <teca_coordinate_util.h>

Public Types

enum  {
  no_error = 0, invalid_value = 1, length_missmatch = 2, type_missmatch = 3,
  value_missmatch = 4, unsupported_type = 5, units_missmatch = 6
}
 error codes potentially returned from ::validate More...
 

Public Member Functions

void set_reference_array (const std::string &a_source, const std::string &a_name, const std::string a_units, const const_p_teca_variant_array &a_array)
 set the array to which others will be compared to More...
 
void append_array (const std::string &a_source, const std::string &a_name, const std::string &a_units, const const_p_teca_variant_array &a_array)
 add an array to check against the reference More...
 
int validate (const std::string &a_descriptor, double a_abs_tol, double a_rel_tol, std::string &errorStr)
 

Detailed Description

compares a set of arrays against a reference array

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

error codes potentially returned from ::validate

Member Function Documentation

◆ append_array()

void teca_coordinate_util::teca_validate_arrays::append_array ( const std::string &  a_source,
const std::string &  a_name,
const std::string &  a_units,
const const_p_teca_variant_array a_array 
)

add an array to check against the reference

◆ set_reference_array()

void teca_coordinate_util::teca_validate_arrays::set_reference_array ( const std::string &  a_source,
const std::string &  a_name,
const std::string  a_units,
const const_p_teca_variant_array a_array 
)

set the array to which others will be compared to

◆ validate()

int teca_coordinate_util::teca_validate_arrays::validate ( const std::string &  a_descriptor,
double  a_abs_tol,
double  a_rel_tol,
std::string &  errorStr 
)

Compare all the arrays in the collection against the reference returns 0 if all arrays in the collection are equal to the reference. When an array does not compare equal to the reference array a descritpion explaining why is returned in errorStr.


The documentation for this class was generated from the following file: