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


C++ Kmer::isEqual方法代码示例

本文整理汇总了C++中Kmer::isEqual方法的典型用法代码示例。如果您正苦于以下问题:C++ Kmer::isEqual方法的具体用法?C++ Kmer::isEqual怎么用?C++ Kmer::isEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kmer的用法示例。


在下文中一共展示了Kmer::isEqual方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: work

void SeedWorker::work(){
	if(m_finished){
		return;
	}
	// check that this node has 1 ingoing edge and 1 outgoing edge.
	if(!m_SEEDING_firstVertexTestDone){
		if(!m_SEEDING_1_1_test_done){
			do_1_1_test();
		}else{
			if(!m_SEEDING_1_1_test_result){
				m_finished=true;
			}else{
				m_SEEDING_firstVertexParentTestDone=false;
				m_SEEDING_firstVertexTestDone=true;
				m_SEEDING_currentVertex=m_SEEDING_currentParentVertex;
				m_SEEDING_testInitiated=false;
				m_SEEDING_1_1_test_done=false;
			}
		}
	// check that the parent does not have 1 ingoing edge and 1 outgoing edge
	}else if(!m_SEEDING_firstVertexParentTestDone){
		if(!m_SEEDING_1_1_test_done){
			do_1_1_test();
		}else{
			if(m_SEEDING_1_1_test_result){
				m_finished=true;
			}else{
				m_SEEDING_firstVertexParentTestDone=true;
				m_SEEDING_vertices.clear();
				m_SEEDING_seed.clear();
				m_SEEDING_seed.setKmerLength(m_wordSize);

				// restore original starter.
				m_SEEDING_currentVertex=m_SEEDING_first;
				m_SEEDING_testInitiated=false;
				m_SEEDING_1_1_test_done=false;
			}
		}
	// check if currentVertex has 1 ingoing edge and 1 outgoing edge, if yes, add it
	}else if(m_elongationMode){

		// attempt to add m_SEEDING_currentVertex
		if(!m_SEEDING_1_1_test_done){
			do_1_1_test();
		}else{
			if(m_SEEDING_vertices.count(m_SEEDING_currentVertex)>0){// avoid infinite loops.
				m_SEEDING_1_1_test_result=false;
			}
			if(!m_SEEDING_1_1_test_result){

				if(m_debugSeeds){
					printf("Rank %i next vertex: Coverage= %i, ingoing coverages:",m_rank,m_cache[m_SEEDING_currentVertex]);
					for(int i=0;i<(int)m_ingoingCoverages.size();i++){
						printf(" %i",m_ingoingCoverages[i]);
					}
					printf(" outgoing coverages:");
					for(int i=0;i<(int)m_outgoingCoverages.size();i++){
						printf(" %i",m_outgoingCoverages[i]);
					}
					printf("\n");

					int n=100;
					if((int)m_SEEDING_seed.size()<n){
						n=m_SEEDING_seed.size();
					}
					printf("Rank %i last %i coverage values in the seed:",m_rank,n);
					for(int i=n-1;i>=0;i--){
						int theCoverage=m_SEEDING_seed.getCoverageAt(m_SEEDING_seed.size()-1-i);

						printf(" %i",theCoverage);
					}
					printf("\n");
				}


				m_elongationMode=false;
				m_endChecksMode=true;
			}else{

				Kmer object;
				if(m_SEEDING_seed.size()>0)
					m_SEEDING_seed.at(m_SEEDING_seed.size()-1,&object);

				// we want some coherence...
				if(m_SEEDING_seed.size()>0
					&&!(object.isEqual(&m_SEEDING_currentParentVertex))){

					m_finished=true;
				}else{
					m_SEEDING_seed.push_back(&m_SEEDING_currentVertex);
					m_SEEDING_seed.addCoverageValue(m_cache[m_SEEDING_currentVertex]);

					m_SEEDING_vertices.insert(m_SEEDING_currentVertex);
					m_SEEDING_currentVertex=m_SEEDING_currentChildVertex;
					m_SEEDING_testInitiated=false;
					m_SEEDING_1_1_test_done=false;
				}
			}
		}
	}else if(m_endChecksMode){
//.........这里部分代码省略.........
开发者ID:Huanle,项目名称:ray,代码行数:101,代码来源:SeedWorker.cpp


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