21 #ifndef _HYPERPLANE_CLASSIFIER_H
22 #define _HYPERPLANE_CLASSIFIER_H
24 #include "Descriptor/RawData.h"
26 template<
class ScalarType>
38 static const char *signature() {
return "linear-hog"; }
41 template<
class SrcScalarType>
42 void import(
int _n,
const SrcScalarType *_w)
46 w =
new ScalarType[n];
53 ScalarType response(
const RawData<T> & src)
const
56 for(
int i =0;i<n; i++)
57 r += src.data[i] * w[i];
64 template<
class DataType>
68 s.w =
new DataType[s.n];
69 for(
int i=0;i<s.n;++i)
81 template<
class DataType>
82 inline std::ostream & operator << (std::ostream & out, const HyperPlaneClassifier<DataType> & s)
85 for(
int i=0;i<s.n;++i)
Definition: HyperplaneClassifier.h:27