[Lemon-commits] [lemon_svn] deba: r2947 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 21:51:25 CET 2006
Author: deba
Date: Thu Sep 14 21:58:29 2006
New Revision: 2947
Modified:
hugo/trunk/lemon/dim2.h
Log:
Doc fix
Modified: hugo/trunk/lemon/dim2.h
==============================================================================
--- hugo/trunk/lemon/dim2.h (original)
+++ hugo/trunk/lemon/dim2.h Thu Sep 14 21:58:29 2006
@@ -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
More information about the Lemon-commits
mailing list