Commit 5f10622a authored by Roland Levillain's avatar Roland Levillain
Browse files

Improve mln::topo::is_simple_2d_t.

	* mln/topo/is_simple_2d.hh
	(mln::topo::is_simple_2d_t<N>::nb_connectivity2d):
	(mln::topo::is_simple_2d_t<N>::nb_connectivity2d__):
	Use a more reliable method to identify the neighborhood.
	* mln/topo/is_simple_point2d.hh: Typo in comment.
parent 8a48d807
2013-08-28 Roland Levillain <roland@lrde.epita.fr>
Improve mln::topo::is_simple_2d_t.
* mln/topo/is_simple_2d.hh
(mln::topo::is_simple_2d_t<N>::nb_connectivity2d):
(mln::topo::is_simple_2d_t<N>::nb_connectivity2d__):
Use a more reliable method to identify the neighborhood.
* mln/topo/is_simple_point2d.hh: Typo in comment.
2013-08-28 Roland Levillain <roland@lrde.epita.fr>
 
Reintroduce is_simple_2d and connectivity_number_2d into mln::topo.
......@@ -241,18 +241,15 @@ namespace mln
res = res | 1;
}
switch (nbh.size())
{
case 4: // C4
return internal::connectivity_number_c4[res];
case 8: // C8
return internal::connectivity_number_c8[res];
default:
mln_assertion(0);
}
unsigned number;
if (nbh == c4())
number = internal::connectivity_number_c4[res];
else if (nbh == c8())
number = internal::connectivity_number_c8[res];
else
abort();
return 0;
return number;
}
......@@ -277,18 +274,15 @@ namespace mln
res = res | 1;
}
switch (nbh.size())
{
case 4: // C4
return internal::connectivity_number_c4[res];
case 8: // C8
return internal::connectivity_number_c8[res];
default:
mln_assertion(0);
}
unsigned number;
if (nbh == c4())
number = internal::connectivity_number_c4[res];
else if (nbh == c8())
number = internal::connectivity_number_c8[res];
else
abort();
return 0;
return number;
}
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -43,7 +43,7 @@ namespace mln
{
/** \brief A predicate for the simplicity of an mln::point2d based
on based on the mask-based criterion mln::topo::is_simple_2d.
on the mask-based criterion mln::topo::is_simple_2d.
This functor acts as an adapter, since mln::topo::is_simple_2d
does not fit (yet) in the canvas of
......
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