SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GUILabels.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 1999-2008 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
10  */
11 
12 #ifndef __GUILABELS__H_
13 #define __GUILABELS__H_
14 
15 #include <shogun/lib/config.h>
16 #include <shogun/base/SGObject.h>
17 #include <shogun/features/Labels.h>
18 
19 namespace shogun
20 {
21 class CSGInterface;
22 
24 class CGUILabels : public CSGObject
25 {
26  public:
28  CGUILabels() {};
32  CGUILabels(CSGInterface* interface);
34  ~CGUILabels();
35 
40 
44  bool set_train_labels(CLabels* lab) { SG_UNREF(train_labels); SG_REF(lab); train_labels=lab; return true;}
48  bool set_test_labels(CLabels* lab) { SG_UNREF(test_labels); SG_REF(lab); test_labels=lab; return true;}
49 
54  bool load(char* filename, char* target);
58  bool save(char* param);
59 
61  inline virtual const char* get_name() const { return "GUILabels"; }
62 
63  protected:
65  CSGInterface* ui;
70 };
71 }
72 #endif
CLabels * get_train_labels()
Definition: GUILabels.h:37
UI labels.
Definition: GUILabels.h:24
CSGInterface * interface
Definition: SGInterface.cpp:41
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
bool save(char *param)
Definition: GUILabels.cpp:69
CLabels * get_test_labels()
Definition: GUILabels.h:39
#define SG_REF(x)
Definition: SGObject.h:44
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:76
virtual const char * get_name() const
Definition: GUILabels.h:61
#define SG_UNREF(x)
Definition: SGObject.h:45
CSGInterface * ui
Definition: GUILabels.h:65
bool set_test_labels(CLabels *lab)
Definition: GUILabels.h:48
bool load(char *filename, char *target)
Definition: GUILabels.cpp:34
CLabels * test_labels
Definition: GUILabels.h:69
bool set_train_labels(CLabels *lab)
Definition: GUILabels.h:44
CLabels * train_labels
Definition: GUILabels.h:67

SHOGUN Machine Learning Toolbox - Documentation