>>>> "Nicolas" == Nicolas
Widynski <nicolas.widynski(a)lrde.epita.fr> writes:
Index: ChangeLog
from Nicolas Widynski <nicolas.widynski(a)lrde.epita.fr>
* olena/oln/morpho/tree.hh: tree (canva).
* olena/oln/morpho/maxtree.hh: creation of maxtree.
You should turn your ChangeLog entries into sentences, and start them
with a capital letter, or, in this case, just say « New file ».
By the way, keeping olena/oln/makefile.src up to date is a good practice!
* olena/oln/morpho/clean_astro_images.hh: maxtree
utilisation's sample.
As this file is primarily an application, I think it you shouldn't put
it in Olena's library headers. We should have another place for this,
maybe an olena/tools directory.
I suppose you also have a test (driver) for this piece of code; I
encourage you to integrate it into Olena's test suite.
Index: olena/oln/morpho/tree.hh
--- olena/oln/morpho/tree.hh (revision 0)
+++ olena/oln/morpho/tree.hh (revision 0)
@@ -0,0 +1,196 @@
+// Copyright (C) 2001-2005 EPITA Research and Development Laboratory
---------
Please, list only years where the file was created or modified. This
is a new file, it should only mention 2005.
[...]
+// just for test
+#include <ntg/real/int_u.hh>
Dead code/experimental code should be removed as much as possible.
[...]
+ void traitement()
+ {
+ this->exact().impl_traitement();
+ }
Please, use only English.
Index: olena/oln/morpho/maxtree.hh
--- olena/oln/morpho/maxtree.hh (revision 0)
+++ olena/oln/morpho/maxtree.hh (revision 0)
[...]
+ protected:
+
+ // Ctor.
+ max_tree(const abstract::image_with_nbh<I>& input) :
+ super_type(input)
+ {
+ oln_ch_concrete_type(I, bool) tmp1(input.size());
+ is_proc = tmp1;
+
+ oln_ch_concrete_type(I, point_type) tmp2(input.size());
+ father = tmp2;
+
+ oln_ch_concrete_type(I, std::vector<point_type>) tmp3(input.size());
+ children = tmp3;
+
+ oln_type_of(I, concrete) tmp4(input.size());
+ this->output = tmp4;
+
+ std::vector<std::vector<point_type> > tmp5(256);
+ v_root_point = tmp5;
+
+ oln_ch_concrete_type(I, bool) tmp6(input.size());
+ marked = tmp6;
+
+ oln_ch_concrete_type(I, bool) tmp7(input.size());
+ is_deleted = tmp7;
+
+ oln_type_of(I, concrete) tmp8(input.size());
+ new_value = tmp8;
+ }
We should avoid this style of writing. It's probably not your fault,
I'm aware of issues with ctor and assignment operators.
Maybe we should flag these with FIXME's so as we won't forget to
rewrite them later when construction/assignment problems are solved?
Index: olena/oln/morpho/clean_astro_images.hh
--- olena/oln/morpho/clean_astro_images.hh (revision 0)
+++ olena/oln/morpho/clean_astro_images.hh (revision 0)
[...]
+// just for test
+#include <ntg/real/int_u.hh>
Likewise.
[...]
+ if (((p.row() == (row / 2)) or (p.row() == (row - 1)
/ 2) or (p.row() == (row + 1) / 2))
+ and ((p.col() == (col / 2)) or (p.col() == (col - 1) / 2) or (p.col() == (col + 1)
/ 2)))
When it's possible, avoid lines longer than 80 columns. I know it's
hard with the long names used in Olena.
Anyway, that was a nice patch! :)