示例#1
0
 // OPT: don't create a new FacetComplex, use a non modifying alg on the old one
 bool FacetComplex::AreConnected_new(const facet& g1,const facet& g2)const
 {
   if (g1.IamEmpty() || g2.IamEmpty()) return false;
   if (g1==g2 || AreDirectlyConnected(g1,g2)) return true;
   if (this->mySize()==2) return false;// they are 2, they are not directly connected, they are not connected
   unsigned int g1_index=myGetIndex(g1);
   unsigned int g2_index=myGetIndex(g2);
   vector<unsigned int> P,P1;
   for (unsigned int i=0;i!=mySize();++i)
     P.push_back(i);
   list<unsigned int> xj;
   vector<unsigned int> g;
   for (unsigned int j=0;j!=myNumIndets();++j)
   {
     myMakeXj(xj,j);
     if (xj.size()>1)
     {
       myMakeG(g,P,xj);
       P1.clear();
       for (vector<unsigned int>::const_iterator it1=P.begin();it1!=P.end();++it1)
         P1.push_back(g[P[*it1]]);
      P1.swap(P);
     }//if
   }//for
   return (P[g1_index]==P[g2_index]);
  }// AreConnected_new
示例#2
0
void MyBamWrap::testFetch(char* fileName, string chrName, uint32_t lpos, uint32_t rpos)
{
	mySamOpen(fileName);
	myGetIndex(fileName);
	region_t region;
	myPassRegion(region,chrName,lpos,rpos);
	myFetchWrap(region, fetch_func_test);

}