#149: Revamp util::graph
--------------------------+-------------------------------------------------
Reporter: levill_r | Owner: levill_r
Type: enhancement | Status: new
Priority: major | Milestone: Olena 1.0
Component: Milena | Version: 1.0
Resolution: | Keywords: rename cleanup
--------------------------+-------------------------------------------------
Old description:
* Get rid of superfluous dynamic allocations (w.r.t.
vertices & edges
handling).
* Move properties attached to vertices and edges out of the graph (this
should allow the merging of `util::graph` and
`util::internal::graph_base`.
* Allow the removal of vertices and edges. Don't forget to warn users
about the invalidation of vertex and edge ids (handlers).
* Stop using the term « id » (« identifier ») for vertices and edges,
and prefer the term « handler » ? (The BGL call them « descriptors ».)
* As for images, use a `tracked_ptr` to handle the data of the graph,
i.e. split `util::graph` classe(s) in two:
* the graph « shell(s) », holding `tracked_ptr` to shared data; and
* the actual graph data (vertices and egdes).
Also, handle graphs directly from `p_graph` and `p_line_graph` instead
of using a `tracked_ptr`, as copying graphs will become cheap (as for
images).
* Move graph-related types and routine from `mln/core/` to `mln/topo/`.
All these changes might bring us closer to the BGL' `adjacency_list`.
See how we could factor things, while not requiring a dependency on the
BGL.
New description:
* Get rid of superfluous dynamic allocations (w.r.t. vertices & edges
handling).
* Move properties attached to vertices and edges out of the graph (this
should allow the merging of `util::graph` and
`util::internal::graph_base`.
* As for images, use a `tracked_ptr` to handle the data of the graph,
i.e. split `util::graph` classe(s) in two:
* the graph « shell(s) », holding `tracked_ptr` to shared data; and
* the actual graph data (vertices and egdes).
Also, handle graphs directly from `p_graph` and `p_line_graph` instead of
using a `tracked_ptr`, as copying graphs will become cheap (as for
images).
Additional (optional) propositions:
* Allow the removal of vertices and edges. Don't forget to warn users
about the invalidation of vertex and edge ids (handlers).
* Stop using the term « id » (« identifier ») for vertices and edges, and
prefer the term « handler » ? (The BGL call them « descriptors ».)
* Move graph-related types and routine from `mln/util/` to `mln/topo/`.
All these changes might bring us closer to the BGL' `adjacency_list`. See
how we could factor things, while not requiring a dependency on the BGL.
--
Comment(by levill_r):
Qualify some propositions as optional.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/149#comment:5>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.