Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Base
Math
Examples
ExampleMatrix3x3.cpp
1
/* This file is part of the BIAS library (Basic ImageAlgorithmS).
2
3
Copyright (C) 2007 (see file CONTACT for details)
4
www.vision-n.de
5
6
BIAS is free software; you can redistribute it and/or modify
7
it under the terms of the GNU Lesser General Public License as published by
8
the Free Software Foundation; either version 2.1 of the License, or
9
(at your option) any later version.
10
11
BIAS is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public License
17
along with BIAS; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
20
/**
21
@example ExampleMatrix3x3.cpp
22
@relates Matrix3x3
23
@brief Example for Matrix3x3
24
@ingroup g_examples
25
@author MIP
26
*/
27
28
#include <Base/Math/Matrix3x3.hh>
29
30
using namespace
BIAS;
31
using namespace
std;
32
33
int
main(
int
argc,
char
*argv[])
34
{
35
Matrix3x3<double>
m1, m2, m3, m4;
36
37
for
(
int
i=0; i<9; i++)
38
m1.
GetData
()[i] = (double)i;
39
40
m2.
SetIdentity
();
41
42
for
(
int
r=0; r<3; r++){
43
for
(
int
c=0; c<3; c++){
44
m3[r][c] = 0.5;
45
}
46
}
47
48
m4 = m2 * m3;
49
50
cout <<
"m1: "
<<m1<<
"\nm2: "
<<m2<<
"\nm3: "
<<m3<<
"\nm4: "
<<m4<<endl;
51
52
return
0;
53
}
54
BIAS::Matrix3x3< double >
BIAS::Matrix3x3::GetData
T * GetData()
Definition:
Matrix3x3.hh:99
BIAS::Matrix3x3::SetIdentity
void SetIdentity()
set the elements of this matrix to the identity matrix (possibly overriding the inherited method) ...
Definition:
Matrix3x3.hh:429
Generated on Tue Feb 6 2018 02:01:33 for Basic Image AlgorithmS Library by
1.8.5