This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/khalimsky has been updated
via ce9a6a4d73daaddac6be6d993cb2c2da1db11d42 (commit)
via 26f70522325508f0c54ba23806b7a842aece7911 (commit)
via dc08d9b5b295a70f0da2bd6c954c99c4799ceb6a (commit)
via 8a4190ed21cbf4d337ea80d1edf077acec8431cb (commit)
via 9726f7e04c8fee068a497276259f15cce9ff4522 (commit)
from f550cfab304c3851c40b188029790114f74c17de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
ce9a6a4 mln/world/kn/debug/println.hh: Handle images based on any site sets.
26f7052 Add preconditions.
dc08d9b Move files to proper directories.
8a4190e Revamp Code.
9726f7e Make use of safe_cast.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 52 ++++++
milena/mln/accu/stat/median_few.hh | 147 -----------------
milena/mln/world/k1/fill_0_from_1_faces.hh | 26 ++--
milena/mln/world/k1/fill_1_from_2_faces.hh | 31 ++--
milena/mln/world/k1/immerse_with.hh | 3 +-
milena/mln/world/k1/un_immerse.hh | 4 +-
.../k2/fill_non_primary_from_primary_2_faces.hh | 63 ++++----
milena/mln/world/kn/accu/max_interval.hh | 12 +-
milena/mln/world/kn/accu/median_few.hh | 152 ++++++++++++++++++
milena/mln/world/kn/accu/min_interval.hh | 12 +-
milena/mln/world/kn/debug/println.hh | 2 +-
milena/mln/world/kn/display_enlarged.hh | 13 +-
.../mln/world/kn/fill_0_1_faces_internal_border.hh | 2 +-
milena/mln/world/kn/fill_0_from_1_faces.hh | 29 ++--
milena/mln/world/kn/fill_0_from_2_faces.hh | 26 ++--
milena/mln/world/kn/fill_1_from_2_faces.hh | 26 ++--
milena/mln/world/kn/fill_1_from_aux_2_faces.hh | 39 +++--
milena/mln/world/kn/fill_2_from_1_faces.hh | 23 ++--
milena/mln/world/kn/hqueue.hh | 160 +++++++++++++++++++
.../kn/internal/fill_primary_2_faces_from_input.hh | 13 +-
milena/mln/world/kn/internal/hqueue.hh | 165 --------------------
milena/mln/world/kn/safe_cast.hh | 64 +++++++-
milena/mln/world/kn/un_immerse.hh | 6 +-
23 files changed, 608 insertions(+), 462 deletions(-)
delete mode 100644 milena/mln/accu/stat/median_few.hh
create mode 100644 milena/mln/world/kn/accu/median_few.hh
create mode 100644 milena/mln/world/kn/hqueue.hh
delete mode 100644 milena/mln/world/kn/internal/hqueue.hh
hooks/post-receive
--
Olena, a generic and efficient image processing platform
* mln/accu/stat/median_few.hh,
* mln/world/kn/internal/hqueue.hh: Move...
* mln/world/kn/accu/median_few.hh,
* mln/world/kn/hqueue.hh: ... here.
---
milena/ChangeLog | 10 ++
milena/mln/accu/stat/median_few.hh | 147 ----------------------------
milena/mln/world/kn/accu/median_few.hh | 152 +++++++++++++++++++++++++++++
milena/mln/world/kn/hqueue.hh | 160 +++++++++++++++++++++++++++++++
milena/mln/world/kn/internal/hqueue.hh | 165 --------------------------------
5 files changed, 322 insertions(+), 312 deletions(-)
delete mode 100644 milena/mln/accu/stat/median_few.hh
create mode 100644 milena/mln/world/kn/accu/median_few.hh
create mode 100644 milena/mln/world/kn/hqueue.hh
delete mode 100644 milena/mln/world/kn/internal/hqueue.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index addbfff..b3bc9f7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2012-11-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Move files to proper directories.
+
+ * mln/accu/stat/median_few.hh,
+ * mln/world/kn/internal/hqueue.hh: Move...
+
+ * mln/world/kn/accu/median_few.hh,
+ * mln/world/kn/hqueue.hh: ... here.
+
+2012-11-01 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Revamp Code.
* mln/world/k1/immerse_with.hh,
diff --git a/milena/mln/accu/stat/median_few.hh b/milena/mln/accu/stat/median_few.hh
deleted file mode 100644
index dd3c16f..0000000
--- a/milena/mln/accu/stat/median_few.hh
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project 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_ACCU_STAT_MEDIAN_FEW_HH
-# define MLN_ACCU_STAT_MEDIAN_FEW_HH
-
-/// \file
-///
-/// \brief Define a median accumulator class to be used with few
-/// values.
-
-# include <iostream>
-# include <vector>
-# include <algorithm>
-
-# include <mln/trait/routine/mean.hh>
-# include <mln/accu/internal/base.hh>
-
-
-namespace mln
-{
-
- namespace accu
- {
-
- namespace stat
- {
-
- /// \brief Define a median accumulator class to be used with few
- /// values.
- template <typename T,
- typename R = mln_trait_routine_mean(2,T) >
- struct median_few
- : public mln::accu::internal::base< R, median_few<T,R> >
- {
- typedef T argument;
- typedef R result;
-
- median_few();
-
- void reserve(unsigned n);
- void init();
-
- void take(const argument& v);
- void take(const median_few<T,R>& other);
- // nota bene: no possible untake with this accumulator
-
- result to_result() const;
-
- bool is_valid() const;
-
- protected:
-
- mutable std::vector<argument> v_;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename T, typename R>
- median_few<T,R>::median_few()
- {
- init();
- }
-
- template <typename T, typename R>
- void
- median_few<T,R>::reserve(unsigned n)
- {
- v_.reserve(n);
- }
-
- template <typename T, typename R>
- void
- median_few<T,R>::init()
- {
- v_.clear();
- }
-
- template <typename T, typename R>
- void
- median_few<T,R>::take(const argument& v)
- {
- v_.push_back(v);
- }
-
- template <typename T, typename R>
- void
- median_few<T,R>::take(const median_few<T,R>& other)
- {
- v_.insert(v_.end(), other.v_.begin(), other.v_.end());
- }
-
-
- template <typename T, typename R>
- typename median_few<T,R>::result
- median_few<T,R>::to_result() const
- {
- mln_precondition(is_valid());
- std::sort(v_.begin(), v_.end());
- // indices 0 1 2 => size = 3 => mid = 1
- // 0 1 => size = 2 => mid = 0
- unsigned mid = (v_.size() - 1) / 2;
- if (v_.size() % 2)
- return v_[mid];
- else
- return (R(v_[mid]) + R(v_[mid + 1])) / 2;
- }
-
- template <typename T, typename R>
- bool
- median_few<T,R>::is_valid() const
- {
- return v_.size() != 0;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::accu::stat
-
- } // end of namespace mln::accu
-
-} // end of namespace mln
-
-#endif // ! MLN_ACCU_STAT_MEDIAN_FEW_HH
diff --git a/milena/mln/world/kn/accu/median_few.hh b/milena/mln/world/kn/accu/median_few.hh
new file mode 100644
index 0000000..31dfd68
--- /dev/null
+++ b/milena/mln/world/kn/accu/median_few.hh
@@ -0,0 +1,152 @@
+// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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_WORLD_KN_ACCU_MEDIAN_FEW_HH
+# define MLN_WORLD_KN_ACCU_MEDIAN_FEW_HH
+
+/// \file
+///
+/// \brief Define a median accumulator class to be used with few
+/// values.
+
+# include <iostream>
+# include <vector>
+# include <algorithm>
+
+# include <mln/trait/routine/mean.hh>
+# include <mln/accu/internal/base.hh>
+
+
+namespace mln
+{
+
+ namespace world
+ {
+
+ namespace kn
+ {
+
+ namespace accu
+ {
+
+ /// \brief Define a median accumulator class to be used with few
+ /// values.
+ template <typename T,
+ typename R = mln_trait_routine_mean(2,T) >
+ struct median_few
+ : public mln::accu::internal::base< R, median_few<T,R> >
+ {
+ typedef T argument;
+ typedef R result;
+
+ median_few();
+
+ void reserve(unsigned n);
+ void init();
+
+ void take(const argument& v);
+ void take(const median_few<T,R>& other);
+ // nota bene: no possible untake with this accumulator
+
+ result to_result() const;
+
+ bool is_valid() const;
+
+ protected:
+
+ mutable std::vector<argument> v_;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename T, typename R>
+ median_few<T,R>::median_few()
+ {
+ init();
+ }
+
+ template <typename T, typename R>
+ void
+ median_few<T,R>::reserve(unsigned n)
+ {
+ v_.reserve(n);
+ }
+
+ template <typename T, typename R>
+ void
+ median_few<T,R>::init()
+ {
+ v_.clear();
+ }
+
+ template <typename T, typename R>
+ void
+ median_few<T,R>::take(const argument& v)
+ {
+ v_.push_back(v);
+ }
+
+ template <typename T, typename R>
+ void
+ median_few<T,R>::take(const median_few<T,R>& other)
+ {
+ v_.insert(v_.end(), other.v_.begin(), other.v_.end());
+ }
+
+
+ template <typename T, typename R>
+ typename median_few<T,R>::result
+ median_few<T,R>::to_result() const
+ {
+ mln_precondition(is_valid());
+ std::sort(v_.begin(), v_.end());
+ // indices 0 1 2 => size = 3 => mid = 1
+ // 0 1 => size = 2 => mid = 0
+ unsigned mid = (v_.size() - 1) / 2;
+ if (v_.size() % 2)
+ return v_[mid];
+ else
+ return (R(v_[mid]) + R(v_[mid + 1])) / 2;
+ }
+
+ template <typename T, typename R>
+ bool
+ median_few<T,R>::is_valid() const
+ {
+ return v_.size() != 0;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::world::kn::accu
+
+ } // end of namespace mln::world::kn
+
+ } // end of namespace mln::world
+
+} // end of namespace mln
+
+#endif // ! MLN_WORLD_KN_ACCU_MEDIAN_FEW_HH
diff --git a/milena/mln/world/kn/hqueue.hh b/milena/mln/world/kn/hqueue.hh
new file mode 100644
index 0000000..dc2b365
--- /dev/null
+++ b/milena/mln/world/kn/hqueue.hh
@@ -0,0 +1,160 @@
+// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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_WORLD_KN_HQUEUE_HH
+# define MLN_WORLD_KN_HQUEUE_HH
+
+/// \file
+/// \brief Class for hierarchical queues.
+
+
+# include <iostream>
+# include <vector>
+# include <mln/world/kn/internal/queue.hh>
+
+namespace mln
+{
+
+ namespace world
+ {
+
+ namespace kn
+ {
+
+ /// \internal
+ /// \brief Class for hierarchical queues.
+ template <typename T, typename P>
+ class hqueue
+ {
+ public:
+ hqueue();
+ hqueue(const value::interval<P>& inter);
+ hqueue(const P& first, const P& last);
+
+ unsigned nelements() const;
+
+ bool is_empty() const;
+ bool is_empty_at(const P& bucket) const;
+
+ void push(const T& t, const P& bucket);
+ T pop(const P& bucket);
+
+ // FIXME: add some reserve strategies...
+
+ private:
+ std::vector< internal::queue_<T> > v_;
+ value::interval<P> inter_;
+ unsigned n_;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename T, typename P>
+ hqueue<T,P>::hqueue()
+ {
+ n_ = 0;
+ }
+
+ template <typename T, typename P>
+ hqueue<T,P>::hqueue(const value::interval<P>& inter)
+ {
+ v_.resize(inter.nelements());
+ inter_ = inter;
+ n_ = 0;
+ }
+
+ template <typename T, typename P>
+ hqueue<T,P>::hqueue(const P& first, const P& last)
+ {
+ v_.resize(inter_.nelements());
+ inter_ = value::interval<P>(first, last);
+ n_ = 0;
+ }
+
+ template <typename T, typename P>
+ unsigned
+ hqueue<T,P>::nelements() const
+ {
+ return n_;
+ }
+
+ template <typename T, typename P>
+ bool
+ hqueue<T,P>::is_empty_at(const P& bucket) const
+ {
+ unsigned i = inter_.index_of(bucket);
+ mln_precondition(i < v_.size());
+ return v_[i].is_empty();
+ }
+
+ template <typename T, typename P>
+ bool
+ hqueue<T,P>::is_empty() const
+ {
+ return n_ == 0;
+ }
+
+ template <typename T, typename P>
+ void
+ hqueue<T,P>::push(const T& t, const P& bucket)
+ {
+ unsigned i = inter_.index_of(bucket);
+ mln_precondition(i < v_.size());
+ v_[i].push(t);
+ }
+
+ template <typename T, typename P>
+ T
+ hqueue<T,P>::pop(const P& bucket)
+ {
+ mln_precondition(! is_empty_at(bucket));
+ unsigned i = inter_.index_of(bucket);
+ mln_precondition(i < v_.size());
+ return v_[i].pop();
+ }
+
+ // template <typename T, typename P>
+ // std::ostream&
+ // operator<<(std::ostream& ostr, const hqueue<T,P>& q)
+ // {
+ // unsigned n = q.size();
+ // ostr << '(';
+ // for (unsigned i = 0; i < n; ++i)
+ // ostr << q.v_[i] << (i + 1 == n ? "" : ", ");
+ // return ostr << ')';
+ // }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::world::kn
+
+ } // end of namespace mln::world
+
+} // end of namespace mln
+
+#endif // ! MLN_WORLD_KN_HQUEUE_HH
diff --git a/milena/mln/world/kn/internal/hqueue.hh b/milena/mln/world/kn/internal/hqueue.hh
deleted file mode 100644
index fe29376..0000000
--- a/milena/mln/world/kn/internal/hqueue.hh
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project 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_WORLD_KN_INTERNAL_HQUEUE_HH
-# define MLN_WORLD_KN_INTERNAL_HQUEUE_HH
-
-/// \file
-/// \brief Class for hierarchical queues.
-
-
-# include <iostream>
-# include <vector>
-# include <mln/world/kn/internal/queue.hh>
-
-namespace mln
-{
-
- namespace world
- {
-
- namespace kn
- {
-
- namespace internal
- {
-
- /// \internal
- /// \brief Class for hierarchical queues.
- template <typename T, typename P>
- class hqueue
- {
- public:
- hqueue();
- hqueue(const value::interval<P>& inter);
- hqueue(const P& first, const P& last);
-
- unsigned nelements() const;
-
- bool is_empty() const;
- bool is_empty_at(const P& bucket) const;
-
- void push(const T& t, const P& bucket);
- T pop(const P& bucket);
-
- // FIXME: add some reserve strategies...
-
- private:
- std::vector< internal::queue_<T> > v_;
- value::interval<P> inter_;
- unsigned n_;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename T, typename P>
- hqueue<T,P>::hqueue()
- {
- n_ = 0;
- }
-
- template <typename T, typename P>
- hqueue<T,P>::hqueue(const value::interval<P>& inter)
- {
- v_.resize(inter.nelements());
- inter_ = inter;
- n_ = 0;
- }
-
- template <typename T, typename P>
- hqueue<T,P>::hqueue(const P& first, const P& last)
- {
- v_.resize(inter_.nelements());
- inter_ = value::interval<P>(first, last);
- n_ = 0;
- }
-
- template <typename T, typename P>
- unsigned
- hqueue<T,P>::nelements() const
- {
- return n_;
- }
-
- template <typename T, typename P>
- bool
- hqueue<T,P>::is_empty_at(const P& bucket) const
- {
- unsigned i = inter_.index_of(bucket);
- mln_precondition(i < v_.size());
- return v_[i].is_empty();
- }
-
- template <typename T, typename P>
- bool
- hqueue<T,P>::is_empty() const
- {
- return n_ == 0;
- }
-
- template <typename T, typename P>
- void
- hqueue<T,P>::push(const T& t, const P& bucket)
- {
- unsigned i = inter_.index_of(bucket);
- mln_precondition(i < v_.size());
- v_[i].push(t);
- }
-
- template <typename T, typename P>
- T
- hqueue<T,P>::pop(const P& bucket)
- {
- mln_precondition(! is_empty_at(bucket));
- unsigned i = inter_.index_of(bucket);
- mln_precondition(i < v_.size());
- return v_[i].pop();
- }
-
- // template <typename T, typename P>
- // std::ostream&
- // operator<<(std::ostream& ostr, const hqueue<T,P>& q)
- // {
- // unsigned n = q.size();
- // ostr << '(';
- // for (unsigned i = 0; i < n; ++i)
- // ostr << q.v_[i] << (i + 1 == n ? "" : ", ");
- // return ostr << ')';
- // }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::world::kn::internal
-
- } // end of namespace mln::world::kn
-
- } // end of namespace mln::world
-
-} // end of namespace mln
-
-#endif // ! MLN_WORLD_KN_INTERNAL_HQUEUE_HH
--
1.7.2.5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/khalimsky has been updated
via f550cfab304c3851c40b188029790114f74c17de (commit)
from 4821f6f79b7795c3e30cf1bf20669d6160bec480 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
f550cfa mln/world/kn/display_enlarged.hh: Fix.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 4 ++++
milena/mln/world/kn/display_enlarged.hh | 30 ++++++++++++++++--------------
2 files changed, 20 insertions(+), 14 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform