本文整理汇总了C++中Path_t::size方法的典型用法代码示例。如果您正苦于以下问题:C++ Path_t::size方法的具体用法?C++ Path_t::size怎么用?C++ Path_t::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Path_t
的用法示例。
在下文中一共展示了Path_t::size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void IterativeExtensions<span, Node, Edge, GraphDataVariant>::buildSequence (
const Node& node,
const Path_t<Node>& consensusRight,
size_t nbNodes,
size_t depth,
Sequence& seq
)
{
/** Shortcuts. */
Data& data = seq.getData();
size_t lenRight = consensusRight.size();
/** We compute the total size of the sequence. */
size_t fullLength = graph.getKmerSize() + consensusRight.size();
/* we need this in mapsembler: the first used kmer should be a k-1 mer. Indeed, if a first kmer is extracted from a sequence :
* -------------****** (k=6), then this node is the one linked to a new one starting with ******,
* thus with an overlap of k and not k-1.
*/
size_t offset = (depth == 0 && dont_output_first_nucleotide) ? 1 : 0;
/** We compute the total size of the sequence. */
size_t length = fullLength - offset;
/** We set the comment of the sequence. */
seq.setComment (Stringify::format ("%lli__len__%i__depth__%i", nbNodes, fullLength, depth) );
/** We set the data length. */
seq.getData().resize (length);
size_t idx=0;
size_t i = offset;
/** We dump the starting node. */
string nodeStr = graph.toString (node);
for ( ; i<nodeStr.size(); i++) { data[idx++] = nodeStr[i]; }
/** We dump the right part. */
for (i=0; i<lenRight; i++) { data[idx++] = ascii (consensusRight[i]); }
}