Tapkee
 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>
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>
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>
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 
double ScalarType
default scalar value (can be overrided with TAPKEE_CUSTOM_INTERNAL_NUMTYPE define) ...
Definition: types.hpp:15
tapkee::IndexType dimension() const
Eigen::Matrix< tapkee::ScalarType, Eigen::Dynamic, 1 > DenseVector
dense vector type (non-overridable)
Definition: types.hpp:21
tapkee::ScalarType distance(const Data &, const Data &) const
int IndexType
indexing type (non-overridable) set to int for compatibility with OpenMP 2.0
Definition: types.hpp:19
tapkee::ScalarType kernel(const Data &, const Data &) const
void vector(const Data &, tapkee::DenseVector &) const
An exception type that is thrown when unsupported method is called.
Definition: exceptions.hpp:47