当前位置: 首页>>代码示例>>C++>>正文


C++ Items::erase方法代码示例

本文整理汇总了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
开发者ID:vezzi,项目名称:ERNE,代码行数:67,代码来源:Module_DMAP.cpp


注:本文中的Items::erase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。