<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<BODY>
<DIV>/**</DIV>
<DIV> * Advance one Step following the gradient direction</DIV>
<DIV> */</DIV>
<DIV> typedef Array< double>
ParametersType;</DIV>
<DIV> ParametersType m_currentPosition;</DIV>
<DIV>void</DIV>
<DIV>GradientDescentOptimizer</DIV>
<DIV>::AdvanceOneStep( void )</DIV>
<DIV>{ </DIV>
<DIV> </DIV>
<DIV> itkDebugMacro("AdvanceOneStep");</DIV>
<DIV>.....</DIV>
<DIV> </DIV>
<DIV> ScalesType scales = this-> GetScales();</DIV>
<DIV>...</DIV>
<DIV> </DIV>
<DIV> DerivativeType transformedGradient( spaceDimension ); </DIV>
<DIV> </DIV>
<DIV> for(unsigned int j = 0; j <
spaceDimension; j++)</DIV>
<DIV> {</DIV>
<DIV> transformedGradient[j] = m_Gradient[j] / scales[j]; //<FONT
style="BACKGROUND-COLOR: #ffff00"
color=#ff0000>?????????????????????? why here takes a (/scales[j])</FONT></DIV>
<DIV><FONT color=#ff0000> <FONT
color=#000000> }</FONT>
//as in method m_CostFunction->
GetValueAndDerivative(this-> GetCurrentPosition(), m_Value,
m_Gradient )m_Gradient derivative</FONT></DIV>
<DIV><FONT
color=#ff0000>
// m_Gradient is the derivative of MutualInformation with respect to transform
parameters,</FONT></DIV>
<DIV><FONT
color=#ff0000>
// why
transformedGradient[j] = m_Gradient[j] / scales[j]; </FONT></DIV>
<DIV> ParametersType newPosition( spaceDimension );</DIV>
<DIV> for(unsigned int j = 0; j <
spaceDimension; j++)</DIV>
<DIV> {</DIV>
<DIV> newPosition[j] = currentPosition[j] + </DIV>
<DIV> direction * m_LearningRate * transformedGradient[j];</DIV>
<DIV> }</DIV>
<DIV> </DIV>
<DIV> this-> SetCurrentPosition( newPosition );</DIV>
<DIV> </DIV>
<DIV> this-> InvokeEvent( IterationEvent() );</DIV>
<DIV> </DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ</DIV>
<DIV>Àñ£¡</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡×¯Ïź£(Xiahai Zhuang)</DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡arhye@163.com</DIV>
<DIV>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-05-01</DIV>
<DIV> </DIV></BODY></HTML>