milena r1213: Fix bug in mesh_image

URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena ChangeLog: 2007-10-01 Guillaume Duhamel <guillaume.duhamel@lrde.epita.fr> Fix bug in mesh_image. * mesh_image.hh: Update. --- mesh_image.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: trunk/milena/mln/core/mesh_image.hh =================================================================== --- trunk/milena/mln/core/mesh_image.hh (revision 1212) +++ trunk/milena/mln/core/mesh_image.hh (revision 1213) @@ -100,6 +100,12 @@ const std::vector<V>& data_values () const; const mesh_p<P>& domain() const; + + /// Return the first node of the link at i from loc + const P& access_location_link_node1 (const unsigned& i) const; + + /// Return the second node of the link at i from loc + const P& access_location_link_node2 (const unsigned& i) const; }; @@ -169,6 +175,20 @@ return this->data_->mesh_; } + template <typename P, typename V> + const P& + mesh_image<P, V>::access_location_link_node1 (const unsigned& i) const + { + return this->domain().loc_[this->domain().gr_.links_[i]->node1]; + } + + template <typename P, typename V> + const P& + mesh_image<P, V>::access_location_link_node2 (const unsigned& i) const + { + return this->domain().loc_[this->domain().gr_.links_[i]->node2]; + } + # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln
participants (1)
-
Guillaume Duhamel