src/ProfileGenerator/Profile.cpp
//
// Helper function for use with evidence ratios
//
// Counts facts of all type sif the type is set to -1, else only the matching slot type
//

Helper function for use with evidence ratios
Counts facts of all type sif the type is set to -1, else only the matching slot type
Helper function for use with evidence ratios Counts facts of all type sif the type is set to - 1 else only the matching slot type
int Profile::countRawFacts(std::string slot_name){
	int nRawFacts = 0;
	std::pair<std::string, ProfileSlot_ptr> typeSlotPair;
	BOOST_FOREACH(typeSlotPair, _slots) {
		if (slot_name != "" && slot_name != typeSlotPair.first) 
			continue;
		std::list<GenericHypothesis_ptr> rawHypotheses = typeSlotPair.second->getRawHypotheses();
		BOOST_FOREACH(GenericHypothesis_ptr rawHypo, rawHypotheses) {
			nRawFacts += rawHypo->nSupportingFacts();
		}
	}
	return nRawFacts;
}
int Profile :: countRawFacts ( std :: string slot_name ) { int nRawFacts = 0 ; std :: pair < std :: string , ProfileSlot_ptr > typeSlotPair ; BOOST_FOREACH ( typeSlotPair , _slots ) { if ( slot_name != " " && slot_name != typeSlotPair . first ) continue ; std :: list < GenericHypothesis_ptr > rawHypotheses = typeSlotPair . second -> getRawHypotheses ( ) ; BOOST_FOREACH ( GenericHypothesis_ptr rawHypo , rawHypotheses ) { nRawFacts += rawHypo -> nSupportingFacts ( ) ; } } return nRawFacts ; }
Helper function for use with evidence ratios
Counts facts of all type sif the type is set to -1, else only the matching slot type
Helper function for use with evidence ratios Counts facts of all type sif the type is set to - 1 else only the matching slot type