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 
00017 namespace shogun
00018 {
00020 class CRealDistance : public CSimpleDistance<float64_t>
00021 {
00022     public:
00024         CRealDistance() : CSimpleDistance<float64_t>() {}
00025 
00032         virtual bool init(CFeatures* l, CFeatures* r)
00033         {
00034             CSimpleDistance<float64_t>::init(l,r);
00035 
00036             ASSERT(l->get_feature_type()==F_DREAL);
00037             ASSERT(r->get_feature_type()==F_DREAL);
00038 
00039             return true;
00040         }
00041 
00046         inline virtual EFeatureType get_feature_type() { return F_DREAL; }
00047 };
00048 } // namespace shogun
00049 #endif

SHOGUN Machine Learning Toolbox - Documentation