* This file is a part of LEMON, a generic C++ optimization library
* Copyright (C) 2003-2007
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
* Permission to use, modify and distribute this software is granted
* provided that this copyright notice appears in all copies. For
* precise terms see the accompanying LICENSE file.
* This software is provided "AS IS" with no warranty of any kind,
* express or implied, and with no claim as to its suitability for any
cout << "Testing classes `dim2::Point' and `dim2::BoundingBox'." << endl;
typedef dim2::Point<int> Point;
check(seged.size()==2, "Wrong vector addition");
check(a[0]==1 && a[1]==2, "Wrong vector addition");
check(seged.x==4 && seged.y==6, "Wrong vector addition");
check(seged.x==-2 && seged.y==-2, "a-b");
check(a.normSquare()==5,"Wrong norm calculation");
check(seged.x==2 && seged.y==4, "a*l");
check(seged.x==1 && seged.y==2, "b/l");
typedef dim2::BoundingBox<int> BB;
check(doboz1.empty(), "It should be empty.");
check(!doboz1.empty(), "It should not be empty.");
check(doboz1.bottomLeft().x==1 &&
doboz1.bottomLeft().y==2 &&
doboz1.topRight().x==3 &&
check(doboz1.inside(seged),"It should be inside.");
check(doboz1.inside(seged),"It should be inside.");
check(!doboz1.inside(seged),"It should not be inside.");
"It should not be empty. Constructed from 1 point.");
check(doboz2.inside(seged),
"It should be inside. Incremented a box with another one.");