lemon/dim2.h
 changeset 49 9a556af88710 parent 42 3a98515e9bc3 child 209 765619b7cbb2
     1.1 --- a/lemon/dim2.h	Mon Jan 07 19:44:18 2008 +0100
1.2 +++ b/lemon/dim2.h	Tue Jan 08 02:53:42 2008 +0100
1.3 @@ -27,8 +27,7 @@
1.4  ///\brief A simple two dimensional vector and a bounding box implementation
1.5  ///
1.6  /// The class \ref lemon::dim2::Point "dim2::Point" implements
1.7 -///a two dimensional vector with the usual
1.8 -/// operations.
1.9 +/// a two dimensional vector with the usual operations.
1.10  ///
1.11  /// The class \ref lemon::dim2::BoundingBox "dim2::BoundingBox"
1.12  /// can be used to determine
1.13 @@ -49,9 +48,7 @@
1.14    /// A simple two dimensional vector (plainvector) implementation
1.15
1.16    /// A simple two dimensional vector (plainvector) implementation
1.17 -  ///with the usual vector
1.18 -  /// operators.
1.19 -  ///
1.20 +  /// with the usual vector operations.
1.21    template<typename T>
1.22      class Point {
1.23
1.24 @@ -70,7 +67,7 @@
1.25        ///Construct an instance from coordinates
1.26        Point(T a, T b) : x(a), y(b) { }
1.27
1.28 -      ///The dimension of the vector.
1.29 +      ///Returns the dimension of the vector (i.e. returns 2).
1.30
1.31        ///The dimension of the vector.
1.32        ///This function always returns 2.
1.33 @@ -96,14 +93,14 @@
1.34          return x*x+y*y;
1.35        }
1.36
1.37 -      ///Increment the left hand side by u
1.38 +      ///Increment the left hand side by \c u
1.39        Point<T>& operator +=(const Point<T>& u) {
1.40          x += u.x;
1.41          y += u.y;
1.42          return *this;
1.43        }
1.44
1.45 -      ///Decrement the left hand side by u
1.46 +      ///Decrement the left hand side by \c u
1.47        Point<T>& operator -=(const Point<T>& u) {
1.48          x -= u.x;
1.49          y -= u.y;
1.50 @@ -315,6 +312,7 @@
1.51        ///Return \c true if the bounding box is empty (i.e. return \c false
1.52        ///if at least one point was added to the box or the coordinates of
1.53        ///the box were set).
1.54 +      ///
1.55        ///The coordinates of an empty bounding box are not defined.
1.56        bool empty() const {
1.57          return _empty;
1.58 @@ -325,66 +323,66 @@
1.59          _empty=1;
1.60        }
1.61
1.62 -      ///Give back the bottom left corner
1.63 +      ///Give back the bottom left corner of the box
1.64
1.65 -      ///Give back the bottom left corner.
1.66 +      ///Give back the bottom left corner of the box.
1.67        ///If the bounding box is empty, then the return value is not defined.
1.68        Point<T> bottomLeft() const {
1.69          return bottom_left;
1.70        }
1.71
1.72 -      ///Set the bottom left corner
1.73 +      ///Set the bottom left corner of the box
1.74
1.75 -      ///Set the bottom left corner.
1.76 +      ///Set the bottom left corner of the box.
1.77        ///It should only be used for non-empty box.
1.78        void bottomLeft(Point<T> p) {
1.79  	bottom_left = p;
1.80        }
1.81
1.82 -      ///Give back the top right corner
1.83 +      ///Give back the top right corner of the box
1.84
1.85 -      ///Give back the top right corner.
1.86 +      ///Give back the top right corner of the box.
1.87        ///If the bounding box is empty, then the return value is not defined.
1.88        Point<T> topRight() const {
1.90        }
1.91
1.92 -      ///Set the top right corner
1.93 +      ///Set the top right corner of the box
1.94
1.95 -      ///Set the top right corner.
1.96 +      ///Set the top right corner of the box.
1.97        ///It should only be used for non-empty box.
1.98        void topRight(Point<T> p) {
1.99  	top_right = p;
1.100        }
1.101
1.102 -      ///Give back the bottom right corner
1.103 +      ///Give back the bottom right corner of the box
1.104
1.105 -      ///Give back the bottom right corner.
1.106 +      ///Give back the bottom right corner of the box.
1.107        ///If the bounding box is empty, then the return value is not defined.
1.108        Point<T> bottomRight() const {
1.109          return Point<T>(top_right.x,bottom_left.y);
1.110        }
1.111
1.112 -      ///Set the bottom right corner
1.113 +      ///Set the bottom right corner of the box
1.114
1.115 -      ///Set the bottom right corner.
1.116 +      ///Set the bottom right corner of the box.
1.117        ///It should only be used for non-empty box.
1.118        void bottomRight(Point<T> p) {
1.119  	top_right.x = p.x;
1.120  	bottom_left.y = p.y;
1.121        }
1.122
1.123 -      ///Give back the top left corner
1.124 +      ///Give back the top left corner of the box
1.125
1.126 -      ///Give back the top left corner.
1.127 +      ///Give back the top left corner of the box.
1.128        ///If the bounding box is empty, then the return value is not defined.
1.129        Point<T> topLeft() const {
1.130          return Point<T>(bottom_left.x,top_right.y);
1.131        }
1.132
1.133 -      ///Set the top left corner
1.134 +      ///Set the top left corner of the box
1.135
1.136 -      ///Set the top left corner.
1.137 +      ///Set the top left corner of the box.
1.138        ///It should only be used for non-empty box.
1.139        void topLeft(Point<T> p) {
1.140  	top_right.y = p.y;
1.141 @@ -533,10 +531,10 @@
1.142      };//class Boundingbox
1.143
1.144
1.145 -  ///Map of x-coordinates of a Point map
1.146 +  ///Map of x-coordinates of a \ref Point "Point"-map
1.147
1.148    ///\ingroup maps
1.149 -  ///Map of x-coordinates of a \ref dim2::Point "Point"-map.
1.150 +  ///Map of x-coordinates of a \ref Point "Point"-map.
1.151    ///
1.152    template<class M>
1.153    class XMap
1.154 @@ -570,7 +568,7 @@
1.155      return XMap<M>(m);
1.156    }
1.157
1.158 -  ///Constant (read only) version of XMap
1.159 +  ///Constant (read only) version of \ref XMap
1.160
1.161    ///\ingroup maps
1.162    ///Constant (read only) version of \ref XMap
1.163 @@ -600,7 +598,7 @@
1.164      return ConstXMap<M>(m);
1.165    }
1.166
1.167 -  ///Map of y-coordinates of a Point map
1.168 +  ///Map of y-coordinates of a \ref Point "Point"-map
1.169
1.170    ///\ingroup maps
1.171    ///Map of y-coordinates of a \ref Point "Point"-map.
1.172 @@ -637,7 +635,7 @@
1.173      return YMap<M>(m);
1.174    }
1.175
1.176 -  ///Constant (read only) version of YMap
1.177 +  ///Constant (read only) version of \ref YMap
1.178
1.179    ///\ingroup maps
1.180    ///Constant (read only) version of \ref YMap
1.181 @@ -668,13 +666,12 @@
1.182    }
1.183
1.184
1.185 -    ///\brief Map of the normSquare()
1.186 -    ///of a Point map
1.187 -    ///
1.188 -    ///Map of the \ref Point::normSquare() "normSquare()"
1.189 -    ///of a \ref Point "Point"-map.
1.190 -    ///\ingroup maps
1.191 -    ///
1.192 +  ///\brief Map of the \ref Point::normSquare() "normSquare()"
1.193 +  ///of a \ref Point "Point"-map
1.194 +  ///
1.195 +  ///Map of the \ref Point::normSquare() "normSquare()"
1.196 +  ///of a \ref Point "Point"-map.
1.197 +  ///\ingroup maps
1.198    template<class M>
1.199    class NormSquareMap
1.200    {