Index: lemon/dim2.h
===================================================================
--- lemon/dim2.h	(revision 241)
+++ lemon/dim2.h	(revision 253)
@@ -29,6 +29,5 @@
 /// a two dimensional vector with the usual operations.
 ///
-/// The class \ref lemon::dim2::BoundingBox "dim2::BoundingBox"
-/// can be used to determine
+/// The class \ref lemon::dim2::Box "dim2::Box" can be used to determine
 /// the rectangular bounding box of a set of
 /// \ref lemon::dim2::Point "dim2::Point"'s.
@@ -45,5 +44,5 @@
   /// @{
 
-  /// A simple two dimensional vector (plain vector) implementation
+  /// Two dimensional vector (plain vector)
 
   /// A simple two dimensional vector (plain vector) implementation
@@ -222,5 +221,5 @@
   inline std::ostream& operator<<(std::ostream &os, const Point<T>& z)
   {
-    os << "(" << z.x << ", " << z.y << ")";
+    os << "(" << z.x << "," << z.y << ")";
     return os;
   }
@@ -261,31 +260,31 @@
 
 
-    /// A class to calculate or store the bounding box of plain vectors.
-
-    /// A class to calculate or store the bounding box of plain vectors.
-    ///
-    template<typename T>
-    class BoundingBox {
+  /// Bounding box of plain vectors (\ref Point points).
+
+  /// A class to calculate or store the bounding box of plain vectors
+  /// (\ref Point points).
+  template<typename T>
+  class Box {
       Point<T> _bottom_left, _top_right;
       bool _empty;
     public:
 
-      ///Default constructor: creates an empty bounding box
-      BoundingBox() { _empty = true; }
-
-      ///Construct an instance from one point
-      BoundingBox(Point<T> a) {
+      ///Default constructor: creates an empty box
+      Box() { _empty = true; }
+
+      ///Construct a box from one point
+      Box(Point<T> a) {
         _bottom_left = _top_right = a;
         _empty = false;
       }
 
-      ///Construct an instance from two points
-
-      ///Construct an instance from two points.
+      ///Construct a box from two points
+
+      ///Construct a box from two points.
       ///\param a The bottom left corner.
       ///\param b The top right corner.
       ///\warning The coordinates of the bottom left corner must be no more
       ///than those of the top right one.
-      BoundingBox(Point<T> a,Point<T> b)
+      Box(Point<T> a,Point<T> b)
       {
         _bottom_left = a;
@@ -294,7 +293,7 @@
       }
 
-      ///Construct an instance from four numbers
-
-      ///Construct an instance from four numbers.
+      ///Construct a box from four numbers
+
+      ///Construct a box from four numbers.
       ///\param l The left side of the box.
       ///\param b The bottom of the box.
@@ -303,5 +302,5 @@
       ///\warning The left side must be no more than the right side and
       ///bottom must be no more than the top.
-      BoundingBox(T l,T b,T r,T t)
+      Box(T l,T b,T r,T t)
       {
         _bottom_left=Point<T>(l,b);
@@ -310,16 +309,16 @@
       }
 
-      ///Return \c true if the bounding box is empty.
-
-      ///Return \c true if the bounding box is empty (i.e. return \c false
+      ///Return \c true if the box is empty.
+
+      ///Return \c true if the box is empty (i.e. return \c false
       ///if at least one point was added to the box or the coordinates of
       ///the box were set).
       ///
-      ///The coordinates of an empty bounding box are not defined.
+      ///The coordinates of an empty box are not defined.
       bool empty() const {
         return _empty;
       }
 
-      ///Make the BoundingBox empty
+      ///Make the box empty
       void clear() {
         _empty = true;
@@ -329,5 +328,5 @@
 
       ///Give back the bottom left corner of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       Point<T> bottomLeft() const {
         return _bottom_left;
@@ -345,5 +344,5 @@
 
       ///Give back the top right corner of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       Point<T> topRight() const {
         return _top_right;
@@ -361,5 +360,5 @@
 
       ///Give back the bottom right corner of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       Point<T> bottomRight() const {
         return Point<T>(_top_right.x,_bottom_left.y);
@@ -378,5 +377,5 @@
 
       ///Give back the top left corner of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       Point<T> topLeft() const {
         return Point<T>(_bottom_left.x,_top_right.y);
@@ -395,5 +394,5 @@
 
       ///Give back the bottom of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T bottom() const {
         return _bottom_left.y;
@@ -411,5 +410,5 @@
 
       ///Give back the top of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T top() const {
         return _top_right.y;
@@ -427,5 +426,5 @@
 
       ///Give back the left side of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T left() const {
         return _bottom_left.x;
@@ -443,5 +442,5 @@
 
       /// Give back the right side of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T right() const {
         return _top_right.x;
@@ -459,5 +458,5 @@
 
       ///Give back the height of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T height() const {
         return _top_right.y-_bottom_left.y;
@@ -467,10 +466,10 @@
 
       ///Give back the width of the box.
-      ///If the bounding box is empty, then the return value is not defined.
+      ///If the box is empty, then the return value is not defined.
       T width() const {
         return _top_right.x-_bottom_left.x;
       }
 
-      ///Checks whether a point is inside a bounding box
+      ///Checks whether a point is inside the box
       bool inside(const Point<T>& u) const {
         if (_empty)
@@ -482,9 +481,9 @@
       }
 
-      ///Increments a bounding box with a point
-
-      ///Increments a bounding box with a point.
+      ///Increments the box with a point
+
+      ///Increments the box with a point.
       ///
-      BoundingBox& add(const Point<T>& u){
+      Box& add(const Point<T>& u){
         if (_empty) {
           _bottom_left = _top_right = u;
@@ -500,9 +499,9 @@
       }
 
-      ///Increments a bounding box to contain another bounding box
-
-      ///Increments a bounding box to contain another bounding box.
+      ///Increments the box to contain another box
+
+      ///Increments the box to contain another box.
       ///
-      BoundingBox& add(const BoundingBox &u){
+      Box& add(const Box &u){
         if ( !u.empty() ){
           add(u._bottom_left);
@@ -512,10 +511,10 @@
       }
 
-      ///Intersection of two bounding boxes
-
-      ///Intersection of two bounding boxes.
+      ///Intersection of two boxes
+
+      ///Intersection of two boxes.
       ///
-      BoundingBox operator&(const BoundingBox& u) const {
-        BoundingBox b;
+      Box operator&(const Box& u) const {
+        Box b;
         if (_empty || u._empty) {
           b._empty = true;
@@ -531,6 +530,47 @@
       }
 
-    };//class Boundingbox
-
+  };//class Box
+
+
+  ///Read a box from a stream
+
+  ///Read a box from a stream.
+  ///\relates Box
+  template<typename T>
+  inline std::istream& operator>>(std::istream &is, Box<T>& b) {
+    char c;
+    Point<T> p;
+    if (is >> c) {
+      if (c != '(') is.putback(c);
+    } else {
+      is.clear();
+    }
+    if (!(is >> p)) return is;
+    b.bottomLeft(p);
+    if (is >> c) {
+      if (c != ',') is.putback(c);
+    } else {
+      is.clear();
+    }
+    if (!(is >> p)) return is;
+    b.topRight(p);
+    if (is >> c) {
+      if (c != ')') is.putback(c);
+    } else {
+      is.clear();
+    }
+    return is;
+  }
+
+  ///Write a box to a stream
+
+  ///Write a box to a stream.
+  ///\relates Box
+  template<typename T>
+  inline std::ostream& operator<<(std::ostream &os, const Box<T>& b)
+  {
+    os << "(" << b.bottomLeft() << "," << b.topRight() << ")";
+    return os;
+  }
 
   ///Map of x-coordinates of a \ref Point "Point"-map
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 220)
+++ lemon/graph_to_eps.h	(revision 253)
@@ -726,8 +726,8 @@
     double diag_len = 1;
     if(!(_absoluteNodeSizes&&_absoluteArcWidths)) {
-      dim2::BoundingBox<double> bb;
+      dim2::Box<double> bb;
       for(NodeIt n(g);n!=INVALID;++n) bb.add(mycoords[n]);
       if (bb.empty()) {
-        bb = dim2::BoundingBox<double>(dim2::Point<double>(0,0));
+        bb = dim2::Box<double>(dim2::Point<double>(0,0));
       }
       diag_len = std::sqrt((bb.bottomLeft()-bb.topRight()).normSquare());
@@ -737,5 +737,5 @@
     }
 
-    dim2::BoundingBox<double> bb;
+    dim2::Box<double> bb;
     for(NodeIt n(g);n!=INVALID;++n) {
       double ns=_nodeSizes[n]*_nodeScale;
@@ -759,5 +759,5 @@
     }
     if (bb.empty()) {
-      bb = dim2::BoundingBox<double>(dim2::Point<double>(0,0));
+      bb = dim2::Box<double>(dim2::Point<double>(0,0));
     }
 
Index: test/dim_test.cc
===================================================================
--- test/dim_test.cc	(revision 242)
+++ test/dim_test.cc	(revision 253)
@@ -51,36 +51,36 @@
   check(p.x==1 && p.y==2, "Wrong dim2::Point division by a scalar.");
 
-  typedef dim2::BoundingBox<int> BB;
-  BB box1;
-  check(box1.empty(), "Wrong empty() in dim2::BoundingBox.");
+  typedef dim2::Box<int> Box;
+  Box box1;
+  check(box1.empty(), "Wrong empty() in dim2::Box.");
 
   box1.add(a);
-  check(!box1.empty(), "Wrong empty() in dim2::BoundingBox.");
+  check(!box1.empty(), "Wrong empty() in dim2::Box.");
   box1.add(b);
 
   check(box1.left()==1 && box1.bottom()==2 &&
         box1.right()==3 && box1.top()==4,
-        "Wrong addition of points to dim2::BoundingBox.");
+        "Wrong addition of points to dim2::Box.");
 
-  check(box1.inside(Point(2,3)), "Wrong inside() in dim2::BoundingBox.");
-  check(box1.inside(Point(1,3)), "Wrong inside() in dim2::BoundingBox.");
-  check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::BoundingBox.");
+  check(box1.inside(Point(2,3)), "Wrong inside() in dim2::Box.");
+  check(box1.inside(Point(1,3)), "Wrong inside() in dim2::Box.");
+  check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::Box.");
 
-  BB box2(Point(2,2));
-  check(!box2.empty(), "Wrong empty() in dim2::BoundingBox.");
-  
+  Box box2(Point(2,2));
+  check(!box2.empty(), "Wrong empty() in dim2::Box.");
+
   box2.bottomLeft(Point(2,0));
   box2.topRight(Point(5,3));
-  BB box3 = box1 & box2;
+  Box box3 = box1 & box2;
   check(!box3.empty() &&
-        box3.left()==2 && box3.bottom()==2 && 
+        box3.left()==2 && box3.bottom()==2 &&
         box3.right()==3 && box3.top()==3,
-        "Wrong intersection of two dim2::BoundingBox objects.");
-  
+        "Wrong intersection of two dim2::Box objects.");
+
   box1.add(box2);
   check(!box1.empty() &&
         box1.left()==1 && box1.bottom()==0 &&
         box1.right()==5 && box1.top()==4,
-        "Wrong addition of two dim2::BoundingBox objects.");
+        "Wrong addition of two dim2::Box objects.");
 
   return 0;
