SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Labels.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  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Written (W) 2011-2012 Heiko Strathmann
00010  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00011  */
00012 
00013 #ifndef _LABELS__H__
00014 #define _LABELS__H__
00015 
00016 #include <shogun/lib/common.h>
00017 #include <shogun/base/SGObject.h>
00018 #include <shogun/labels/LabelTypes.h>
00019 #include <shogun/labels/LabelsFactory.h>
00020 #include <shogun/features/SubsetStack.h>
00021 
00022 namespace shogun
00023 {
00035 class CLabels : public CSGObject
00036 {
00037     public:
00039         CLabels();
00040 
00042         virtual ~CLabels();
00043 
00050         virtual void ensure_valid(const char* context=NULL)=0;
00051 
00056         virtual int32_t get_num_labels() const=0;
00057 
00062         virtual ELabelType get_label_type() const=0;
00063 
00069         virtual void add_subset(SGVector<index_t> subset);
00070 
00073         virtual void remove_subset();
00074 
00077         virtual void remove_all_subsets();
00078 
00084         virtual void set_value(float64_t value, int32_t idx);
00085 
00091         virtual float64_t get_value(int32_t idx);
00092 
00098         virtual void set_values(SGVector<float64_t> values);
00099 
00104         virtual SGVector<float64_t> get_values();
00105 
00106     private:
00107         void init();
00108 
00109     protected:
00110 
00112         CSubsetStack* m_subset_stack;
00113 
00115         SGVector<float64_t> m_current_values;
00116 };
00117 }
00118 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation