830 - BestAlignment::isNewPosition()

From Genome Analysis Wiki
Revision as of 13:51, 28 October 2013 by Goncalo (talk | contribs) (Created page with "<source lang="cpp"> bool BestAlignment::isNewPosition(unsigned int pos) { int h = IterateCache(pos); if (cache[h] == pos) return false; cache[h] = pos; cacheItems++; ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
bool BestAlignment::isNewPosition(unsigned int pos)
{
	int h = IterateCache(pos);

	if (cache[h] == pos)
		return false;

	cache[h] = pos;
	cacheItems++;

	if (cacheItems * 2 > cacheSize)
		SetCacheSize(cacheSize * 2);

	return true;
}