Anyone tried BGL with BoostPython 2 yet?
Anybody been adventurous enough to try the Boost Graph Library with Boost Python v 2? Just wondering what I might be getting myself into (difficulty-wise). thx
People asked about this with Boost.Python v1, too. I think the biggest problem you'll find is that BGL is about compile-time genericity and Python is about runtime genericity. You could easily map the BGL's genericity into Python, but that'd be best done by rewriting it in Python. Of course, then you'd give up most of the speed. Wrapping individual algorithms specialized to operate on specific graph structures with Boost.Python should be easy, of course, and the algorithms would run fast. You could think about building graphs with internal property maps that contain a boost::python::object for each edge/vertex. That might be an approach which allows some compromises. ----------------------------------------------------------- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com ----- Original Message ----- From: "Robert Oschler" <robertoschler@hotmail.com> Anybody been adventurous enough to try the Boost Graph Library with Boost Python v 2? Just wondering what I might be getting myself into (difficulty-wise). thx
From: "Robert Oschler" <robertoschler@hotmail.com>
Anybody been adventurous enough to try the Boost Graph Library with Boost Python v 2? Just wondering what I might be getting myself into (difficulty-wise).
thx
From: "David Abrahams" <dave@boost-consulting.com>
People asked about this with Boost.Python v1, too. I think the biggest problem you'll find is that BGL is about compile-time genericity and Python is about runtime genericity. You could easily map the BGL's genericity into Python, but that'd be best done by rewriting it in Python. Of course, then you'd give up most of the speed.
Wrapping individual algorithms specialized to operate on specific graph structures with Boost.Python should be easy, of course, and the algorithms would run fast. You could think about building graphs with internal property maps that contain a boost::python::object for each edge/vertex. 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 generated and compiled on-the-fly as different Python graph structures are passed to BGL algorithms. ----------------------------------------------------------- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com
From: "Robert Oschler" <robertoschler@hotmail.com>
Anybody been adventurous enough to try the Boost Graph Library with Boost Python v 2? Just wondering what I might be getting myself into (difficulty-wise).
thx
From: "David Abrahams" <dave@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 Python is about runtime genericity. You could easily map the BGL's genericity into Python, but that'd be best done by rewriting it in Python. Of course, then you'd give up most of the speed.
Wrapping individual algorithms specialized to operate on specific graph structures with Boost.Python should be easy, of course, and the algorithms would run fast. You could think about building graphs with internal property maps that contain a boost::python::object for each edge/vertex. 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 generated and compiled on-the-fly as different Python graph structures are
biggest passed to
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. eric
----- Original Message ----- From: "David Abrahams" <dave@boost-consulting.com> To: <c++-sig@python.org> Sent: Sunday, September 29, 2002 1:08 PM Subject: Re: [C++-sig] Anyone tried BGL with BoostPython 2 yet?
People asked about this with Boost.Python v1, too. I think the biggest problem you'll find is that BGL is about compile-time genericity and Python is about runtime genericity. You could easily map the BGL's genericity into Python, but that'd be best done by rewriting it in Python. Of course, then you'd give up most of the speed.
Wrapping individual algorithms specialized to operate on specific graph structures with Boost.Python should be easy, of course, and the algorithms would run fast. You could think about building graphs with internal property maps that contain a boost::python::object for each edge/vertex. That might be an approach which allows some compromises.
My question was poorly phrased. I'm going to write a specific data structure "housing module" that will use graph structures for encoding complex data structures. I will use the BGL for managing the data structure queries, but Python will only see the "housing module" classes and method calls which I hope to expose via the Boost Python wrappers. Python will not talk to the BGL directly at all. My question was more to do with someone using the BGL within a Boost extensions module, and any possible conflicts or caveats that may come from attempting that, not with trying to wrap the BGL itself for general Python access. Sorry for the confusion. thx
From: "Robert Oschler" <robertoschler@hotmail.com>
From: "David Abrahams" <dave@boost-consulting.com>
People asked about this with Boost.Python v1, too. I think the biggest problem you'll find is that BGL is about compile-time genericity and Python is about runtime genericity. You could easily map the BGL's genericity into Python, but that'd be best done by rewriting it in Python. Of
course,
then you'd give up most of the speed.
Wrapping individual algorithms specialized to operate on specific graph structures with Boost.Python should be easy, of course, and the algorithms would run fast. You could think about building graphs with internal property maps that contain a boost::python::object for each edge/vertex. That might be an approach which allows some compromises.
My question was poorly phrased. I'm going to write a specific data structure "housing module" that will use graph structures for encoding complex data structures.
I will use the BGL for managing the data structure queries, but Python will only see the "housing module" classes and method calls which I hope to expose via the Boost Python wrappers. Python will not talk to the BGL directly at all. My question was more to do with someone using the BGL within a Boost extensions module, and any possible conflicts or caveats that may come from attempting that, not with trying to wrap
Out of curiosity: what are you doing, large-scale architecture? the
BGL itself for general Python access. Sorry for the confusion.
It shouldn't cause any problems, as I am using BGL within the Boost.Python library implementation. ----------------------------------------------------------- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com
----- Original Message ----- From: "David Abrahams" <dave@boost-consulting.com> To: <c++-sig@python.org> Sent: Sunday, September 29, 2002 2:05 PM Subject: Re: [C++-sig] Anyone tried BGL with BoostPython 2 yet?
From: "Robert Oschler" <robertoschler@hotmail.com>
From: "David Abrahams" <dave@boost-consulting.com>
Out of curiosity: what are you doing, large-scale architecture?
No I'm using BGL for packet traffic routing analysis. thx
participants (3)
-
David Abrahams -
eric jones -
Robert Oschler