src/Generic/PropTree/PropMatch.cpp
// defines P( target role | source role )

defines P( target role | source role )
defines P ( target role | source role )
float PropMatch::roleConfusionProb(const Symbol & src_role, const Symbol & trg_role) const {
	if(src_role == Symbol(L"")) return 1;
	if(trg_role == src_role) return 1;
	ConfusionProbMatrix::const_iterator probEntryForward=
		_roleConfusionProbs->find(std::make_pair(src_role, trg_role));
	ConfusionProbMatrix::const_iterator probEntryBackward=
		_roleConfusionProbs->find(std::make_pair(trg_role, src_role));
	if (probEntryForward!=_roleConfusionProbs->end()) {
		return probEntryForward->second;
	} else if (probEntryBackward!=_roleConfusionProbs->end()) {
		return probEntryBackward->second;
	} else {
		return 0.60f;
	}
}
float PropMatch :: roleConfusionProb ( const Symbol & src_role , const Symbol & trg_role ) const { if ( src_role == Symbol ( L" " ) ) return 1 ; if ( trg_role == src_role ) return 1 ; ConfusionProbMatrix :: const_iterator probEntryForward = _roleConfusionProbs -> find ( std :: make_pair ( src_role , trg_role ) ) ; ConfusionProbMatrix :: const_iterator probEntryBackward = _roleConfusionProbs -> find ( std :: make_pair ( trg_role , src_role ) ) ; if ( probEntryForward != _roleConfusionProbs -> end ( ) ) { return probEntryForward -> second ; } else if ( probEntryBackward != _roleConfusionProbs -> end ( ) ) { return probEntryBackward -> second ; } else { return 0.60f ; } }
defines P( target role | source role )
defines P ( target role | source role )