Exemple #1
0
bool GenotypesForAMarkerSet :: ContainsOffLadderAllele (const RGString& locusName, const RGString& alleleName) {

	RGDList alleleList;
	bool returnValue;

	if (mOffLadderAlleles == NULL)
		return false;

	if (!mOffLadderAlleles->FindAllAllelesForNamedLocus (locusName, alleleList)) {

		alleleList.Clear ();
		return false;
	}

	IndividualAllele target;
	target.SetName (alleleName);

	if (alleleList.Contains (&target))
		returnValue = true;

	else
		returnValue = false;

	alleleList.Clear ();
	return returnValue;
}
Exemple #2
0
bool IndividualLocus :: IsContainedIn (const RGDList& alleleList) const {

	RGDList temp (mAllelesByName);
	IndividualAllele* nextAllele;

	while (nextAllele = (IndividualAllele*) temp.GetFirst ()) {

		if (!alleleList.Contains (nextAllele)) {

			temp.ClearAndDelete ();
			delete nextAllele;
			return false;
		}

		delete nextAllele;
	}

	return true;
}
Boolean RGHashTable :: Contains (const RGPersistent* p) const {

	RGDList* list = SelectList (p);
	return list->Contains (p);
}