这是c++ 是类的代码吗? 它的意思是什么啊?
int GenoSet::greedyResolve(){
set<const haplotype *> gsolution;
set<const haplotype *>::iterator it;
list<resolution>::iterator rit;
int maxc, c, unresolved;
const haplotype * ph1, *ph2;
outf << "Solution by Greedy:" << endl;
for(int i=0; i<m_gvec.size(); i++) {
//cout << *(m_gvec[i]);
maxc =0;
for(rit=m_gvec[i]->m_resolutions.begin();rit!=m_gvec[i]->m_resolutions.end();rit++) {
//cout << *((*rit).first) << " " << (*rit).first->m_coverage << "; " << *((*rit).second) << " " << (*rit).second->m_coverage;
if((*rit).second==xHap)
c =(*rit).first->m_coverage +1;
else
c =(*rit).first->m_coverage + (*rit).second->m_coverage;
if((*rit).first->m_bChosen||(((*rit).second!=xHap)&&(*rit).second->m_bChosen))
c+=1;
if(c>maxc) {
maxc = c;
ph1 = (*rit).first;
ph2 = (*rit).second;
}
}
outf << setw(3) << m_gvec[i]->m_index << ": ";
m_gvec[i]->printSeq(outf, false);
//no resolution (any resolution is OK)
if(maxc ==0) {
unresolved++;
outf << " unresolved" << endl;
}
else {
outf << " = ";
ph1->printSeq(outf, false);
outf << "(" << ph1->m_index << ") + " ;
if(ph2==xHap) {
haplotype * tmph = new haplotype();
m_gvec[i]->resolve(*ph1, *tmph);
tmph->m_coverage =1;
ph2 = tmph;
}
ph2->printSeq(outf, false);
outf << "(" << ph2->m_index << ")" << endl;
if(!(ph1->m_bChosen))
gsolution.insert(ph1);
if(!(ph2->m_bChosen)) gsolution.insert(ph2);
}
}
copyHset(solution, gsolution);
outf << "haplotypes " << gsolution.size() << endl;
for(it=gsolution.begin(); it!=gsolution.end(); it++) {
outf << setw(3) << (*it)->m_index << ": ";
(*it)->printSeq(outf, false);
if((*it)->m_index==-1) delete (*it);
outf << endl;
}
return gsolution.size();
}
不明白这些代码是表达什么意思。