~ubuntu-branches/ubuntu/trusty/abyss/trusty-proposed

« back to all changes in this revision

Viewing changes to Graph/ContigGraphAlgorithms.h

  • Committer: Package Import Robot
  • Author(s): Shaun Jackman
  • Date: 2011-12-13 17:04:24 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20111213170424-5lenznlcdridsj81
Tags: 1.3.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include "Algorithms.h"
5
5
#include "ContigNode.h"
6
6
#include "Functional.h"
7
 
#include "Graph.h"
8
7
#include "Iterator.h"
 
8
#include <boost/graph/graph_traits.hpp>
9
9
#include <algorithm>
10
10
#include <cassert>
11
11
#include <functional>
12
12
#include <set>
13
13
#include <utility>
14
14
 
 
15
using boost::graph_traits;
 
16
 
15
17
/** Return true if the edge e is a palindrome. */
16
18
template<typename Graph>
17
19
struct IsPalindrome : std::unary_function<
138
140
 
139
141
/** Add the vertex and edge propeties of the path [first, last). */
140
142
template<typename Graph, typename It, typename VP>
141
 
typename vertex_property<Graph>::type addProp(const Graph& g,
142
 
                It first, It last, const VP*)
 
143
VP addProp(const Graph& g, It first, It last, const VP*)
143
144
{
144
145
        typedef typename graph_traits<Graph>::vertex_descriptor
145
146
                vertex_descriptor;
146
 
        typedef typename vertex_property<Graph>::type
147
 
                vertex_property_type;
148
147
        assert(first != last);
149
 
        vertex_property_type vp = get(vertex_bundle, g, *first);
 
148
        VP vp = get(vertex_bundle, g, *first);
150
149
        for (It it = first + 1; it != last; ++it) {
151
150
                vertex_descriptor u = *(it - 1);
152
151
                vertex_descriptor v = *it;
157
156
}
158
157
 
159
158
template<typename Graph, typename It>
160
 
typename vertex_property<Graph>::type addProp(const Graph&,
161
 
                It, It, const no_property*)
 
159
no_property addProp(const Graph&, It, It, const no_property*)
162
160
{
163
161
        return no_property();
164
162
}