https://svn.lrde.epita.fr/svn/oln/trunk
Fix ChangeLogs.
Clean up white space in ChangeLogs.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 1558)
+++ ChangeLog (revision 1559)
@@ -2,38 +2,6 @@
* configure.ac: Configure milena/tests/core/Makefile.
-2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
-
- Remove all_headers.cc in util.
- * milena/tests/util/Makefile.am: Remove all_headers tests.
-
-2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
-
- Fix bug in Makefile.am.
-
- * milena/tests/arith/Makefile.am,
- * milena/tests/border/Makefile.am,
- * milena/tests/draw/Makefile.am,
- * milena/tests/level/Makefile.am,
- * milena/tests/logical/Makefile.am,
- * milena/tests/util/Makefile.am: Fix.
-
- * milena/tests/arith/all_headers.cc: Remove.
-
-2007-11-26 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
-
- Fix bugs.
- * milena/mln/display/color_pretty.hh: Fix warning.
- * milena/tests/Makefile.am: Add util and display directory.
- * milena/tests/util/Makefile.am: Fix compile bug.
-
-2007-11-26 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
-
- Fix Makefile.am.
-
- * milena/tests/Makefile.am,
- * milena/tests/io/fits/Makefile.am: Delete line of move test.
-
2007-11-26 Roland Levillain <roland(a)lrde.epita.fr>
Move the Olena-NG components elsewhere.
@@ -200,7 +168,7 @@
* Makefile.am (SUBDIRS): Add milena.
* milena/Makefile.am: New.
* milena/doc/Makefile.am, milena/doc/Doxyfile.in:
- New files (copied from LRDE TC's project).
+ New files (copied from LRDE TC's project).
2007-06-28 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
@@ -337,7 +305,7 @@
* configure.ac: Declare CONCEPTCXX as a previous variable.
Look for a Concept C++ compiler, and store it in CONCEPTCXX.
Configure static/samples/Makefile,
- static/samples/mini-oln/Makefile and
+ static/samples/mini-oln/Makefile and
static/samples/mini-oln/concept-c.
2006-10-31 Roland Levillain <roland(a)lrde.epita.fr>
Index: milena/ChangeLog
===================================================================
--- milena/ChangeLog (revision 1558)
+++ milena/ChangeLog (revision 1559)
@@ -52,10 +52,15 @@
convert for graylevel.
* mln/value/graylevel.hh: the graylevel type wasn't compatible with
- the generic convert in convert.hh because of a convertion to int.
+ the generic convert in convert.hh because of a convertion to int.
2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+ Remove all_headers.cc in util.
+ * tests/util/Makefile.am: Remove all_headers tests.
+
+2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+
Add convertion of a tree into tree_fast.
* mln/util/tree_to_fast.hh: Add convertion of tree into tree_fast.
@@ -103,8 +108,8 @@
Add an error of incompatible types in pnm loading.
* mln/io/pnm/load.hh: io::ppm::load<rgb8>("image16bits.ppm") now abort
- because we can't store rgb 16 bits into rgb 8 bits (likewise for
- pgm).
+ because we can't store rgb 16 bits into rgb 8 bits (likewise for
+ pgm).
* tests/io/ppm/ppm16.cc: Add some tests due to this update.
@@ -114,10 +119,10 @@
* mln/io/pnm/load.hh: (load(image&, filename)) now work on rgb images.
* mln/io/pnm/max_component.hh: Define a function which give the max of
- the component of a value type.
+ the component of a value type.
* tests/io/pgm/pgm16.cc: Now test the other way to load an image
- (load(image&, filename)).
+ (load(image&, filename)).
* tests/io/ppm/ppm16.cc: likewise.
* img/lena_16.ppm: New, lena, ppm 16 bits.
@@ -127,10 +132,23 @@
Fixes in int_u.
* mln/value/int_u.hh: max() is now mlc_pow_int(2, n) - 1. and
- (unsigned int) is back to (int) (cf my previous patch).
+ (unsigned int) is back to (int) (cf my previous patch).
2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+ Fix bug in Makefile.am.
+
+ * tests/arith/Makefile.am,
+ * tests/border/Makefile.am,
+ * tests/draw/Makefile.am,
+ * tests/level/Makefile.am,
+ * tests/logical/Makefile.am,
+ * tests/util/Makefile.am: Fix.
+
+ * tests/arith/all_headers.cc: Remove.
+
+2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+
Add include all tests for some subdirectories.
* mln/border/mirror.hh: Add geom headers.
@@ -197,6 +215,13 @@
2007-11-26 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+ Fix bugs.
+ * mln/display/color_pretty.hh: Fix warning.
+ * tests/Makefile.am: Add util and display directory.
+ * tests/util/Makefile.am: Fix compile bug.
+
+2007-11-26 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+
Review util subdirectory.
* mln/util/branch_iter.hh,
@@ -220,6 +245,13 @@
* tests/util/tree.cc,
* tests/util/tree_to_image.cc: Update.
+2007-11-26 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
+
+ Fix Makefile.am.
+
+ * tests/Makefile.am,
+ * tests/io/fits/Makefile.am: Delete line of move test.
+
2007-11-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Moves the io's tests.
@@ -264,8 +296,8 @@
2007-11-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
svn ignore .deps directories. Update makefiles.
- * milena/tests/Makefile.am: Move accu's checks...
- * milena/tests/accu/Makefile.am: ...here.
+ * tests/Makefile.am: Move accu's checks...
+ * tests/accu/Makefile.am: ...here.
2007-11-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -706,7 +738,7 @@
2007-11-21 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Little fix in test/Makefile.am.
- * milena/tests/Makefile.am: Fix warning.
+ * tests/Makefile.am: Fix warning.
2007-11-20 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
@@ -931,7 +963,7 @@
Review the mln/geom directory.
* mln/geom/seeds2tiling.hh: Clean dead code, update doc. Fixme for
- guillaume : Review the documentation.
+ guillaume : Review the documentation.
* mln/geom/seeds2tiling_with_chamfer.hh: likewise.
Add unit tests.
@@ -997,9 +1029,9 @@
* mln/debug/println.hh: Move spezialisations to println.spe.hh.
* mln/debug/println.spe.hh: New, specializations of println.
* mln/debug/println_with_border.hh: Move spezialisations to
- println_with_border.spe.hh.
+ println_with_border.spe.hh.
* mln/debug/println_with_border.spe.hh: New, specializations of
- println.
+ println.
* tests/debug_iota.cc: New, add a test for iota.
@@ -1096,7 +1128,7 @@
* mln/literal/origin.hh,
* mln/literal/white.hh,
* tests/literal/black.cc: Use extern const ref, not static. Move
- impl. within MLN_INCLUDE_ONLY.
+ impl. within MLN_INCLUDE_ONLY.
Move/add some unit tests.
@@ -1192,7 +1224,7 @@
A better test for io::pbm.
* tests/io_pbm.cc: Take a pgm, binarise it, save it, read it, and
- check we we get the same pbm.
+ check we we get the same pbm.
2007-11-13 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
@@ -1325,11 +1357,11 @@
* sandbox/garrigues/fllt_optimized.hh: Update.
* sandbox/garrigues/fllt_types.hh: New, types used in FLLT.
* sandbox/garrigues/level_set.hh: New, compute lower/upper level set
- algorithm
+ algorithm
* sandbox/garrigues/lower.hh: New, informations about how to compute
- the lower level set.
+ the lower level set.
* sandbox/garrigues/upper.hh: New, informations about how to compute
- the lower level set.
+ the lower level set.
* sandbox/garrigues/test_fllt12.cc: Cleaning, (fllt2.hh) replaced by...
(fllt_optimized.hh) ...this.
@@ -1339,7 +1371,7 @@
* sandbox/garrigues/test_fllt_lena_tiles.cc: Likewise.
* mln/util/branch_iter_ind.hh: Check if the tree has not
- been subject to updates which can invalidate the iterator.
+ been subject to updates which can invalidate the iterator.
* sandbox/garrigues/fllt2.hh: (set_p) replaced by...
{p_set} ...this.
@@ -1618,8 +1650,8 @@
Choice a good root of the merged tree in FLLT.
* sandbox/garrigues/fllt2.hh: (merge_trees) Choose a good root between
- the upper tree's one and the lower tree's one in order to keep the
- good values of the input image.
+ the upper tree's one and the lower tree's one in order to keep the
+ good values of the input image.
(fllt) add a second call to merge_trees to test the contrast
invariant of the algorithm. FIXME : In some test, we get a segv when
calling merge_trees swapping the upper_tree and lower_tree
@@ -1653,21 +1685,21 @@
* sandbox/garrigues/test_fllt2.cc,
* sandbox/garrigues/test_fllt3.cc,
* sandbox/garrigues/test_fllt_tiny.cc: likewise, Update include to
- test fllt2.hh.
+ test fllt2.hh.
2007-11-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Start a second version of merging trees in FLLT.
* sandbox/garrigues/fllt2.hh: New, looks like fllt.hh but differs in
- merge trees. We keep the old file fllt.hh to avoid regression.
+ merge trees. We keep the old file fllt.hh to avoid regression.
2007-11-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Fix an bug in make::image2d.
* mln/make/image2d.hh: (for (unsigned row = 0; row <= R; ++row))
- replaced by...
+ replaced by...
(for (unsigned row = 0; row < R; ++row)) ...this.
2007-11-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -1675,7 +1707,7 @@
Add box_bounds_piter_ to iterate on the bounds of a box2d.
* mln/core/box_piter.hh: (box_bounds_piter_) New, iterator to iterate
- on the bounds of a box2d.
+ on the bounds of a box2d.
2007-11-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -1687,14 +1719,14 @@
* sandbox/garrigues/test_fllt9.cc: New,
* sandbox/garrigues/test_fllt_lena.cc: New,
* sandbox/garrigues/test_fllt_lena_tiles.cc: New, test FLLT with
- differents 2d images.
+ differents 2d images.
2007-11-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Fix compilation error in core/concept/box.hh.
* mln/core/concept/box.hh: Add parenthesis to remove an ambiguity at
- the operator !.
+ the operator !.
2007-11-05 Simon Nivault <simon.nivault(a)lrde.epita.fr>
@@ -1922,7 +1954,7 @@
* mln/core/image2d.hh: Include make/image2d.hh at the end of the file.
* mln/make/image2d.hh: New, Add routine to make a image2d with a 2d
- array
+ array
* tests/make_image2d.cc: New, tests on make::image2d.
2007-10-30 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
@@ -2040,7 +2072,7 @@
Improve fllt. Add more tests.
* mln/set/is_subset_of.hh: New, Test if a point set is a subset of
- another.
+ another.
* mln/util/branch_iter.hh: Update
* mln/util/tree.hh: (tree<T>::add_child(node<T>*)) New,
(tree<T>::main_branch()) New.
@@ -2051,7 +2083,7 @@
* sandbox/garrigues/test_fllt4.cc,
* sandbox/garrigues/test_fllt5.cc,
* sandbox/garrigues/test_fllt_tiny.cc: New, differents cases of tests
- for fllt.
+ for fllt.
2007-10-26 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
@@ -2192,7 +2224,7 @@
2007-10-26 Simon Nivault <simon.nivault(a)lrde.epita.fr>
Fix on tree for compiling, and Fix in fllt.
- * mln/util/tree.hh,
+ * mln/util/tree.hh,
* mln/util/tree_fast.hh,
* sandbox/garrigues/fllt.hh: Fix.
@@ -2257,7 +2289,7 @@
Update fllt.
* sandbox/garrigues/fllt.hh: (border_neighb and region_neighb) Rename
- as...
+ as...
(border_neighb and region_neighb) ...this.
2007-10-24 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
@@ -2517,7 +2549,7 @@
2007-10-22 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Update of abr.
-
+
* mln/util/abr.hh: Update with better coding style.
* tests/abr.cc: Add assertion in this test.
@@ -2738,7 +2770,7 @@
2007-10-17 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
- Fix namespaces documentation.
+ Fix namespaces documentation.
* mln/arith/all.hh: New,
* mln/canvas/all.hh: New,
@@ -3103,7 +3135,7 @@
* mln/core/h_vec.hh (h_vec): New ctor overload for vec<d+1>.
(operator=): New overload for vec<d+1>.
* mln/metal/mat.hh (trait): New def for mat * vec.
- (operator*): Strengthen scalar version to disambiguate.
+ (operator*): Strengthen scalar version to disambiguate.
* mln/metal/vec.hh (to_h_vec): New method decl.
* mln/fun/x2x/translation.hh: Deactivate code in ctor w/o arg.
* mln/fun/x2x/rotation.hh: Likewise.
@@ -3325,7 +3357,7 @@
* mln/literal/zero.hh: Fix typo in doc.
* mln/value/int_s.hh: Handle literals.
* mln/value/int_u.hh (zero, one): Remove variables.
- * mln/value/concept/scalar.hh,
+ * mln/value/concept/scalar.hh,
* mln/make/w_window_line.hh,
* mln/morpho/hit_or_miss.hh: Update with literals.
@@ -4215,7 +4247,7 @@
* mln/value/concept/structured.hh,
* mln/value/concept/symbolic.hh,
* mln/value/concept/vectorial.hh: Add categories for each of these
- types (in namespace value).
+ types (in namespace value).
2007-10-05 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -4269,10 +4301,10 @@
---------------------------
| | | |
Scalar Vectoriel Symbolic Structured
- ^
+ ^
|
- --------
- | |
+ --------
+ | |
Integer Floating
* mln/value/internal/floating.hh: New.
@@ -4480,7 +4512,7 @@
Update doc of accus. Update Accumulator.
* mln/core/concept/accumulator.hh: Test if the convertion operator
- exist.
+ exist.
* mln/core/concept/doc/accumulator.hh: Add operator result().
@@ -4497,7 +4529,7 @@
Remove convertion method in median_alt.
* mln/accu/median_alt.hh: Move convertion method to the super class
- accu::internal::base_
+ accu::internal::base_
* mln/accu/nil.hh,
* mln/accu/p.hh: Clean old includes.
@@ -5381,7 +5413,7 @@
Clean interpolated image class.
* mln/core/interpolated.hh: Remove useless methods because of
- inherited methods from identity morpher.
+ inherited methods from identity morpher.
2007-09-25 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -5426,7 +5458,7 @@
* mln/core/rle_image.hh,
* mln/core/sparse_image.hh: Move the data allocation to the insert
- method.
+ method.
2007-09-25 Simon Nivault <simon.nivault(a)lrde.epita.fr>
@@ -5461,16 +5493,16 @@
* mln/core/decorated_image.hh: Remove super_ typedef.
* mln/core/interpolated.hh: Inherit from identity morpher. Add memory
- managment.
+ managment.
* mln/core/rle_image.hh,
* mln/core/sparse_image.hh,
* mln/core/internal/run_image.hh: Inherit from image_primary, move
- domain_ attribute to the descendants classes rle_images and
- sparse_image. Add memory managment to rle and sparse images.
+ domain_ attribute to the descendants classes rle_images and
+ sparse_image. Add memory managment to rle and sparse images.
* mln/core/safe.hh: Inherit from identity morpher. Add memory
- managment.
+ managment.
* mln/value/stack.hh: Inherit from value morpher.
@@ -5978,11 +6010,11 @@
* image2d_b.hh:
* image2d_b_data.hh: move image data into an imaage2d_b_data class,
- then hold it with a tracked pointer to avoid useless data copy like
- in olena
+ then hold it with a tracked pointer to avoid useless data copy like
+ in olena
* internal/tracked_ptr.hh: tracked pointer class from olena. fix a bug
- related to invariant_ call to optimize data access.
+ related to invariant_ call to optimize data access.
2007-09-19 Simon Nivault <simon.nivault(a)lrde.epita.fr>
@@ -6038,7 +6070,7 @@
* mln/core/internal/pixel_iterator_base.hh (boi_): Make it
before-the-beginning (reverse of past-the-end).
- (start, is_valid): Update.
+ (start, is_valid): Update.
* mln/core/line_piter.hh: Import super_::dim.
* mln/core/box_piter.hh: Likewise.
* mln/core/neighb.hh: Change inheritance to dpoints_base_.
@@ -6149,20 +6181,20 @@
Improve pnm support.
* mln/io/fits/load.hh: start debug, only the first column of the image
- is filled
+ is filled
* mln/io/internal/pnm/load.hh: add a second funtion to load a function
- load(ima, filename). Then we can check if ima is the right type to
- load the image in the file filename.
+ load(ima, filename). Then we can check if ima is the right type to
+ load the image in the file filename.
* mln/io/internal/pnm/load_header.hh: update read_header to get the
- maxvalue of the pnm header. We need it to check if max(mln_value(I))
- == maxval
+ maxvalue of the pnm header. We need it to check if max(mln_value(I))
+ == maxval
* mln/io/internal/pnm/save.hh:
* mln/io/internal/pnm/save_header.hh: change save_header(type, maxval,
- ima, filename, file) to save_header(type, maxval, ima, filename,
- file)
+ ima, filename, file) to save_header(type, maxval, ima, filename,
+ file)
* mln/io/pbm/save.hh:
* mln/io/pgm/load.hh:
@@ -7150,7 +7182,7 @@
* mln/core/concept/generalized_pixel.hh,
* mln/core/internal/pixel_impl.hh (ima): New.
* mln/core/concept/doc/generalized_pixel.hh,
- * mln/core/concept/doc/pixel_iterator.hh
+ * mln/core/concept/doc/pixel_iterator.hh
* mln/core/concept/generalized_pixel.hh,
* mln/core/concept/pixel_iterator.hh,
* mln/core/dpoints_pixter.hh (ctor): Better sig.
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-27 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Add convertion of a tree into tree_fast.
* mln/util/tree_to_fast.hh: Add convertion of tree into tree_fast.
Tests
* tests/util/tree_to_fast.cc: New tests for this.
* tests/util/Makefile.am: Update.
---
mln/util/tree_fast_to_image.hh | 2
mln/util/tree_to_fast.hh | 110 +++++++++++++++++++++++++++++++++++++++++
tests/util/Makefile.am | 4 +
tests/util/tree_to_fast.cc | 74 +++++++++++++++++++++++++++
4 files changed, 188 insertions(+), 2 deletions(-)
Index: trunk/milena/tests/util/tree_to_fast.cc
===================================================================
--- trunk/milena/tests/util/tree_to_fast.cc (revision 0)
+++ trunk/milena/tests/util/tree_to_fast.cc (revision 1553)
@@ -0,0 +1,74 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*!
+ * \file tests/util/tree_to_fast.cc
+ *
+ * \brief test of mln::util::tree_to_fast
+ *
+ */
+
+#include <mln/util/tree.hh>
+#include <mln/util/tree_to_fast.hh>
+#include <mln/util/tree_fast.hh>
+
+int main ()
+{
+ using namespace mln;
+
+ unsigned elt1 = 1;
+ unsigned elt2 = 2;
+ unsigned elt3 = 3;
+ unsigned elt4 = 4;
+ unsigned elt5 = 5;
+ unsigned elt6= 42;
+
+ util::node<unsigned> node(elt1);
+ util::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);
+ mln_assertion(node3);
+ node3 = node2->search(elt1);
+ mln_assertion(!node3);
+ util::tree<unsigned>* tre = new util::tree<unsigned>(&node);
+ mln_assertion(tre);
+ tre->add_tree_up(elt6);
+ mln_assertion (tre->check_consistency());
+
+
+ util::tree_fast<unsigned> tree_fast = util::tree_to_fast(*tre);
+ mln_assertion(tree_fast.has (elt1));
+ mln_assertion(tree_fast.has (elt2));
+ mln_assertion(tree_fast.has (elt3));
+ mln_assertion(tree_fast.has (elt4));
+ mln_assertion(tree_fast.has (elt5));
+ mln_assertion(tree_fast.has (elt6));
+ mln_assertion(tree_fast.search(elt6) == tree_fast.root_);
+}
Index: trunk/milena/tests/util/Makefile.am
===================================================================
--- trunk/milena/tests/util/Makefile.am (revision 1552)
+++ trunk/milena/tests/util/Makefile.am (revision 1553)
@@ -13,7 +13,8 @@
tree \
tree_fast \
tree_fast_to_image \
- tree_to_image
+ tree_to_image \
+ tree_to_fast
all_headers_SOURCES = all_headers.cc
branch_iter_SOURCES = branch_iter.cc
@@ -25,5 +26,6 @@
tree_fast_SOURCES = tree_fast.cc
tree_fast_to_image_SOURCES = tree_to_image.cc
tree_to_image_SOURCES = tree_to_image.cc
+tree_to_fast_SOURCES = tree_to_fast.cc
TESTS = $(check_PROGRAMS)
Index: trunk/milena/mln/util/tree_to_fast.hh
===================================================================
--- trunk/milena/mln/util/tree_to_fast.hh (revision 0)
+++ trunk/milena/mln/util/tree_to_fast.hh (revision 1553)
@@ -0,0 +1,110 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_UTIL_TREE_TO_FAST_HH
+# define MLN_UTIL_TREE_TO_FAST_HH
+
+/*!
+ * \file mln/util/tree_to_fast.hh
+ *
+ * \brief Definition of function which converts a tree into tree_fast.
+ *
+ */
+
+# include <mln/util/tree.hh>
+# include <mln/util/tree_fast.hh>
+# include <mln/trace/all.hh>
+
+
+namespace mln
+{
+
+ namespace util
+ {
+
+
+ /*! Convert a tree into an tree_fast.
+ *
+ * \param[in] input The tree to convert.
+ *
+ * \return The tree_fast containing tree informations.
+ *
+ */
+ template<typename T>
+ tree_fast<T>
+ tree_to_fast(tree<T>& input);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ namespace impl
+ {
+
+ template<typename T>
+ void
+ tree_to_fast_(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 ();
+
+ for (; it != child.end (); ++it)
+ {
+ tree.add_child(p, (*it)->elt ());
+ ++i;
+ impl::tree_to_fast_((*it), tree, i, i);
+ }
+ }
+
+ }
+
+ /// Facade.
+
+ template<typename T>
+ tree_fast<T>
+ tree_to_fast(tree<T>& input)
+ {
+ trace::entering("util::tree_to_fast");
+
+ unsigned i = 0;
+ tree_fast<T> tree (input.root ()->elt ());
+
+ impl::tree_to_fast_(input.root (), tree, 0, i);
+
+ trace::exiting("util::tree_to_fast");
+ return tree;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::util
+
+} // end of namespace mln
+
+
+#endif // !MLN_UTIL_TREE_TO_FAST_HH
+
Index: trunk/milena/mln/util/tree_fast_to_image.hh
===================================================================
--- trunk/milena/mln/util/tree_fast_to_image.hh (revision 1552)
+++ trunk/milena/mln/util/tree_fast_to_image.hh (revision 1553)
@@ -89,7 +89,7 @@
trace::exiting("util::impl::tree_fast_to_image");
}
- } // end of mln::util::impl
+ } // end of namespace mln::util::impl
URL: https://svn.lrde.epita.fr/svn/oln/trunk
OK to apply?
(Use Reply-All, I'm not subscribed to this ML, thanks)
ChangeLog:
2007-11-27 Benoit Sigoure <tsuna(a)lrde.epita.fr>
Fix typos in the tutorial.
* milena/doc/tutorial/slides.tex: Various typos everywhere.
---
slides.tex | 47 ++++++++++++++++++++++++-----------------------
1 files changed, 24 insertions(+), 23 deletions(-)
Index: milena/doc/tutorial/slides.tex
===================================================================
--- milena/doc/tutorial/slides.tex (revision 1543)
+++ milena/doc/tutorial/slides.tex (working copy)
@@ -243,7 +243,7 @@
\item Many libraries exist that can fulfill one's needs.
\item If you're happy with your favorite tool, we cannot force you
to change for \mln...
- \item Though, you might have a look at \mln and being seduced!
+ \item Though, you might have a look at \mln and be seduced!
\end{itemize}
\end{block}
@@ -253,7 +253,7 @@
\begin{block}{No!}
\begin{itemize}
\item \mln is rather different than available libraries.
- \item A lot of convenient data structures that \emph{really} helps
+ \item A lot of convenient data structures that \emph{really} help
you in developing IP solutions.
\end{itemize}
\end{block}
@@ -310,7 +310,8 @@
\smallskip
\begin{lstlisting}[basicstyle={\tiny\sffamily}]
template <typename I, typename H>
-void transform_inplace(Image<I>& f_, const Function_v2v<H>& h_)
+void transform_inplace(Image<I>& f_,
+ const Function_v2v<H>& h_)
{
I& f = exact(f);
const H& h = exact(h_);
@@ -361,7 +362,7 @@
%........................................................................
\begin{frame}%[<+->]
- \frametitle{What's In a Library}
+ \frametitle{What's In The Library}
\begin{itemize}
\item algorithms:\\
@@ -389,7 +390,7 @@
\begin{itemize}
\item Generic...
\item Efficient so that one can process large images.
- \item Quite as easy to use as a C or Java library.
+ \item Almost as easy to use as a C or Java library.
\item Many tools to help writing readable algorithms in a concise way.
\end{itemize}
@@ -552,7 +553,7 @@
\texttt{arith} & arithmetical operators \\
\texttt{border} & routines about virtual border &
\texttt{canvas} & canvases \\
-\texttt{convert} & conversions routines &
+\texttt{convert} & conversion routines &
\texttt{core} & the library core \\
\texttt{debug} & debugging tools &
\texttt{display} & display tools \\
@@ -605,7 +606,7 @@
not on implementation details about how to do it
\smallskip
%
- \item you do not have found yet a library to easily process your
+ \item you have not yet found a library to easily process your
particular types of data
\end{itemize}
@@ -824,9 +825,9 @@
\begin{frame}[fragile]
\frametitle{Modifying the State of an Object (2/2)}
- accessing and modifying through method calls allow some control:
+ accessing and modifying through method calls allows for some control:
\begin{itemize}
- \item one cannot do everything with an object
+ \item one cannot do anything with an object
\item especially putting it in an invalid state
\end{itemize}
@@ -888,7 +889,7 @@
\begin{itemize}
\item no need to take the address (with \&) of an object
\item no pointer arithmetics
- \item no $->$ in use
+ \item no $->$ to access members
\end{itemize}
\item it \emph{always} designates the same object
\begin{itemize}
@@ -995,7 +996,7 @@
accessible from the user
\begin{itemize}
\item thanks to the keyword \kw{private}
- \item writing \code{p.row\_} outside this class is not allowed (do
+ \item writing \code{p.row\_} outside this class is not allowed (does
not compile)
\end{itemize}
\smallskip
@@ -1003,7 +1004,7 @@
\item the method \code{row()} is accessible (keyword \kw{public})
\begin{itemize}
\item in the method body we have some room to add code
- \item a simple access to data can performs some clever stuff that
+ \item a simple access to data can perform some clever stuff that
you do not really have to know (neither want to)!
\end{itemize}
\end{itemize}
@@ -1121,7 +1122,7 @@
\end{lstlisting}
\begin{itemize}
-\item the variable \code{r} represents an object which type is
+\item the variable \code{r} represents an object the type of which is
precisely \code{rabbit}
\begin{center}
we say that it is the \emph{exact} type behind this variable
@@ -1165,7 +1166,7 @@
\item In that case
\begin{itemize}
\item at compile-time: there are many possible types of objects represented
- \item at run-time: there is one object represented so just type.
+ \item at run-time: there is one object represented so just one type.
\end{itemize}
\end{itemize}
@@ -1184,7 +1185,7 @@
About ``classical'' object-orientation:
\begin{itemize}
- \item abstractions (like \code{animal}) leads to poor
+ \item abstractions (like \code{animal}) lead to poor
performance at run-time when involved in intensive scientific code.
%
\item it is due to the fact that the exact type is lost\\
@@ -1340,7 +1341,7 @@
\begin{frame}[fragile]
\frametitle{A rationale for Genericity}
-Suppose that you want a routine that computes twice the input:
+Suppose that you want a routine that computes twice its input:
\begin{lstlisting}
int twice(int i) { return 2 * i; }
\end{lstlisting}
@@ -1434,7 +1435,7 @@
one of the procedure argument ``\code{(T t)}''
%
\item the nature of \code{t} is \code{T}, the nature of \code{T} is
- \code{typename} (so designates a type)
+ \code{typename} (so it designates a type)
%
\item the \cpp keyword introducing a generic piece of code is
\kw{template}
@@ -1476,7 +1477,7 @@
\item \code{int twice(int t) { return 2 * t; }} and
\item \code{float twice(float t) { return 2 * t; }}
\end{itemize}
-\item so it is not so different than with overloading
+\item so it is not so different than overloading
\end{itemize}
except that:
@@ -1762,7 +1763,7 @@
}
\end{lstlisting}
-How can we ensure that the delta-point type \code{D} really correspond
+How can we ensure that the delta-point type \code{D} really corresponds
to \code{P}? {\scriptsize (we really do not want \code{P} and
\code{D} resp. being \code{point3d} and \code{dpoint2d}!)}
@@ -1803,7 +1804,7 @@
}
\end{lstlisting}
-What is the problem? (Hint: read both signatures in natural language)
+What is the problem? (Hint: read both signatures out loud)
\end{frame}
@@ -1829,7 +1830,7 @@
\end{lstlisting}
which is clearly not ambiguous (but slow at run-time...)
-where \code{Dpoint} and \code{Image} are abstract class.
+where \code{Dpoint} and \code{Image} are abstract classes.
\end{frame}
@@ -2140,11 +2141,11 @@
\scriptsize{it works for any delta-point type}
\smallskip
%
-\item is fast
+\item is fast,
\scriptsize{you cannot get more efficient code}
\smallskip
%
-\item is user-friendly
+\item is user-friendly,
\scriptsize{just write ``\code{dp1 + dp2}'' to add a couple of delta-points}
\end{itemize}