本文整理汇总了C++中Graph::EdgeNucls方法的典型用法代码示例。如果您正苦于以下问题:C++ Graph::EdgeNucls方法的具体用法?C++ Graph::EdgeNucls怎么用?C++ Graph::EdgeNucls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graph
的用法示例。
在下文中一共展示了Graph::EdgeNucls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MergeSequences
Sequence MergeSequences(const Graph& g,
const vector<typename Graph::EdgeId>& continuous_path) {
vector < Sequence > path_sequences;
path_sequences.push_back(g.EdgeNucls(continuous_path[0]));
for (size_t i = 1; i < continuous_path.size(); ++i) {
VERIFY(
g.EdgeEnd(continuous_path[i - 1])
== g.EdgeStart(continuous_path[i]));
path_sequences.push_back(g.EdgeNucls(continuous_path[i]));
}
return MergeOverlappingSequences(path_sequences, g.k());
}
示例2: GetSequenceOfPathRegion
Sequence GetSequenceOfPathRegion(Graph &g, size_t k_value, vector<EdgeId> path,
pair<size_t, size_t> region){
VERIFY(IsPathRegionCorrect(region, path.size()));
if(region.first > region.second)
return Sequence();
EdgeId cur_edge = path[region.first];
Sequence seq = g.EdgeNucls(cur_edge);
for(auto i = region.first + 1; i <= region.second; ++i){
Sequence next_seq = g.EdgeNucls(path[i]);
seq = seq + next_seq.Subseq(k_value, next_seq.size());
}
return seq;
}