22 #ifndef otbModelComponentBase_hxx
23 #define otbModelComponentBase_hxx
35 template <
class TSample>
39 m_PdfFunction =
nullptr;
40 m_CdfFunction =
nullptr;
44 template <
class TSample>
47 Superclass::PrintSelf(os, indent);
49 os << indent <<
"Sample: ";
50 if (m_Sample !=
nullptr)
52 os << m_Sample << std::endl;
56 os <<
"not set." << std::endl;
59 os << indent <<
"Membership Function for pdf: ";
60 if (m_PdfFunction !=
nullptr)
62 os << m_PdfFunction << std::endl;
66 os <<
"not instantiated yet." << std::endl;
69 os << indent <<
"Membership Function for cdf: ";
70 if (m_CdfFunction !=
nullptr)
72 os << m_CdfFunction << std::endl;
76 os <<
"not instantiated yet." << std::endl;
79 os << indent <<
"Sample are modified and parameters updated: ";
80 os << m_SampleModified << std::endl;
83 template <
class TSample>
86 os << indent <<
"Generic class of model-component. Parameters :\n";
87 for (
unsigned int i = 0; i < m_Parameters.Size(); ++i)
88 os << indent << m_Parameters[i] <<
"\n";
91 template <
class TSample>
98 template <
class TSample>
104 template <
class TSample>
107 if (m_Parameters != parameters)
108 m_Parameters = parameters;
111 template <
class TSample>
114 m_PdfFunction =
function;
117 template <
class TSample>
120 m_CdfFunction =
function;
123 template <
class TSample>
126 return m_PdfFunction;
129 template <
class TSample>
132 return m_CdfFunction;
135 template <
class TSample>
138 return this->m_PdfFunction->Evaluate(measurements);
141 template <
class TSample>
144 return m_CdfFunction->Evaluate(measurements);
147 template <
class TSample>
150 return m_SampleModified;
153 template <
class TSample>
156 if (m_SampleModified)
157 this->GenerateData();
158 m_SampleModified = 0;
161 template <
class TSample>
168 m_SampleModified = 0;