本文整理汇总了C++中CStateItem::FollowMove方法的典型用法代码示例。如果您正苦于以下问题:C++ CStateItem::FollowMove方法的具体用法?C++ CStateItem::FollowMove怎么用?C++ CStateItem::FollowMove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStateItem
的用法示例。
在下文中一共展示了CStateItem::FollowMove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateScoresForStates
void CDepParser::updateScoresForStates( const CStateItem *outout , const CStateItem *correct , SCORE_TYPE amount_add, SCORE_TYPE amount_subtract ) {
// do not update those steps where they are correct
static CStateItem item(&m_lCache);
static unsigned action, correct_action;
item.clear();
while ( item != *outout ) {
action = item.FollowMove( outout );
correct_action = item.FollowMove( correct );
if ( action == correct_action )
item.Move( action );
else break;
}
// for the necessary information for the correct and outout parsetree
updateScoreForState( item, correct , amount_add ) ;
updateScoreForState( item, outout , amount_subtract ) ;
m_nTotalErrors++;
}
示例2: updateScoreForState
inline void CDepParser::updateScoreForState( const CStateItem &from, const CStateItem *outout , const SCORE_TYPE &amount ) {
static CStateItem item(&m_lCache);
static unsigned action;
static CPackedScoreType<SCORE_TYPE, action::MAX> empty;
item = from;
while ( item != *outout ) {
action = item.FollowMove( outout );
getOrUpdateStackScore( &item, empty, action, amount, m_nTrainingRound );
#ifdef LABELED
// if ( action::getLabel(action) )
// getOrUpdateStackScore( &item, empty, action::getUnlabeledAction(action), amount, m_nTrainingRound );
#endif
item.Move( action );
}
}