本文整理汇总了C++中Kmer::dump方法的典型用法代码示例。如果您正苦于以下问题:C++ Kmer::dump方法的具体用法?C++ Kmer::dump怎么用?C++ Kmer::dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kmer
的用法示例。
在下文中一共展示了Kmer::dump方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dump
int GraphPath::dump(char * buffer) const {
int position = 0;
uint32_t elements = size();
int operationSize = sizeof(uint32_t);
memcpy(buffer + position, &elements, operationSize);
position += operationSize;
uint32_t kmerLength = getKmerLength();
#ifdef CONFIG_ASSERT
assert(kmerLength > 0);
#endif
memcpy(buffer + position, &kmerLength, operationSize);
position += operationSize;
//cout << "[DEBUG] GraphPath::dump kmerLength " << kmerLength << endl;
for(int i = 0 ; i < (int)elements ; i ++) {
Kmer value;
at(i, &value);
position += value.dump(buffer + position);
}
return position;
}
示例2: sendKmersSamples
void StoreKeeper::sendKmersSamples() {
char buffer[MAXIMUM_MESSAGE_SIZE_IN_BYTES];
int bytes = 0;
ExperimentVertex * currentVertex = NULL;
VirtualKmerColorHandle currentVirtualColor = NULL_VIRTUAL_COLOR;
vector<bool> samplesVector (m_sampleSize, false);
if(m_hashTableIterator.hasNext()){
currentVertex = m_hashTableIterator.next();
Kmer kmer = currentVertex->getKey();
bytes += kmer.dump(buffer);
currentVirtualColor = currentVertex->getVirtualColor();
set<PhysicalKmerColor> * samples = m_colorSet.getPhysicalColors(currentVirtualColor);
for(set<PhysicalKmerColor>:: iterator sampleIterator = samples->begin();
sampleIterator != samples->end(); ++sampleIterator) {
PhysicalKmerColor value = *sampleIterator;
samplesVector[value] = true;
}
for (std::vector<bool>::iterator it = samplesVector.begin();
it != samplesVector.end(); ++it) {
buffer[bytes] = *it;
bytes++;
}
}
Message message;
message.setNumberOfBytes(bytes);
message.setBuffer(buffer);
if(m_hashTableIterator.hasNext()){
message.setTag(KmerMatrixOwner::PUSH_KMER_SAMPLES);
}else{
message.setTag(KmerMatrixOwner::PUSH_KMER_SAMPLES_END);
}
send(m_kmerMatrixOwner, message);
}