Parallel Analog Ensemble
Public Member Functions | Public Attributes | Private Member Functions | List of all members
testFunctions Class Reference

#include <testFunctions.h>

Inheritance diagram for testFunctions:

Public Member Functions

 testFunctions ()
 
virtual ~testFunctions ()
 
void setUp ()
 
void tearDown ()
 

Public Attributes

std::string file_observations = _PATH_OBSERVATIONS
 
std::string file_forecasts = _PATH_FORECASTS
 

Private Member Functions

 CPPUNIT_TEST_SUITE (testFunctions)
 
 CPPUNIT_TEST (testSearchStations_)
 
 CPPUNIT_TEST (testComputeObservationTimeIndices1_)
 
 CPPUNIT_TEST (testComputeObservationTimeIndices2_)
 
 CPPUNIT_TEST (testCollapseLeadTimes_)
 
 CPPUNIT_TEST (testUnwrapTimeSeries_)
 
 CPPUNIT_TEST (testConvertToIndex_)
 
 CPPUNIT_TEST (testSdCircular_)
 
 CPPUNIT_TEST (testSdLinear_)
 
 CPPUNIT_TEST (testMean_)
 
 CPPUNIT_TEST (testFindClosest_)
 
 CPPUNIT_TEST (testFindClosest2_)
 
 CPPUNIT_TEST_SUITE_END ()
 
void testSearchStations_ ()
 
void testComputeObservationTimeIndices1_ ()
 
void testComputeObservationTimeIndices2_ ()
 
void testCollapseLeadTimes_ ()
 
void testUnwrapTimeSeries_ ()
 
void testConvertToIndex_ ()
 
void testSdCircular_ ()
 
void testSdLinear_ ()
 
void testMean_ ()
 
void testFindClosest_ ()
 
void testFindClosest2_ ()
 
bool neighborExists_ (const Functions::Matrix &table, size_t test_index, size_t neighbor_index) const
 

Constructor & Destructor Documentation

◆ testFunctions()

testFunctions::testFunctions ( )

◆ ~testFunctions()

testFunctions::~testFunctions ( )
virtual

Member Function Documentation

◆ CPPUNIT_TEST() [1/11]

testFunctions::CPPUNIT_TEST ( testCollapseLeadTimes_  )
private

◆ CPPUNIT_TEST() [2/11]

testFunctions::CPPUNIT_TEST ( testComputeObservationTimeIndices1_  )
private

◆ CPPUNIT_TEST() [3/11]

testFunctions::CPPUNIT_TEST ( testComputeObservationTimeIndices2_  )
private

◆ CPPUNIT_TEST() [4/11]

testFunctions::CPPUNIT_TEST ( testConvertToIndex_  )
private

◆ CPPUNIT_TEST() [5/11]

testFunctions::CPPUNIT_TEST ( testFindClosest2_  )
private

◆ CPPUNIT_TEST() [6/11]

testFunctions::CPPUNIT_TEST ( testFindClosest_  )
private

◆ CPPUNIT_TEST() [7/11]

testFunctions::CPPUNIT_TEST ( testMean_  )
private

◆ CPPUNIT_TEST() [8/11]

testFunctions::CPPUNIT_TEST ( testSdCircular_  )
private

◆ CPPUNIT_TEST() [9/11]

testFunctions::CPPUNIT_TEST ( testSdLinear_  )
private

◆ CPPUNIT_TEST() [10/11]

testFunctions::CPPUNIT_TEST ( testSearchStations_  )
private

◆ CPPUNIT_TEST() [11/11]

testFunctions::CPPUNIT_TEST ( testUnwrapTimeSeries_  )
private

◆ CPPUNIT_TEST_SUITE()

testFunctions::CPPUNIT_TEST_SUITE ( testFunctions  )
private

◆ CPPUNIT_TEST_SUITE_END()

testFunctions::CPPUNIT_TEST_SUITE_END ( )
private

◆ neighborExists_()

bool testFunctions::neighborExists_ ( const Functions::Matrix table,
size_t  test_index,
size_t  neighbor_index 
) const
private

◆ setUp()

void testFunctions::setUp ( )

◆ tearDown()

void testFunctions::tearDown ( )

◆ testCollapseLeadTimes_()

void testFunctions::testCollapseLeadTimes_ ( )
private

This function tests the conversion from forecasts to observations

◆ testComputeObservationTimeIndices1_()

void testFunctions::testComputeObservationTimeIndices1_ ( )
private

Test the function of updateTimeTable().

◆ testComputeObservationTimeIndices2_()

void testFunctions::testComputeObservationTimeIndices2_ ( )
private

Test the function of updateTimeTable() by reading files.

◆ testConvertToIndex_()

void testFunctions::testConvertToIndex_ ( )
private

Test the function of toIndex().

◆ testFindClosest2_()

void testFunctions::testFindClosest2_ ( )
private

◆ testFindClosest_()

void testFunctions::testFindClosest_ ( )
private

◆ testMean_()

void testFunctions::testMean_ ( )
private

Test the behavior of mean function.

◆ testSdCircular_()

void testFunctions::testSdCircular_ ( )
private

Test the behavior of sdCircular function with and without NAN values.

◆ testSdLinear_()

void testFunctions::testSdLinear_ ( )
private

Test the behavior of sdLinear function with and without NAN values.

◆ testSearchStations_()

void testFunctions::testSearchStations_ ( )
private

Tests the functionality to find nearest neighbors with and without setting a distance threshold.

The spatial distribution of stations looks like below. The numbers shown on the diagram are the index of each station.

      (Y)  ^
         8 |             13
         7 |       11          12
         6 |    10
         5 |     7  8  9
         4 |        5        6
         3 |  2        3           4
         2 |
         1 |  0              1
           .-------------------------->
           0  1  2  3  4  5  6  7  8  (X)

◆ testUnwrapTimeSeries_()

void testFunctions::testUnwrapTimeSeries_ ( )
private

This function tests unwrapping a time series

Member Data Documentation

◆ file_forecasts

std::string testFunctions::file_forecasts = _PATH_FORECASTS

◆ file_observations

std::string testFunctions::file_observations = _PATH_OBSERVATIONS

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