bazar
1.3.1
Main Page
Modules
Classes
Files
Examples
File List
File Members
starter
optimization
observation_types.h
Go to the documentation of this file.
1
/*
2
Copyright 2005, 2006 Computer Vision Lab,
3
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland.
4
All rights reserved.
5
6
This file is part of BazAR.
7
8
BazAR is free software; you can redistribute it and/or modify it under the
9
terms of the GNU General Public License as published by the Free Software
10
Foundation; either version 2 of the License, or (at your option) any later
11
version.
12
13
BazAR is distributed in the hope that it will be useful, but WITHOUT ANY
14
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License along with
18
BazAR; if not, write to the Free Software Foundation, Inc., 51 Franklin
19
Street, Fifth Floor, Boston, MA 02110-1301, USA
20
*/
21
#ifndef OBSERVATION_TYPES_H
22
#define OBSERVATION_TYPES_H
23
24
#include <cmath>
25
#include <limits>
26
28
29
class
observation
30
{
31
public
:
32
inline
void
set_default_values
(
void
) {
squared_c
= std::numeric_limits<double>::max();
confidence
= 1.;
weight
= 1.;
sqrt_weight
= 1.;
ground_truth_outlier
=
false
; }
33
ls_minimizer_type
squared_c_current
,
squared_c
,
c_min
,
c_max
;
34
ls_minimizer_type
weight
,
sqrt_weight
;
35
double
confidence
;
36
bool
outlier
,
ground_truth_outlier
;
37
};
38
40
41
typedef
void (*
function_2data_1measure
)(
const
ls_minimizer_type
d0,
const
ls_minimizer_type
d1,
42
const
ls_minimizer_type
* state,
43
ls_minimizer_type
& b0,
44
ls_minimizer_type
* J,
45
void
** user_data);
46
47
class
observation_2data_1measure
:
public
observation
48
{
49
public
:
50
function_2data_1measure
f
;
51
52
ls_minimizer_type
d0
,
d1
;
53
ls_minimizer_type
b0
;
54
};
55
57
58
typedef
void (*
function_2data_2measures
)(
const
ls_minimizer_type
d0,
const
ls_minimizer_type
d1,
59
const
ls_minimizer_type
* state,
60
ls_minimizer_type
& b0,
ls_minimizer_type
& b1,
61
ls_minimizer_type
* J,
62
void
** user_data);
63
64
class
observation_2data_2measures
:
public
observation
65
{
66
public
:
67
function_2data_2measures
f
;
68
69
ls_minimizer_type
d0
,
d1
;
70
ls_minimizer_type
b0
,
b1
;
71
};
72
74
75
typedef
void (*
function_3data_2measures
)(
const
ls_minimizer_type
d0,
76
const
ls_minimizer_type
d1,
const
ls_minimizer_type
d2,
77
const
ls_minimizer_type
* state,
78
ls_minimizer_type
& b0,
ls_minimizer_type
& b1,
79
ls_minimizer_type
* J,
80
void
** user_data);
81
82
class
observation_3data_2measures
:
public
observation
83
{
84
public
:
85
function_3data_2measures
f
;
86
87
ls_minimizer_type
d0
,
d1
,
d2
;
88
ls_minimizer_type
b0
,
b1
;
89
};
90
92
93
#endif // OBSERVATION_TYPES_H
Generated on Tue Jan 15 2013 12:50:22 for bazar by
1.8.1.2