Milena (Olena)
User documentation 2.0a Id
Main Page
Related Pages
Modules
Namespaces
Classes
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerator
Groups
Pages
parray-bbox.cc
1
#include <mln/core/alias/point2d.hh>
2
#include <mln/core/alias/box2d.hh>
3
#include <mln/geom/bbox.hh>
4
#include <mln/core/site_set/p_array.hh>
5
int
main()
6
{
7
using namespace
mln;
8
9
// \{
10
p_array<point2d>
arr;
11
arr.
insert
(
point2d
(1,0));
12
arr.insert(
point2d
(1,1));
13
14
// The bbox is computed thanks to bbox() algorithm.
15
box2d
box
=
geom::bbox
(arr);
16
std::cout <<
box
<< std::endl;
17
18
// p_array provides nsites(),
19
// it can be retrieved in constant time.
20
std::cout <<
"nsites = "
<< arr.
nsites
() << std::endl;
21
// \}
22
}
doc
examples
parray-bbox.cc
Generated on Thu Nov 8 2012 10:58:18 for Milena (Olena) by
1.8.2-20120930