# HG changeset patch # User deba # Date 1158263909 0 # Node ID 4a10a45d55f6f9e3d75b32a8738db1fe58caa3dc # Parent 1e45cdeea3ccbdd5d2dbd9e60ee78f58c97016fe Doc fix diff -r 1e45cdeea3cc -r 4a10a45d55f6 lemon/dim2.h --- a/lemon/dim2.h Thu Sep 14 19:11:24 2006 +0000 +++ b/lemon/dim2.h Thu Sep 14 19:58:29 2006 +0000 @@ -73,13 +73,22 @@ ///Construct an instance from coordinates Point(T a, T b) : x(a), y(b) { } - ///Size of vector + ///The dimension of the vector. + + ///This class give back always 2. + /// int size() const { return 2; } ///Subscripting operator + + ///\c p[0] is \c p.x and \c p[1] is \c p.y + /// T& operator[](int idx) { return idx == 0 ? x : y; } ///Const subscripting operator + + ///\c p[0] is \c p.x and \c p[1] is \c p.y + /// const T& operator[](int idx) const { return idx == 0 ? x : y; } ///Conversion constructor