コード例 #1
0
  typename property_traits<ColorMap>::value_type
  sequential_vertex_coloring(const VertexListGraph& G, ColorMap color)
  {
    typedef typename graph_traits<VertexListGraph>::vertex_descriptor
      vertex_descriptor;
    typedef typename graph_traits<VertexListGraph>::vertex_iterator
      vertex_iterator;

    std::pair<vertex_iterator, vertex_iterator> v = vertices(G);
#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
    std::vector<vertex_descriptor> order(v.first, v.second);
#else
    std::vector<vertex_descriptor> order;
    order.reserve(std::distance(v.first, v.second));
    while (v.first != v.second) order.push_back(*v.first++);
#endif
    return sequential_vertex_coloring
             (G, 
              make_iterator_property_map
              (order.begin(), identity_property_map(), 
               graph_traits<VertexListGraph>::null_vertex()), 
              color);
  }
コード例 #2
0
ファイル: bucket_sort.hpp プロジェクト: Aantonb/gotham
 void bucket_sort(ForwardIterator begin, 
                  ForwardIterator end 
                  )  
 {
   bucket_sort(begin, end, identity_property_map());
 }
コード例 #3
0
ファイル: vector_as_graph.hpp プロジェクト: AlexS2172/IVRM
 identity_property_map 
 get(vertex_index_t, std::vector<EdgeList, Allocator>&)
 {
   return identity_property_map();
 }
コード例 #4
0
 inline identity_property_map
 get(vertex_index_t, const YASMIC_SIMPLE_CSR_GRAPH_TYPE&)
 {
     return identity_property_map();
 }