src/Generic/relations/HighYield/HYInstanceSet.cpp
// enforces the SentenceInfo being in this HYInstanceSet, and adds the instance

enforces the SentenceInfo being in this HYInstanceSet, and adds the instance
enforces the SentenceInfo being in this HYInstanceSet and adds the instance
void HYInstanceSet::addInstance(HYRelationInstance* instance) {
	if (contains(instance))
		return;
	DTRelSentenceInfo* info = instance->getSentenceInfo();
	if (!contains(info))
		addSentenceInfo(info);
	_instances.push_back(instance);
	_uidToInstance[instance->getID()] = instance;
	_sentenceInfoToRelations[info].push_back(instance);
}
void HYInstanceSet :: addInstance ( HYRelationInstance * instance ) { if ( contains ( instance ) ) return ; DTRelSentenceInfo * info = instance -> getSentenceInfo ( ) ; if ( ! contains ( info ) ) addSentenceInfo ( info ) ; _instances . push_back ( instance ) ; _uidToInstance [ instance -> getID ( ) ] = instance ; _sentenceInfoToRelations [ info ] . push_back ( instance ) ; }
enforces the SentenceInfo being in this HYInstanceSet, and adds the instance
enforces the SentenceInfo being in this HYInstanceSet and adds the instance