src/c++/lib/paragraph/HaplotypePaths.cpp
// Creates a path family with all edges from all paths
Creates a path family with all edges from all paths
Creates a path family with all edges from all paths
graphtools::PathFamily pathsToFamily(Graph* const graph, std::list<Path> paths)
{
    graphtools::PathFamily family(graph);
    for (auto const& path : paths)
    {
        for (auto start = path.begin(); start != std::prev(path.end()); ++start)
        {
            auto end = std::next(start);
            family.addEdge(*start, *end);
        }
    }
    return family;
}
graphtools :: PathFamily pathsToFamily ( Graph * const graph , std :: list < Path > paths ) { graphtools :: PathFamily family ( graph ) ; for ( auto const & path : paths ) { for ( auto start = path . begin ( ) ; start != std :: prev ( path . end ( ) ) ; ++ start ) { auto end = std :: next ( start ) ; family . addEdge ( * start , * end ) ; } } return family ; }
Creates a path family with all edges from all paths
Creates a path family with all edges from all paths