
* mln/world/kn/internal/face_dim.hh: Move... * mln/world/kn/face_dim.hh: ... here. * mln/world/kn/internal/display.hh, * mln/world/kn/is_0_face.hh, * mln/world/kn/is_0_or_1_face.hh, * mln/world/kn/is_1_face.hh, * mln/world/kn/is_2_face.hh: Update reference to face_dim. --- milena/ChangeLog | 13 +++++++++ milena/mln/world/kn/{internal => }/face_dim.hh | 35 ++++++++++------------- milena/mln/world/kn/internal/display.hh | 6 ++-- milena/mln/world/kn/is_0_face.hh | 4 +- milena/mln/world/kn/is_0_or_1_face.hh | 4 +- milena/mln/world/kn/is_1_face.hh | 4 +- milena/mln/world/kn/is_2_face.hh | 4 +- 7 files changed, 39 insertions(+), 31 deletions(-) rename milena/mln/world/kn/{internal => }/face_dim.hh (77%) diff --git a/milena/ChangeLog b/milena/ChangeLog index bc3b35c..5d5f642 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,18 @@ 2012-10-29 Guillaume Lazzara <z@lrde.epita.fr> + Move kn::internal::face_dim to kn. + + * mln/world/kn/internal/face_dim.hh: Move... + * mln/world/kn/face_dim.hh: ... here. + + * mln/world/kn/internal/display.hh, + * mln/world/kn/is_0_face.hh, + * mln/world/kn/is_0_or_1_face.hh, + * mln/world/kn/is_1_face.hh, + * mln/world/kn/is_2_face.hh: Update reference to face_dim. + +2012-10-29 Guillaume Lazzara <z@lrde.epita.fr> + Move display_enlarged to kn. * mln/world/k1/display_enlarged.hh, diff --git a/milena/mln/world/kn/internal/face_dim.hh b/milena/mln/world/kn/face_dim.hh similarity index 77% rename from milena/mln/world/kn/internal/face_dim.hh rename to milena/mln/world/kn/face_dim.hh index 105c6cc..6a6c418 100644 --- a/milena/mln/world/kn/internal/face_dim.hh +++ b/milena/mln/world/kn/face_dim.hh @@ -41,38 +41,33 @@ namespace mln namespace kn { - namespace internal - { - - /// \brief Returns the dimension of site in KN. - unsigned face_dim(const point2d& p); + /// \brief Returns the dimension of site in KN. + unsigned face_dim(const point2d& p); - /// \overload - unsigned face_dim(const mln::def::coord& row, const mln::def::coord& col); + /// \overload + unsigned face_dim(const mln::def::coord& row, const mln::def::coord& col); # ifndef MLN_INCLUDE_ONLY - // Facade + // Facade - inline - unsigned face_dim(const point2d& p) - { - return face_dim(p.row(), p.col()); - } + inline + unsigned face_dim(const point2d& p) + { + return face_dim(p.row(), p.col()); + } - inline - unsigned face_dim(const mln::def::coord& row, const mln::def::coord& col) - { - return (row % 2 == 0) + (col % 2 == 0); - } + inline + unsigned face_dim(const mln::def::coord& row, const mln::def::coord& col) + { + return (row % 2 == 0) + (col % 2 == 0); + } # endif // ! MLN_INCLUDE_ONLY - } // end of namespace mln::work::kn::internal - } // end of namespace mln::world::kn } // end of namespace mln::world diff --git a/milena/mln/world/kn/internal/display.hh b/milena/mln/world/kn/internal/display.hh index 7eb1261..efa0b59 100644 --- a/milena/mln/world/kn/internal/display.hh +++ b/milena/mln/world/kn/internal/display.hh @@ -31,7 +31,7 @@ # define MLN_WORLD_KN_INTERNAL_DISPLAY_HH # include <sstream> -# include <mln/world/kn/internal/face_dim.hh> +# include <mln/world/kn/face_dim.hh> # include <mln/world/k2/is_primary_2_face.hh> # include <mln/world/kn/is_1_face_horizontal.hh> # include <mln/world/kn/is_1_face_vertical.hh> @@ -264,7 +264,7 @@ namespace mln void display_in_K1<Tree>::print_p(const point2d& p) { - switch (internal::face_dim(p)) + switch (face_dim(p)) { case 0: ostr << " +"; @@ -292,7 +292,7 @@ namespace mln void display_in_K2<Tree>::print_p(const point2d& p) { - switch (internal::face_dim(p)) + switch (face_dim(p)) { case 0: ostr << " +"; diff --git a/milena/mln/world/kn/is_0_face.hh b/milena/mln/world/kn/is_0_face.hh index c1124ac..a0ad80f 100644 --- a/milena/mln/world/kn/is_0_face.hh +++ b/milena/mln/world/kn/is_0_face.hh @@ -31,7 +31,7 @@ # define MLN_WORLD_KN_IS_0_FACE_HH # include <mln/core/alias/point2d.hh> -# include <mln/world/kn/internal/face_dim.hh> +# include <mln/world/kn/face_dim.hh> namespace mln @@ -66,7 +66,7 @@ namespace mln bool is_0_face(const mln::def::coord& row, const mln::def::coord& col) { - return internal::face_dim(row, col) == 0; + return face_dim(row, col) == 0; } # endif // ! MLN_INCLUDE_ONLY diff --git a/milena/mln/world/kn/is_0_or_1_face.hh b/milena/mln/world/kn/is_0_or_1_face.hh index 6ddbd91..b05f279 100644 --- a/milena/mln/world/kn/is_0_or_1_face.hh +++ b/milena/mln/world/kn/is_0_or_1_face.hh @@ -31,7 +31,7 @@ # define MLN_WORLD_KN_IS_0_OR_1_FACE_HH # include <mln/core/alias/point2d.hh> -# include <mln/world/kn/internal/face_dim.hh> +# include <mln/world/kn/face_dim.hh> namespace mln @@ -55,7 +55,7 @@ namespace mln inline bool is_0_or_1_face(const point2d& p) { - unsigned dim = internal::face_dim(p); + unsigned dim = face_dim(p); return dim == 0 || dim == 1; } diff --git a/milena/mln/world/kn/is_1_face.hh b/milena/mln/world/kn/is_1_face.hh index f3bcdfb..bcd1742 100644 --- a/milena/mln/world/kn/is_1_face.hh +++ b/milena/mln/world/kn/is_1_face.hh @@ -31,7 +31,7 @@ # define MLN_WORLD_KN_IS_1_FACE_HH # include <mln/core/alias/point2d.hh> -# include <mln/world/kn/internal/face_dim.hh> +# include <mln/world/kn/face_dim.hh> namespace mln @@ -68,7 +68,7 @@ namespace mln bool is_1_face(const mln::def::coord& row, const mln::def::coord& col) { - return internal::face_dim(row, col) == 1; + return face_dim(row, col) == 1; } diff --git a/milena/mln/world/kn/is_2_face.hh b/milena/mln/world/kn/is_2_face.hh index e0a658c..2805b48 100644 --- a/milena/mln/world/kn/is_2_face.hh +++ b/milena/mln/world/kn/is_2_face.hh @@ -31,7 +31,7 @@ # define MLN_WORLD_KN_IS_2_FACE_HH # include <mln/core/alias/point2d.hh> -# include <mln/world/kn/internal/face_dim.hh> +# include <mln/world/kn/face_dim.hh> namespace mln @@ -66,7 +66,7 @@ namespace mln bool is_2_face(const mln::def::coord& row, const mln::def::coord& col) { - return internal::face_dim(row, col) == 2; + return face_dim(row, col) == 2; } # endif // ! MLN_INCLUDE_ONLY -- 1.7.2.5