1.1 --- a/lemon/dim2.h Thu Sep 07 14:16:47 2006 +0000
1.2 +++ b/lemon/dim2.h Fri Sep 08 08:55:07 2006 +0000
1.3 @@ -73,6 +73,14 @@
1.4 ///Construct an instance from coordinates
1.5 Point(T a, T b) : x(a), y(b) { }
1.6
1.7 + ///Size of vector
1.8 + int size() const { return 2; }
1.9 +
1.10 + ///Subscripting operator
1.11 + T& operator[](int idx) { return idx == 0 ? x : y; }
1.12 +
1.13 + ///Const subscripting operator
1.14 + const T& operator[](int idx) const { return idx == 0 ? x : y; }
1.15
1.16 ///Conversion constructor
1.17 template<class TT> Point(const Point<TT> &p) : x(p.x), y(p.y) {}
1.18 @@ -163,7 +171,7 @@
1.19 ///Return an Point
1.20 ///\relates Point
1.21 template <typename T>
1.22 - inline Point<T> make_Point(const T& x, const T& y) {
1.23 + inline Point<T> makePoint(const T& x, const T& y) {
1.24 return Point<T>(x, y);
1.25 }
1.26