Commit d31ac943 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Small fixes.

	* mln/accu/count_labels.hh,
	* mln/labeling/relabel.hh: Disable preconditions related to
	Symbolic value types.

	* mln/data/compare.hh: Pass variable with exact type.

	* mln/geom/max_sli.hh,
	* mln/geom/min_sli.hh: Use geom::bbox.

	* mln/io/plot/save.hh: Rename template parameter.

	* mln/util/set.hh: Reindent header.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4683 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 4f941496
2009-10-28 Guillaume Lazzara <z@lrde.epita.fr>
Small fixes.
* mln/accu/count_labels.hh,
* mln/labeling/relabel.hh: Disable preconditions related to
Symbolic value types.
* mln/data/compare.hh: Pass variable with exact type.
* mln/geom/max_sli.hh,
* mln/geom/min_sli.hh: Use geom::bbox.
* mln/io/plot/save.hh: Rename template parameter.
* mln/util/set.hh: Reindent header.
2009-10-28 Guillaume Lazzara <z@lrde.epita.fr>
 
Add data::wrap.
......@@ -50,8 +50,8 @@ namespace mln
//
template <typename L>
struct count_labels
: public mln::accu::internal::base< unsigned , count_labels<L> >,
mlc_is_a(L, mln::value::Symbolic)::check_t
: public mln::accu::internal::base< unsigned , count_labels<L> >
// mlc_is_a(L, mln::value::Symbolic)::check_t
{
typedef L argument;
......
......@@ -95,7 +95,7 @@ namespace mln
mln_precondition(lhs.domain() == rhs.domain());
typedef fun::vv2b::eq<mln_value(L), mln_value(R)> F;
bool res = test::predicate(lhs_, rhs_, F());
bool res = test::predicate(lhs, rhs, F());
trace::exiting("data::compare (==)");
return res;
......
......@@ -32,6 +32,7 @@
# include <mln/core/concept/image.hh>
# include <mln/geom/bbox.hh>
namespace mln
{
......@@ -53,7 +54,7 @@ namespace mln
trace::entering("mln::geom::max_sli");
mln_precondition(exact(ima).is_valid());
mln_deduce(I, site, coord) maxsli = exact(ima).bbox().pmax().sli();
mln_deduce(I, site, coord) maxsli = geom::bbox(ima).pmax().sli();
trace::exiting("mln::geom::max_sli");
return maxsli;
......
......@@ -32,6 +32,7 @@
# include <mln/core/concept/image.hh>
# include <mln/geom/bbox.hh>
namespace mln
{
......@@ -53,7 +54,7 @@ namespace mln
trace::entering("mln::geom::min_sli");
mln_precondition(exact(ima).is_valid());
mln_deduce(I, site, coord) minsli = exact(ima).bbox().pmin().sli();
mln_deduce(I, site, coord) minsli = geom::bbox(ima).pmin().sli();
trace::exiting("mln::geom::min_sli");
return minsli;
......
......@@ -57,8 +57,8 @@ namespace mln
\param[out] filename The output file.
\param[in] start_value The start index value of the plot
(optional). */
template <typename I>
void save(util::array<I>& arr,
template <typename T>
void save(util::array<T>& arr,
const std::string& filename,
int start_value = 0);
......@@ -82,9 +82,9 @@ namespace mln
trace::exiting("mln::io::plot::save");
}
template <typename I>
template <typename T>
inline
void save(const util::array<I>& arr, const std::string& filename,
void save(const util::array<T>& arr, const std::string& filename,
int start_value = 0)
{
trace::entering("mln::io::plot::save");
......
......@@ -120,7 +120,7 @@ namespace mln
mln_value(I)& new_nlabels)
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
// mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(label).is_valid());
(void) label;
(void) new_nlabels;
......@@ -134,7 +134,7 @@ namespace mln
const Function<F>& f)
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
// mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(label).is_valid());
(void) label;
(void) nlabels;
......@@ -149,7 +149,7 @@ namespace mln
const Function<F>& f)
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
// mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(label).is_valid());
(void) label;
(void) nlabels;
......@@ -164,7 +164,7 @@ namespace mln
const Function<F>& f)
{
// FIXME: we may want to check that it is exactly a label.
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
// mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(label).is_valid());
(void) label;
(void) nlabels;
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment