Tapkee
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
dummy_callbacks.hpp
Go to the documentation of this file.
1
/* This software is distributed under BSD 3-clause license (see LICENSE file).
2
*
3
* Copyright (c) 2012-2013 Sergey Lisitsyn
4
*/
5
6
#ifndef TAPKEE_DUMMY_CALLBACKS_H_
7
#define TAPKEE_DUMMY_CALLBACKS_H_
8
9
namespace
tapkee
10
{
11
template
<
class
Data>
12
struct
dummy_features_callback
13
{
14
typedef
int
dummy
;
15
inline
tapkee::IndexType
dimension
()
const
16
{
17
throw
tapkee::unsupported_method_error
(
"Dummy feature vector callback is set"
);
18
}
19
inline
void
vector
(
const
Data&,
tapkee::DenseVector
&)
const
20
{
21
throw
tapkee::unsupported_method_error
(
"Dummy feature vector callback is set"
);
22
}
23
};
24
25
template
<
class
Data>
26
struct
dummy_kernel_callback
27
{
28
typedef
int
dummy
;
29
inline
tapkee::ScalarType
kernel
(
const
Data&,
const
Data&)
const
30
{
31
throw
tapkee::unsupported_method_error
(
"Dummy kernel callback is set"
);
32
return
0.0;
33
}
34
};
35
36
template
<
class
Data>
37
struct
dummy_distance_callback
38
{
39
typedef
int
dummy
;
40
inline
tapkee::ScalarType
distance
(
const
Data&,
const
Data&)
const
41
{
42
throw
tapkee::unsupported_method_error
(
"Dummy distance callback is set"
);
43
return
0.0;
44
}
45
};
46
}
47
48
#endif
49
include
tapkee
callbacks
dummy_callbacks.hpp
Generated by
1.8.3.1