GUILabels.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-2008 Soeren Sonnenburg
00008  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
00010  */
00011 
00012 #ifndef __GUILABELS__H_
00013 #define __GUILABELS__H_
00014 
00015 #include <shogun/lib/config.h>
00016 #include <shogun/base/SGObject.h>
00017 #include <shogun/labels/Labels.h>
00018 
00019 namespace shogun
00020 {
00021 class CSGInterface;
00022 
00024 class CGUILabels : public CSGObject
00025 {
00026     public:
00028         CGUILabels() {};
00032         CGUILabels(CSGInterface* interface);
00034         ~CGUILabels();
00035 
00037         CLabels *get_train_labels() { return train_labels; }
00039         CLabels *get_test_labels() { return test_labels; }
00040 
00044         bool set_train_labels(CLabels* lab) { SG_UNREF(train_labels); SG_REF(lab); train_labels=lab; return true;}
00048         bool set_test_labels(CLabels* lab) { SG_UNREF(test_labels); SG_REF(lab); test_labels=lab; return true;}
00049 
00054         bool load(char* filename, char* target);
00058         bool save(char* param);
00059 
00066         CLabels* infer_labels(float64_t* lab, int32_t len);
00067 
00069         virtual const char* get_name() const { return "GUILabels"; }
00070 
00071     protected:
00073         CSGInterface* ui;
00075         CLabels *train_labels;
00077         CLabels *test_labels;
00078 };
00079 }
00080 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation