Skip to content
Snippets Groups Projects
Commit fabd68b0 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: use assertions to make sure all required parameters have been defined in DoInitSpecialization

parent b8651eb9
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,7 @@ VectorRegression
SetOfficialDocLink();
}
// Confidence map computation is not support for regression.
template<>
bool
VectorRegression
......
......@@ -34,7 +34,14 @@ VectorPrediction <RegressionMode>
::DoInit()
{
DoInitSpecialization();
//TODO add assert to check that parameters has been correctly defined
// Assert that the all needed parameters have ben definied in DoInitSpecialization
assert(GetParameterByKey("in") != nullptr);
assert(GetParameterByKey("instat") != nullptr);
assert(GetParameterByKey("model") != nullptr);
assert(GetParameterByKey("cfield") != nullptr);
assert(GetParameterByKey("feat") != nullptr);
assert(GetParameterByKey("out") != nullptr);
}
template <bool RegressionMode>
......@@ -316,7 +323,6 @@ VectorPrediction <RegressionMode>
clock_t toc = clock();
otbAppLogINFO( "Elapsed: "<< ((double)(toc - tic) / CLOCKS_PER_SEC)<<" seconds.");
}
} //end namespace wrapper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment