#include <iostream>                  // for std::cout
#include <utility>                   // for std::pair
#include <algorithm>                 // for std::for_each
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include <boost/graph/visitors.hpp>
#include <boost/graph/transitive_closure.hpp>


using namespace boost;

int main(int,char*[])
{
    // create a typedef for the Graph type
      typedef adjacency_list<vecS, vecS, bidirectionalS> Graph;

    // Make convenient labels for the vertices
    enum { A, B, C, D, E, N };
    const int num_vertices = N;
    const char* name = "ABCDE";


    // declare a graph object
    Graph g(num_vertices);


    // get the property map for vertex indices
    typedef property_map<Graph, vertex_index_t>::type IndexMap;
    IndexMap index = get(vertex_index, g);



    std::cout << "vertices(g) = ";
    typedef graph_traits<Graph>::vertex_iterator vertex_iter;
    std::pair<vertex_iter, vertex_iter> vp;
    for (vp = vertices(g); vp.first != vp.second; ++vp.first)
      std::cout << index[*vp.first] <<  " ";
    std::cout << std::endl;

    clear_vertex(C, g);
    remove_vertex(C, g);

    std::cout << "vertices(g) = ";
    IndexMap index_2 = get(vertex_index, g);   
    for (vp = vertices(g); vp.first != vp.second; ++vp.first)
      std::cout << index_2[*vp.first] <<  " ";
    std::cout << std::endl;

  return 0;
}




