
https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> More checks in the construction of graph-based images. * mln/core/graph_image.hh (mln::internal::data_< graph_image<P, V> >::data_) * mln/core/line_graph_image.hh (mln::internal::data_< line_graph_image<P, V> >::data_): Ensure the graph pset and its associated data are consistent. graph_image.hh | 1 + line_graph_image.hh | 2 ++ 2 files changed, 3 insertions(+) Index: mln/core/graph_image.hh --- mln/core/graph_image.hh (revision 2055) +++ mln/core/graph_image.hh (working copy) @@ -188,6 +188,7 @@ : val_ (val), pg_ (g) { + mln_precondition(g.nvertices() == val.size()); } } // end of namespace mln::internal Index: mln/core/line_graph_image.hh --- mln/core/line_graph_image.hh (revision 2055) +++ mln/core/line_graph_image.hh (working copy) @@ -217,6 +217,8 @@ edge_val_(edge_val), plg_(g) { + mln_precondition(g.nvertices() == vertex_val.size()); + mln_precondition(g.edges() == edge_val.size()); } } // end of namespace mln::internal