https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Take borders into account in data allocation of image2d.
* oln/core/2d/image2d.hh (image2d(unsigned, unsigned, unsigned)):
Allocate space for the border in the array.
* oln/core/2d/point2d.hh, oln/core/typedefs.hh: Add FIXMEs.
* oln/core/2d/neighb2d.hh, oln/core/2d/dpoint2d.hh,
* oln/core/internal/point_nd.hh: Aesthetic changes.
2d/dpoint2d.hh | 2 --
2d/image2d.hh | 3 ++-
2d/neighb2d.hh | 3 ++-
2d/point2d.hh | 4 +++-
internal/point_nd.hh | 3 ++-
typedefs.hh | 1 +
6 files changed, 10 insertions(+), 6 deletions(-)
Index: oln/core/2d/image2d.hh
--- oln/core/2d/image2d.hh (revision 601)
+++ oln/core/2d/image2d.hh (working copy)
@@ -85,7 +85,8 @@
: topo_(bbox2d(point2d(0, 0),
point2d(nrows-1, ncols-1)),
border),
- data_(new array_t(0, 0, nrows-1, ncols-1))
+ data_(new array_t(0 - border, 0 - border,
+ nrows - 1 + border, ncols - 1 + border))
{
}
Index: oln/core/2d/point2d.hh
--- oln/core/2d/point2d.hh (revision 601)
+++ oln/core/2d/point2d.hh (working copy)
@@ -36,7 +36,9 @@
namespace oln
{
-
+ /* FIXME: Is this the right place for these functions (on types)?
+ In particular, the function on dpoint2d should be near the
+ definition of dpoint2d, not point2d's. */
/// Specializations of functions point and dpoint :
/// \f$(n, coord) \rightarrow type\f$ for \f$n = 2\f$.
/// \{
Index: oln/core/typedefs.hh
--- oln/core/typedefs.hh (revision 601)
+++ oln/core/typedefs.hh (working copy)
@@ -172,6 +172,7 @@
| category::grid. |
`-----------------*/
+ // FIXME: Merge with dim_type?
mlc_decl_typedef(dimvalue_type);
mlc_decl_typedef(coord_type);
Index: oln/core/2d/neighb2d.hh
--- oln/core/2d/neighb2d.hh (revision 601)
+++ oln/core/2d/neighb2d.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and
+// Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
Index: oln/core/2d/dpoint2d.hh
--- oln/core/2d/dpoint2d.hh (revision 601)
+++ oln/core/2d/dpoint2d.hh (working copy)
@@ -95,8 +95,6 @@
};
-
-
} // end of namespace oln
Index: oln/core/internal/point_nd.hh
--- oln/core/internal/point_nd.hh (revision 601)
+++ oln/core/internal/point_nd.hh (working copy)
@@ -41,7 +41,8 @@
{
- /// Function "point_ : (n, coord) -> point type".
+ /// Function \f$point : (n, coord) \rightarrow point type\f$.
+
template <unsigned n, typename C>
struct point_
{