Re: [Boost-users] [graph] [python] Python vertex vs. C++ Vertex

-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of David E. Konerding Sent: Monday, February 27, 2006 5:09 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [graph] [python]
Doug Gregor wrote:
Your guess is correct. We don't cache the Python objects
corresponding
to vertex and edge descriptors.
my idea was to keep the mapping between on-screen widgets and the graph vertices they corresponded to in a dictionary:
self._widgetmap[vertex] = widget
However, since Vertex objects aren't cached, placing the vertex object I get back from add_vertex obviously isn't going to work.
[Nat] Maybe twiddle the hash function of the Python vertex object so that it derives its return value from the underlying C++ Vertex?
participants (1)
-
Nat Goodspeed