Index the first and last contig of each path to facilitate finding * overlaps between paths. */
| 255 | /** Index the first and last contig of each path to facilitate finding |
| 256 | * overlaps between paths. */ |
| 257 | static SeedMap |
| 258 | makeSeedMap(const Paths& paths) |
| 259 | { |
| 260 | SeedMap seedMap; |
| 261 | for (Paths::const_iterator it = paths.begin(); it != paths.end(); ++it) { |
| 262 | if (it->empty()) |
| 263 | continue; |
| 264 | assert(!it->front().ambiguous()); |
| 265 | seedMap.insert(make_pair(it->front(), Vertex(it - paths.begin(), false))); |
| 266 | assert(!it->back().ambiguous()); |
| 267 | seedMap.insert(make_pair(it->back() ^ 1, Vertex(it - paths.begin(), true))); |
| 268 | } |
| 269 | return seedMap; |
| 270 | } |
| 271 | |
| 272 | /** Check whether path starts with the sequence [first, last). */ |
| 273 | static bool |