[C++-sig] Anyone tried BGL with BoostPython 2 yet?
eric at enthought.com
Tue Oct 1 10:14:30 CEST 2002
> > From: "Robert Oschler" <robertoschler at hotmail.com>
> >> Anybody been adventurous enough to try the Boost Graph Library with
> >> Python v 2? Just wondering what I might be getting myself into
> >> (difficulty-wise).
> >> thx
> From: "David Abrahams" <dave at boost-consulting.com>
> > People asked about this with Boost.Python v1, too. I think the
> > problem you'll find is that BGL is about compile-time genericity and
> > is about runtime genericity. You could easily map the BGL's
> > into Python, but that'd be best done by rewriting it in Python. Of
> > then you'd give up most of the speed.
> > Wrapping individual algorithms specialized to operate on specific
> > structures with Boost.Python should be easy, of course, and the
> > would run fast. You could think about building graphs with internal
> > property maps that contain a boost::python::object for each
> > That might be an approach which allows some compromises.
> Another interesting area to explore might be some kind of weave-like
> arrangement where C++ code for specific graph configurations is
> and compiled on-the-fly as different Python graph structures are
> BGL algorithms.
This is likely possible. I haven't look at BGL at all, but the process
you describe fits weave's mode of operation.
More information about the Cplusplus-sig