830 - BestAlignment::isNewPosition()

From Genome Analysis Wiki
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;
}