本文整理汇总了C++中Items::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ Items::erase方法的具体用法?C++ Items::erase怎么用?C++ Items::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Items
的用法示例。
在下文中一共展示了Items::erase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generic_worker_single_thr
//.........这里部分代码省略.........
*/
/*
unsigned int processed=0;
unsigned int alignments;
(search->toBePrinted < solutions_gapped.size()) ? alignments = search->toBePrinted : alignments = solutions_gapped.size() ;
while(processed < alignments) {
const ResultItemGapped & HM = solutions_gapped.at(processed);
s.globalPosition = HM.GlobalPosition1;
s.algn = alignments;
s.HI =1;
s.IH =1;
(processed == 0 ) ? s.primary = true : s.primary = false;
s.strand = HM.strand;
s.NM = HM.errors1;
s.NM_gap = HM.errors2;
s.contig = HM.contig ;
s.position = HM.GlobalPosition1 - search->H.globaltolocal.startPositions[HM.contig] + 1 ;
s.position_gap = HM.GlobalPosition2 - search->H.globaltolocal.startPositions[HM.contig] + 1 ;
s.length1_gap = HM.length1;
s.length2_gap = HM.length2;
s.contaminated = contaminated;
printable_solutions.push_back(s);
processed++;
}
*/
/*
ERROR_CHANNEL << "--print-all option not implemented yet!" << endl;
exit(3);
}
}
*/
} else if (not search->printAll) {
sort(solutions.begin(), solutions.end(), ResultItem::less()); // sort solutions
solutions.erase(unique(solutions.begin(), solutions.end(), ResultItem::equal()), solutions.end());
Random_Choice_Result r;
bool improved = (s.NM + s.NM_gap) > (solutions.at(0).errors);
if (improved)
r = Module_DMAP::random_choice_from_previous(0,solutions.size());
else {
r = Module_DMAP::random_choice_from_previous(s.algn,solutions.size());
s.algn += solutions.size();
}
if (not r.first) {
const ResultItem & HM = solutions.at(r.second);
s.HI = 1;
s.IH = 1;
s.primary = true;
s.globalPosition = HM.globalPosition;
s.strand = HM.strand;
s.NM = HM.errors;
s.NM_gap = 0;
if ((search->my_rank == 0) and s.contaminated) {
s.contig = search->CR.globalToLocal.searchContig(HM.globalPosition); // find the contig/scaffold
s.position = HM.globalPosition - search->CR.globalToLocal.startPositions[s.contig] + 1;
s.contig = search->contig_conversion.convert(s.contig);
} else {
s.contig = search->H.globalToLocal.searchContig(HM.globalPosition); // find the contig/scaffold
s.position = HM.globalPosition - search->H.globalToLocal.startPositions[s.contig] + 1;
s.contig = search->contig_conversion.convert(s.contig);
}
}
printable_solutions.push_back(s);
continue;
} else { // printAll