Boost logo

Boost Users :

From: Hugues Joly (hjoly2003_at_[hidden])
Date: 2004-04-30 07:28:48


Hi,
   I have found a bug with the adjacency_list. It
seems that there's a bug with the deletion of a
vertex.

See the attachment for a small program that triggers
the problem.

Thanks in advance.

__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca

// test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <boost/config.hpp>
#include <iostream>
#include <boost/graph/subgraph.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp>

int _tmain(int argc, _TCHAR* argv[])
{
        using namespace boost;
        //typedef adjacency_list_traits<vecS, vecS, directedS> Traits;// Does nothing?
        typedef boost::property<boost::vertex_color_t, int,
                                                        boost::property< boost::vertex_name_t, std::string > > VertexProperty;

        typedef adjacency_list<vecS, vecS, directedS, VertexProperty, property<edge_index_t, int> > Graph;

        Graph G0;
        Graph::vertex_descriptor v_descr[4];
        Graph::edge_descriptor e_descr[4];

        for (int i = 0; i < 4; i++)
        {
                v_descr[i] = boost::add_vertex(G0);
        }

        for (int i = 0; i < 4; i++)
        {
                boost::remove_vertex(v_descr[i], G0);
        }

        return 0;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net