18 #ifndef __itkConvergenceMonitoringFunction_h
19 #define __itkConvergenceMonitoringFunction_h
42 template<
class TScalar,
class TEnergyValue>
68 itkDebugMacro(
"Adding energy value " << value );
69 this->m_EnergyValues.push_back( value );
76 return this->m_EnergyValues.size();
80 virtual void ClearEnergyValues()
82 if( this->GetNumberOfEnergyValues() > 0 )
84 itkDebugMacro(
"Clearing energy values." );
85 this->m_EnergyValues.clear();
92 virtual RealType GetConvergenceValue()
const = 0;
97 this->m_EnergyValues.clear();
102 void PrintSelf( std::ostream & os,
Indent indent )
const
104 Superclass::PrintSelf( os, indent );
106 os << std::endl <<
"Energy values: " << std::flush;
109 while( it != this->m_EnergyValues.end() )
111 os <<
"(" << it - this->m_EnergyValues.begin() <<
"): " << *it <<
" ";
121 void operator=(
const Self &);