• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

parray-bbox.cc

00001 #include <mln/core/alias/point2d.hh>
00002 #include <mln/core/alias/box2d.hh>
00003 #include <mln/geom/bbox.hh>
00004 #include <mln/core/site_set/p_array.hh>
00005 int main()
00006 {
00007   using namespace mln;
00008 
00009   // \{
00010   p_array<point2d> arr;
00011   arr.insert(point2d(1,0));
00012   arr.insert(point2d(1,1));
00013 
00014   // The bbox is computed thanks to bbox() algorithm.
00015   box2d box = geom::bbox(arr);
00016   std::cout << box << std::endl;
00017 
00018   // p_array provides nsites(),
00019   // it can be retrieved in constant time.
00020   std::cout << "nsites = " << arr.nsites() << std::endl;
00021   // \}
00022 }

Generated on Tue Oct 4 2011 15:24:18 for Milena (Olena) by  doxygen 1.7.1