Milena (Olena)
User documentation 2.0a Id
Main Page
Related Pages
Modules
Namespaces
Classes
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerator
Groups
Pages
ima2d-5.cc
1
#include <mln/core/image/image2d.hh>
2
int
main()
3
{
4
using namespace
mln;
5
6
// \{
7
image2d<int>
ima1(
box2d
(2, 3));
8
image2d<int>
ima2;
9
point2d
p(1,2);
10
11
ima2 = ima1;
// ima1.id() == ima2.id()
12
// and both point to the same memory area.
13
14
ima2(p) = 2;
// ima1 is modified as well.
15
16
// prints "2 - 2"
17
std::cout << ima2(p) <<
" - "
<< ima1(p) << std::endl;
18
// prints "true"
19
std::cout << (ima2.id_() == ima1.id_()) << std::endl;
20
// \}
21
}
doc
examples
ima2d-5.cc
Generated on Thu Nov 8 2012 10:58:07 for Milena (Olena) by
1.8.2-20120930