31 #include "regression_test_base.hpp" 39 template<
class ObserveMethodType>
43 using VariableType = decltype(ObserveMethodType::type_indicator_);
46 std::string dtw_distance_filefullpath_;
61 template<
typename... ConstructorArgs>
64 dtw_distance_xml_engine_in_(
"dtw_distance_xml_engine_in",
"dtw_distance"),
65 dtw_distance_xml_engine_out_(
"dtw_distance_xml_engine_out",
"dtw_distance")
67 dtw_distance_filefullpath_ = this->input_folder_path_ +
"/" + this->body_name_ +
"_" 68 + this->quantity_name_ +
"_dtwdistance.xml";
72 void settingupTheTest();
76 bool compareDTWDistance(Real threshold_value);
84 this->transposeTheIndex();
85 if (this->converged ==
"false")
92 for (
int n = 0; n != (this->number_of_run_ - 1); ++n)
99 compareDTWDistance(threshold_value);
102 std::cout <<
"The results have been converged." << endl;
110 this->transposeTheIndex();
112 if (filter ==
"true")
115 for (
int n = 0; n != this->number_of_run_; ++n)
117 this->result_filefullpath_ = this->input_folder_path_ +
"/" + this->body_name_
118 +
"_" + this->quantity_name_ +
"_Run_" + std::to_string(n) +
"_result.xml";
119 if (!fs::exists(this->result_filefullpath_))
121 std::cout <<
"This result has not been preserved and will not be compared." << endl;
127 std::cout <<
"The result of " << this->quantity_name_
128 <<
" is correct based on the dynamic time warping regression test!" << endl;
void readDTWDistanceFromXml()
Definition: dynamic_time_warping_method.hpp:89
void writeXmlToXmlFile()
Definition: regression_test_base.h:139
void generateDataBase(Real threshold_value, string filter="false")
Definition: dynamic_time_warping_method.h:80
void writeResultToXml()
Definition: regression_test_base.hpp:112
void filterExtremeValues()
Definition: time_averaged_method.hpp:465
StdVec< Real > calculateDTWDistance(DoubleVec< VariableType > dataset_a_, DoubleVec< VariableType > dataset_b_)
Definition: dynamic_time_warping_method.hpp:42
void readResultFromXml()
Definition: regression_test_base.hpp:90
void updateDTWDistance()
Definition: dynamic_time_warping_method.hpp:106
void writeDTWDistanceToXml()
Definition: dynamic_time_warping_method.hpp:121
void readXmlFromXmlFile()
Definition: regression_test_base.h:145
the regression test is based on the dynamic time warping.
Definition: dynamic_time_warping_method.h:40
Real calculatePNorm(Real variable_a, Real variable_b)
Definition: dynamic_time_warping_method.hpp:15
Definition: xml_engine.h:56
void newResultTest(string filter="false")
Definition: dynamic_time_warping_method.h:106
Definition: solid_body_supplementary.cpp:9
The regression test is based on the time-averaged meanvalue and variance.
Definition: time_averaged_method.h:40