2006-08-28 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Add some versions for float data.
* olena/oln/lrde/ufmt/utils.hh (to_float_with_noise): New.
(rev_sort): New.
* olena/oln/lrde/ufmt/README: Update.
* olena/oln/lrde/ufmt/bin/sp_maxtree.cc: New.
* olena/oln/lrde/ufmt/bin/spx_maxtree.cc: New.
* olena/oln/lrde/ufmt/spx_maxtree.hh: New.
* olena/oln/lrde/ufmt/sp_maxtree.hh: New.
Index: 10.252/oln.prj
--- 10.252/oln.prj
+++ 10.252(w)/oln.prj
@@ -1594,6 +1594,26 @@
(olena/oln/lrde/ufmt/bin/hdx_maxtree.cc (oln/x/35_hdx_maxtre 1.1 644))
(olena/oln/lrde/ufmt/bin/gen_worst_salembier.cc (oln/x/36_gen_worst_ 1.1 644))
(olena/oln/lrde/ufmt/bin/hpx_maxtree.cc (oln/x/37_hpx_maxtre 1.1 644))
+
+;; Files added by populate at Mon, 28 Aug 2006 14:40:45 +0200,
+;; to version 10.252(w), by theo:
+
+ (olena/oln/lrde/ufmt/bin/sp_maxtree.cc ())
+
+;; Files added by populate at Mon, 28 Aug 2006 14:40:49 +0200,
+;; to version 10.252(w), by theo:
+
+ (olena/oln/lrde/ufmt/bin/spx_maxtree.cc ())
+
+;; Files added by populate at Mon, 28 Aug 2006 14:40:54 +0200,
+;; to version 10.252(w), by theo:
+
+ (olena/oln/lrde/ufmt/spx_maxtree.hh ())
+
+;; Files added by populate at Mon, 28 Aug 2006 14:40:58 +0200,
+;; to version 10.252(w), by theo:
+
+ (olena/oln/lrde/ufmt/sp_maxtree.hh ())
)
(Merge-Parents
(10.251 complete
Index: 10.252/olena/oln/lrde/ufmt/utils.hh
--- 10.252/olena/oln/lrde/ufmt/utils.hh Fri, 04 Aug 2006 18:48:35 +0200 theo
(oln/x/8_utils.hh 1.2 644)
+++ 10.252(w)/olena/oln/lrde/ufmt/utils.hh Mon, 28 Aug 2006 14:27:46 +0200 theo
(oln/x/8_utils.hh 1.2 644)
@@ -28,8 +28,9 @@
#ifndef OLENA_LRDE_UFMT_UTILS_HH
# define OLENA_LRDE_UFMT_UTILS_HH
-# include <ntg/real/int_u.hh>
+# include <cstdlib>
# include <vector>
+# include <ntg/real/int_u.hh>
@@ -296,6 +297,36 @@
}
+
+ template <class I>
+ typename mute<I, float>::ret
+ to_float_with_noise(const abstract::image<I>& input)
+ {
+ const float max = float(RAND_MAX);
+ typename mute<I, float>::ret output(input.size());
+ oln_iter_type(I) p(input);
+ for_all(p)
+ output[p] = float(input[p]) + float(rand()) / max;
+ return output;
+ }
+
+
+ template <typename I>
+ struct rev_sort
+ {
+ typedef oln_point_type(I) point;
+ const I& f;
+
+ rev_sort(const I& f) :
+ f(f)
+ {}
+
+ bool operator()(const point& lhs, const point& rhs) const
+ {
+ return f[lhs] > f[rhs];
+ }
+ };
+
} // end of namespace oln::lrde::ufmt
Index: 10.252/olena/oln/lrde/ufmt/README
--- 10.252/olena/oln/lrde/ufmt/README Fri, 25 Aug 2006 18:19:26 +0200 levill_r
(oln/x/22_README 1.4 644)
+++ 10.252(w)/olena/oln/lrde/ufmt/README Mon, 28 Aug 2006 14:35:28 +0200 theo
(oln/x/22_README 1.4 644)
@@ -98,6 +98,10 @@
for full compressed access to root
find_root = quicker
+*** .
+no level compression
+no aux data (for full compression)
+
** further (later) optims
@@ -115,6 +119,9 @@
r1ic do not compile (ric specialized for 1D images)
+sp impled
+spx impled
+
* basic_salembier
Only in 10.252(w): olena/oln/lrde/ufmt/bin/sp_maxtree.cc
Only in 10.252(w): olena/oln/lrde/ufmt/bin/spx_maxtree.cc
Only in 10.252(w): olena/oln/lrde/ufmt/spx_maxtree.hh
Only in 10.252(w): olena/oln/lrde/ufmt/sp_maxtree.hh
Show replies by date