https://svn.lrde.epita.fr/svn/oln/trunk/milena
This supplements Matthieu's patch r1749. Don't forget to re-run tests to
ensure your changes covers the whole source tree!
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Catch up with the new name of mln::util::tree_node.
* mln/util/tree_to_fast.hh,
* tests/util/branch_iter.cc,
* tests/util/branch_iter_ind.cc,
* tests/util/tree.cc,
* tests/util/tree_to_fast.cc,
* tests/util/tree_to_image.cc:
s/util::node/util::tree_node/.
mln/util/tree_to_fast.hh | 7 ++++---
tests/util/branch_iter.cc | 14 +++++++-------
tests/util/branch_iter_ind.cc | 14 +++++++-------
tests/util/tree.cc | 6 +++---
tests/util/tree_to_fast.cc | 6 +++---
tests/util/tree_to_image.cc | 2 +-
6 files changed, 25 insertions(+), 24 deletions(-)
Index: mln/util/tree_to_fast.hh
--- mln/util/tree_to_fast.hh (revision 1913)
+++ mln/util/tree_to_fast.hh (working copy)
@@ -68,10 +68,11 @@
template<typename T>
inline
void
- tree_to_fast_(node<T>* input, tree_fast<T>& tree, unsigned p,
unsigned& i)
+ tree_to_fast_(tree_node<T>* input, tree_fast<T>& tree,
+ unsigned p, unsigned& i)
{
- typename node<T>::children_t child = input->children ();
- typename node<T>::children_t::iterator it = child.begin ();
+ typename tree_node<T>::children_t child = input->children ();
+ typename tree_node<T>::children_t::iterator it = child.begin ();
for (; it != child.end (); ++it)
{
Index: tests/util/branch_iter.cc
--- tests/util/branch_iter.cc (revision 1913)
+++ tests/util/branch_iter.cc (working copy)
@@ -40,10 +40,10 @@
{
using namespace mln;
- util::node<int> n(11);
+ util::tree_node<int> n(11);
util::tree<int> t(&n);
- util::node<int>* f = n.add_child(21);
- util::node<int>* g = f->add_child(31);
+ util::tree_node<int>* f = n.add_child(21);
+ util::tree_node<int>* g = f->add_child(31);
f->add_child(32);
g->add_child(41)->add_child(51)->add_child(61)->add_child(71)
@@ -55,16 +55,16 @@
util::branch<int> b(t, n);
- std::vector< util::node<int>* >::iterator it;
+ std::vector< util::tree_node<int>* >::iterator it;
util::branch_iter<int> p(b);
int prev;
int current;
- for(p.start(), prev = util::node<int>(p).elt(), p.next();
+ for(p.start(), prev = util::tree_node<int>(p).elt(), p.next();
p.is_valid();
- prev = util::node<int>(p).elt(), p.next())
+ prev = util::tree_node<int>(p).elt(), p.next())
{
- current = util::node<int>(p).elt ();
+ current = util::tree_node<int>(p).elt ();
// children
if (prev + 10 == current)
Index: tests/util/branch_iter_ind.cc
--- tests/util/branch_iter_ind.cc (revision 1913)
+++ tests/util/branch_iter_ind.cc (working copy)
@@ -40,10 +40,10 @@
{
using namespace mln;
- util::node<int> n(11);
+ util::tree_node<int> n(11);
util::tree<int> t(&n);
- util::node<int>* f = n.add_child(21);
- util::node<int>* g = f->add_child(31);
+ util::tree_node<int>* f = n.add_child(21);
+ util::tree_node<int>* g = f->add_child(31);
f->add_child(32);
g->add_child(41)->add_child(51)->add_child(61)->add_child(71)
@@ -55,16 +55,16 @@
util::branch<int> b(t, n);
- std::vector< util::node<int>* >::iterator it;
+ std::vector< util::tree_node<int>* >::iterator it;
util::branch_iter_ind<int> p(b);
int prev;
int current;
- for(p.start(), prev = util::node<int>(p).elt(), p.next();
+ for(p.start(), prev = util::tree_node<int>(p).elt(), p.next();
p.is_valid();
- prev = util::node<int>(p).elt(), p.next())
+ prev = util::tree_node<int>(p).elt(), p.next())
{
- current = util::node<int>(p).elt ();
+ current = util::tree_node<int>(p).elt ();
// children
if (prev + 10 == current)
Index: tests/util/tree.cc
--- tests/util/tree.cc (revision 1913)
+++ tests/util/tree.cc (working copy)
@@ -45,13 +45,13 @@
unsigned elt5 = 5;
unsigned elt6 = 42;
- util::node<unsigned> node(elt1);
- util::node<unsigned>* node2 = node.add_child(elt2);
+ util::tree_node<unsigned> node(elt1);
+ util::tree_node<unsigned>* node2 = node.add_child(elt2);
node.add_child(elt3);
mln_assertion(node2);
node2->add_child(elt4);
node2->add_child(elt5);
- util::node<unsigned>* node3 = node.search(elt4);
+ util::tree_node<unsigned>* node3 = node.search(elt4);
mln_assertion(node3);
node3 = node2->search(elt1);
mln_assertion(!node3);
Index: tests/util/tree_to_fast.cc
--- tests/util/tree_to_fast.cc (revision 1913)
+++ tests/util/tree_to_fast.cc (working copy)
@@ -47,13 +47,13 @@
unsigned elt5 = 5;
unsigned elt6= 42;
- util::node<unsigned> node(elt1);
- util::node<unsigned>* node2 = node.add_child(elt2);
+ util::tree_node<unsigned> node(elt1);
+ util::tree_node<unsigned>* node2 = node.add_child(elt2);
node.add_child(elt3);
mln_assertion(node2);
node2->add_child(elt4);
node2->add_child(elt5);
- util::node<unsigned>* node3 = node.search(elt4);
+ util::tree_node<unsigned>* node3 = node.search(elt4);
mln_assertion(node3);
node3 = node2->search(elt1);
mln_assertion(!node3);
Index: tests/util/tree_to_image.cc
--- tests/util/tree_to_image.cc (revision 1913)
+++ tests/util/tree_to_image.cc (working copy)
@@ -101,7 +101,7 @@
s7.points.insert(point2d(i, j));
s7.value = 10;
- util::node<I> node(s1);
+ util::tree_node<I> node(s1);
node.add_child(s2);
node.add_child(s3);
node.add_child(s4);