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-2009 Christian Gehl 00008 * Written (W) 2006-2009 Soeren Sonnenburg 00009 * Copyright (C) 1999-2009 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 00026 class CDistanceMachine : public CClassifier 00027 { 00028 public: 00030 CDistanceMachine(); 00031 virtual ~CDistanceMachine(); 00032 00037 inline void set_distance(CDistance* d) 00038 { 00039 SG_UNREF(distance); 00040 SG_REF(d); 00041 distance=d; 00042 } 00043 00048 inline CDistance* get_distance() { SG_REF(distance); return distance; } 00049 00050 protected: 00052 CDistance* distance; 00053 }; 00054 #endif