SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseDistance.cpp
Go to the documentation of this file.
2 
3 namespace shogun {
4 
5 template <class ST> bool CDenseDistance<ST>::init(CFeatures* l, CFeatures* r)
6 {
7  CDistance::init(l,r);
8 
11  ASSERT(l->get_feature_type()==this->get_feature_type())
12  ASSERT(r->get_feature_type()==this->get_feature_type())
13 
14 
15  if ( ((CDenseFeatures<ST>*) l)->get_num_features() != ((CDenseFeatures<ST>*) r)->get_num_features() )
16  {
17  SG_ERROR("train or test features #dimension mismatch (l:%d vs. r:%d)\n",
18  ((CDenseFeatures<ST>*) l)->get_num_features(),((CDenseFeatures<ST>*) r)->get_num_features());
19  }
20 
21  return true;
22 }
23 
29 
35 
41 
47 
53 
59 
65 
66 template class CDenseDistance<char>;
67 template class CDenseDistance<uint8_t>;
68 template class CDenseDistance<int16_t>;
69 template class CDenseDistance<uint16_t>;
70 template class CDenseDistance<int32_t>;
71 template class CDenseDistance<uint64_t>;
72 template class CDenseDistance<float64_t>;
73 }

SHOGUN Machine Learning Toolbox - Documentation