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