Tapkee
dummy_callbacks.hpp
Go to the documentation of this file.
00001 /* This software is distributed under BSD 3-clause license (see LICENSE file).
00002  *
00003  * Copyright (c) 2012-2013 Sergey Lisitsyn
00004  */
00005 
00006 #ifndef TAPKEE_DUMMY_CALLBACKS_H_
00007 #define TAPKEE_DUMMY_CALLBACKS_H_
00008 
00009 namespace tapkee
00010 {
00011     template<class Data>
00012     struct dummy_features_callback
00013     {
00014         typedef int dummy;
00015         inline tapkee::IndexType dimension() const 
00016         {
00017             throw tapkee::unsupported_method_error("Dummy feature vector callback is set");
00018         }
00019         inline void vector(const Data&, tapkee::DenseVector&) const
00020         {
00021             throw tapkee::unsupported_method_error("Dummy feature vector callback is set");
00022         }
00023     };
00024 
00025     template<class Data>
00026     struct dummy_kernel_callback
00027     {
00028         typedef int dummy;
00029         inline tapkee::ScalarType kernel(const Data&, const Data&) const
00030         {
00031             throw tapkee::unsupported_method_error("Dummy kernel callback is set");
00032             return 0.0;
00033         }
00034     };
00035 
00036     template<class Data>
00037     struct dummy_distance_callback
00038     {
00039         typedef int dummy;
00040         inline tapkee::ScalarType distance(const Data&, const Data&) const
00041         {
00042             throw tapkee::unsupported_method_error("Dummy distance callback is set");
00043             return 0.0;
00044         }
00045     };
00046 }
00047 
00048 #endif
00049 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines