Particle Identification and Tracking
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
common_src
include
wrapper_i_dummy.h
Go to the documentation of this file.
1
//Copyright 2009 Thomas A Caswell
2
//tcaswell@uchicago.edu
3
//http://jfi.uchicago.edu/~tcaswell
4
//
5
//This program is free software; you can redistribute it and/or modify
6
//it under the terms of the GNU General Public License as published by
7
//the Free Software Foundation; either version 3 of the License, or (at
8
//your option) any later version.
9
//
10
//This program is distributed in the hope that it will be useful, but
11
//WITHOUT ANY WARRANTY; without even the implied warranty of
12
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
//General Public License for more details.
14
//
15
//You should have received a copy of the GNU General Public License
16
//along with this program; if not, see <http://www.gnu.org/licenses>.
17
//
18
//Additional permission under GNU GPL version 3 section 7
19
//
20
//If you modify this Program, or any covered work, by linking or
21
//combining it with MATLAB (or a modified version of that library),
22
//containing parts covered by the terms of MATLAB User License, the
23
//licensors of this Program grant you additional permission to convey
24
//the resulting work.
25
26
#ifndef WRAPPER_I_DUMMY
27
#define WRAPPER_I_DUMMY
28
29
30
31
#include <string>
32
#include <vector>
33
#include <map>
34
35
#include <cmath>
36
37
#include "
wrapper_i.h
"
38
39
#include "
part_def.h
"
40
41
42
namespace
utilities{
46
class
Wrapper_i_dummy
:
public
Wrapper_in
{
47
private
:
48
std::set<D_TYPE>
d_types_
;
49
int
frames_
;
50
int
count_
;
51
mutable
int
counter_
;
52
53
54
public
:
55
56
int
get_value
(
int
& out,
57
int
ind,
D_TYPE
type,
int
frame)
const
{
58
if
(type ==
D_FRAME
)
59
{
60
out = frame;
61
}
62
else
63
{
64
out =
counter_
++;
65
}
66
67
68
return
out;
69
}
70
71
float
get_value
(
float
& out,
72
int
ind,
D_TYPE
type,
int
frame)
const
73
{
74
//int perd = 4;
75
// out = sin(ind*(3.14/perd))*sin((3.14/perd)*ind);
76
out = ind ;
77
78
return
out;
79
}
80
81
std::complex<float>
get_value
(std::complex<float>& out,
82
int
ind,
D_TYPE
type,
int
frame)
const
83
{
84
return
out;
85
}
86
87
88
89
std::set<D_TYPE>
get_data_types
()
const
90
{
91
return
d_types_
;
92
}
93
94
95
96
97
98
int
get_num_entries
(
unsigned
int
frame)
const
{
return
count_
;};
99
int
get_num_entries
()
const
{
return
count_
*
frames_
;};
100
int
get_num_frames
()
const
{
return
frames_
;};
101
102
bool
contains_type
(
D_TYPE
in)
const
103
{
104
return
d_types_
.find(in) !=
d_types_
.end();
105
};
106
107
Tuplef
get_dims
()
const
108
{
109
return
Tuplef
();
110
}
111
112
113
114
115
~Wrapper_i_dummy
(){};
116
117
118
Wrapper_i_dummy
(
const
std::set<utilities::D_TYPE>& d_types,
int
count,
int
frames):
119
d_types_
(d_types),
frames_
(frames),
count_
(count),
counter_
(0)
120
{
121
}
122
123
124
125
126
127
128
129
130
};
131
132
}
133
134
#endif
Generated on Tue Sep 10 2013 17:07:21 for Particle Identification and Tracking by
1.8.4