Boost logo

Boost Users :

Subject: Re: [Boost-users] property mapping -- from vertex to complex structure
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-09-25 14:19:25

On Sun, 25 Sep 2011, Ice Frog wrote:

> Hi,

> In my project, every vertex represents a self-defined structure as as
> basic block. It seems property(e.g., vertex_name_t) can only map a
> vertex to enum, i.e, integer. Is it possible to map a vertex to a
> pointer or struct?    Even if I define a new vertex_xxx_t, it can also
> only map to enum.

Vertices can map to anything you want -- they normally map to things like
doubles or strings. Use the second parameter to boost::property (for a
graph) or the value template parameter of an external property map to set
the type of values mapped to.

-- Jeremiah Willcock

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