RealDistance.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _REALDISTANCE_H__
00012 #define _REALDISTANCE_H__
00013 
00014 #include "distance/SimpleDistance.h"
00015 #include "lib/common.h"
00016 
00018 class CRealDistance : public CSimpleDistance<float64_t>
00019 {
00020     public:
00022         CRealDistance() : CSimpleDistance<float64_t>() {}
00023 
00030         virtual bool init(CFeatures* l, CFeatures* r)
00031         {
00032             CSimpleDistance<float64_t>::init(l,r);
00033 
00034             ASSERT(l->get_feature_type()==F_DREAL);
00035             ASSERT(r->get_feature_type()==F_DREAL);
00036 
00037             return true;
00038         }
00039 
00044         inline virtual EFeatureType get_feature_type() { return F_DREAL; }
00045 };
00046 #endif

SHOGUN Machine Learning Toolbox - Documentation