Example #1
0
void Chromosome::updateMarkerSet(unsigned int start, unsigned int end)
{
    MarkerSet* ms = new MarkerSet(true);

    for(unsigned int i = start;  i<end; i++)
    {
        ms->pushback(buffer_chromosome.at(i));
    }
    chromosome.push_back(ms);
    mem_markers+=  (sizeof(MarkerSet) + (ms->getMarkerBits().num_blocks() * sizeof(unsigned long)));
}
Example #2
0
void Chromosome::updateMarkerSet(unsigned int start, unsigned int end)
{
	MarkerSet* ms = new MarkerSet(true); 
	for(unsigned int i = start;  i<end; i++)
	{
		ms->pushback((i-start),buffer_chromosome.front());
		buffer_chromosome.pop_front();				// future implementation for Overlapping windows needs non-modified buffer
	}
	
	chromosome.push_back(ms);
}
Example #3
0
unsigned long long MatchFactory::calculateMemData()
{
	unsigned long long mem=0;
	int num_windows=0;
	if (num_sets<1)  
	{
		num_windows = ceil((float)ALL_SNPS.currentSize()/ MIN_WINDOW_SIZE);
 		MarkerSet ms = new MarkerSet(false);
        for(int i=0; i<MIN_WINDOW_SIZE; i++)
        	ms.pushback(true);
		mem_one_markerset = (sizeof(MarkerSet) + (ms.getMarkerBits().num_blocks() * sizeof(boost::dynamic_bitset<>::block_type))) ;
	}
	else
		num_windows = ceil((float)(ALL_SNPS.currentSize()- position_marker)/MIN_WINDOW_SIZE);
	
	mem+= (sizeof(WindowInfo) * num_windows );
	mem+= ( num_samples * 2 * num_windows * mem_one_markerset);
	return mem;
}