MCPcopy Create free account
hub / github.com/BirolLab/abyss / calculatePathLength

Function calculatePathLength

SimpleGraph/SimpleGraph.cpp:289–304  ·  view source on GitHub ↗

Return the length of the specified path in k-mer. */

Source from the content-addressed store, hash-verified

287
288/** Return the length of the specified path in k-mer. */
289static unsigned calculatePathLength(const Graph& g,
290 const ContigNode& origin,
291 const ContigPath& path, size_t prefix = 0, size_t suffix = 0)
292{
293 if (prefix + suffix == path.size())
294 return 0;
295 assert(prefix + suffix < path.size());
296 int length = addProp(g, path.begin() + prefix,
297 path.end() - suffix).length;
298
299 // Account for the overlap on the left.
300 vertex_descriptor u = prefix == 0 ? origin : path[prefix - 1];
301 length += getDistance(g, u, path[prefix]);
302 assert(length > 0);
303 return length;
304}
305
306/** Compare the lengths of two paths. */
307struct ComparePathLength

Callers 3

operator()Method · 0.85
constructAmbiguousPathFunction · 0.85
handleEstimateFunction · 0.85

Calls 5

addPropFunction · 0.85
getDistanceFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected