Exemplo n.º 1
0
	bool BlockFinder::Edge::Overlap(const Edge & edge) const
	{
		size_t a1 = this->GetOriginalPosition();
		size_t b1 = this->GetOriginalPosition() + this->GetOriginalLength();
		size_t a2 = edge.GetOriginalPosition();
		size_t b2 = edge.GetOriginalPosition() + edge.GetOriginalLength();
		size_t overlap = 0;
		if(a1 >= a2 && a1 <= b2)
		{
			overlap = std::min(b1, b2) - a1;
		}

		if(a2 >= a1 && a2 <= b1)
		{
			overlap = std::min(b1, b2) - a2;
		}

		return edge.chr == chr && overlap > 0;
	}
Exemplo n.º 2
0
	bool BlockFinder::EdgeEmpty(const Edge & a, size_t k)
	{
		return a.GetOriginalLength() < k;
	}