Boost logo

Boost Users :

From: David Ohlemacher (ohlemacher_at_[hidden])
Date: 2003-11-13 12:12:08

Hi Jeremy,

Internal. Here is my implementation. It is right out of your (very
helpful) book.


namespace boost
    // ECInGraph custom properties.
    enum vertex_com_t {vertex_com = 1223497};
    enum edge_nEmailsIn_t {edge_nEmailsIn = 1223498};
    enum edge_nEmailsOut_t {edge_nEmailsOut = 1223499};
    enum edge_sourceVD_t {edge_sourceVD = 1223500};
    BOOST_INSTALL_PROPERTY (vertex, com);
    BOOST_INSTALL_PROPERTY (edge, nEmailsIn);
    BOOST_INSTALL_PROPERTY (edge, nEmailsOut);
    BOOST_INSTALL_PROPERTY (edge, sourceVD);

typedef boost::property <boost::edge_nEmailsOut_t, int,
    boost::property <boost::edge_nEmailsIn_t, int,
    boost::property <boost::edge_sourceVD_t, unsigned int> > >
typedef boost::property <boost::vertex_name_t, std::string,
    boost::property <boost::vertex_com_t, int> >

typedef boost::adjacency_list <
        boost::vecS, // Edge list is a std::vector
        boost::vecS, // Vertex list is a std::vector
        boost::undirectedS, // undirected graph
        InGraphVertexProps, // Vertex properties
        InGraphEdgeProps, // Edge properties
        boost::no_property // Graph properties
> ECInGraph;

void EC::InitGraphPropertyMaps()
    // m_inGraph property maps.
    m_g2VName = boost::get(boost::vertex_name, m_inGraph);
    m_g2Com = boost::get(boost::vertex_com, m_inGraph);
    m_g2EmailsIn = boost::get(boost::edge_nEmailsIn, m_inGraph);
    m_g2EmailsOut = boost::get(boost::edge_nEmailsOut, m_inGraph);
    m_g2SourceVD = boost::get(boost::edge_sourceVD, m_inGraph);

Jeremy Siek wrote:

>I'm not sure what you mean by "custom". Are you using an internal property
>map (e.g., inside an adjacency_list) or are you using some external
>property map?
>On Thu, 13 Nov 2003, David Ohlemacher wrote:
>ohlema> Hi all.
>ohlema> Partway through my app's execution, I find that I no longer need the
>ohlema> values in a custom property map (edge). The map potentially may be
>ohlema> quite large.
>ohlema> What is the best way to empty it?
>ohlema> Thanks,
>ohlema> -d
>ohlema> _______________________________________________
>ohlema> Boost-users mailing list
>ohlema> Boost-users_at_[hidden]
> Jeremy Siek
> Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
> C++ Booster ( office phone: (812) 855-3608
>Boost-users mailing list

David Ohlemacher
BBN Technologies
127 John Clarke Rd.
Middletown, RI 02878
Phone: (401)848-3542, Fax:(401)849-8611
ohlemacher at bbn dot com

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at