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 next-build-test has been updated
via 557ac2f43b73eb2fc3a49d1d34975559873fabee (commit)
via 236e8722e83acffc95360eba6b190b90519ef23d (commit)
via 0ce764d574dff94e89d7c5d1f1d0e9c010a84707 (commit)
via 8f3101526bd99273d1b71d467b044a07a8479d70 (commit)
from 63c3277770ffaa3b4e398d55abda8c5d20dc9457 (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 -----------------------------------------------------------------
557ac2f Add a new test for accu::stat:deviation.
236e872 scribo/primitive/extract/separators_nonvisible.hh: Fix warnings.
0ce764d mln/accu/stat/deviation.hh: Fix type of constructor argument.
8f31015 Remove a useless from_to overload.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 20 ++++++++++++++++
milena/mln/accu/stat/deviation.hh | 8 ++++--
milena/mln/convert/from_to.hxx | 4 ---
milena/mln/convert/impl/from_unsigned_to_value.hh | 12 +--------
milena/tests/accu/stat/Makefile.am | 5 +++-
.../qt_rgb_to_int_u.cc => accu/stat/deviation.cc} | 25 +++++++++++++------
scribo/ChangeLog | 4 +++
.../primitive/extract/separators_nonvisible.hh | 8 ++++-
8 files changed, 58 insertions(+), 28 deletions(-)
copy milena/tests/{fun/v2v/qt_rgb_to_int_u.cc => accu/stat/deviation.cc} (75%)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
---
milena/ChangeLog | 4 ++++
milena/mln/accu/stat/deviation.hh | 8 +++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f97ab68..5ecbfb8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * mln/accu/stat/deviation.hh: Fix type of constructor argument.
+
+2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Remove a useless from_to overload.
* mln/convert/from_to.hxx,
diff --git a/milena/mln/accu/stat/deviation.hh b/milena/mln/accu/stat/deviation.hh
index 1f15100..ca57f23 100644
--- a/milena/mln/accu/stat/deviation.hh
+++ b/milena/mln/accu/stat/deviation.hh
@@ -64,7 +64,9 @@ namespace mln
typedef T argument;
typedef M result;
- deviation(const T mean);
+ // Note: We may like to have an initial mean as precise as the
+ // sum type. So type S is prefered to type T here.
+ deviation(const S& mean);
/// Manipulators.
/// \{
@@ -89,7 +91,7 @@ namespace mln
// parameter since in the core of the deviation::take method,
// this accumulator takes data of type mln_sum(T).
accu::math::sum<mln_sum(T),S> sum_;
- T mean_;
+ S mean_;
};
@@ -120,7 +122,7 @@ namespace mln
template <typename T, typename S, typename M>
inline
- deviation<T,S,M>::deviation(const T mean)
+ deviation<T,S,M>::deviation(const S& mean)
{
init();
mean_ = mean;
--
1.5.6.5
---
scribo/ChangeLog | 4 +
scribo/scribo/core/document.hh | 162 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 166 insertions(+), 0 deletions(-)
create mode 100644 scribo/scribo/core/document.hh
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 4372f54..3c66038 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-02 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * scribo/core/document.hh: Introduce new document structure.
+
2010-11-15 Guillaume Lazzara <z(a)lrde.epita.fr>
* demo/viewer/Makefile.am: Remove deprecated dependencies.
diff --git a/scribo/scribo/core/document.hh b/scribo/scribo/core/document.hh
new file mode 100644
index 0000000..93d9348
--- /dev/null
+++ b/scribo/scribo/core/document.hh
@@ -0,0 +1,162 @@
+// Copyright (C) 2010 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 SCRIBO_CORE_DOCUMENT_HH
+# define SCRIBO_CORE_DOCUMENT_HH
+
+/// \file
+///
+/// \brief Describes document content.
+
+# include <mln/core/image/image2d.hh>
+# include <mln/value/rgb8.hh>
+# include <mln/io/magick/load.hh>
+
+# include <scribo/core/component_set.hh>
+# include <scribo/core/line_set.hh>
+
+namespace scribo
+{
+
+ template <typename L>
+ struct document
+ {
+ public:
+
+ document();
+ document(const char *filename);
+
+ const char * filename() const;
+
+ bool is_valid() const;
+
+ const line_set<L>& text() const;
+ void set_text(const line_set<L>& line);
+
+ const component_set<L>& elements() const;
+ void set_elements(const component_set<L>& elements);
+
+ const mln::image2d<value::rgb8>& image() const;
+
+ private:
+ void open();
+
+ const char *filename_;
+ mln::image2d<mln::value::rgb8> image_;
+
+ line_set<L> lines_;
+ component_set<L> elements_;
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ template <typename L>
+ document<L>::document()
+ {
+ }
+
+
+ template <typename L>
+ document<L>::document(const char *filename)
+ : filename_(filename)
+ {
+ open();
+ }
+
+
+ template <typename L>
+ const char *
+ document<L>::filename() const
+ {
+ return filename_;
+ }
+
+
+ template <typename L>
+ void
+ document<L>::open()
+ {
+ mln::io::magick::load(image_, filename_);
+ }
+
+
+ template <typename L>
+ bool
+ document<L>::is_valid() const
+ {
+ return image_.is_valid();
+ }
+
+
+ template <typename L>
+ const line_set<L>&
+ document<L>::text() const
+ {
+ return lines_;
+ }
+
+
+ template <typename L>
+ void
+ document<L>::set_text(const line_set<L>& line)
+ {
+ lines_ = line;
+ }
+
+
+ template <typename L>
+ const component_set<L>&
+ document<L>::elements() const
+ {
+ return elements_;
+ }
+
+
+ template <typename L>
+ void
+ document<L>::set_elements(const component_set<L>& elements)
+ {
+ elements_ = elements;
+ }
+
+
+ template <typename L>
+ const mln::image2d<value::rgb8>&
+ document<L>::image() const
+ {
+ return image_;
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+
+} // end of namespace scribo
+
+
+#endif // ! SCRIBO_CORE_DOCUMENT_HH
--
1.5.6.5