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) 2006 Christian Gehl 00008 * Written (W) 2006-2008 Soeren Sonnenburg 00009 * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society 00010 */ 00011 00012 #ifndef _DISTANCE_MACHINE_H__ 00013 #define _DISTANCE_MACHINE_H__ 00014 00015 #include "lib/common.h" 00016 #include "distance/Distance.h" 00017 #include "features/Labels.h" 00018 #include "classifier/Classifier.h" 00019 00020 #include <stdio.h> 00021 00023 class CDistanceMachine : public CClassifier 00024 { 00025 public: 00027 CDistanceMachine(); 00028 virtual ~CDistanceMachine(); 00029 00034 inline void set_distance(CDistance* d) 00035 { 00036 SG_UNREF(distance); 00037 SG_REF(d); 00038 distance=d; 00039 } 00040 00045 inline CDistance* get_distance() { SG_REF(distance); return distance; } 00046 00047 protected: 00049 CDistance* distance; 00050 }; 00051 #endif