SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MulticlassMultipleOutputLabels.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  * Copyright (C) 2012 Sergey Lisitsyn
00008  */
00009 
00010 #ifndef MULTICLASSMULTIPLEOUTPUTLABELS_H_
00011 #define MULTICLASSMULTIPLEOUTPUTLABELS_H_
00012 
00013 #include <shogun/labels/Labels.h>
00014 #include <shogun/labels/LabelTypes.h>
00015 #include <shogun/lib/DynamicObjectArray.h>
00016 
00017 namespace shogun
00018 {
00026 class CMulticlassMultipleOutputLabels : public CLabels
00027 {
00028 
00029     public:
00031         CMulticlassMultipleOutputLabels();
00032 
00037         CMulticlassMultipleOutputLabels(int32_t num_labels);
00038 
00040         virtual ~CMulticlassMultipleOutputLabels();
00041 
00048         virtual void ensure_valid(const char* context = NULL);
00049 
00056         SGMatrix<index_t> get_labels() const;
00057 
00064         SGVector<index_t> get_label(int32_t idx);
00065 
00076         bool set_label(int32_t idx, SGVector<index_t> label);
00077 
00082         virtual int32_t get_num_labels() const;
00083 
00085         virtual const char* get_name() const { return "MulticlassMultipleOutputLabels"; }
00086 
00091         virtual ELabelType get_label_type() const { return LT_MULTICLASS_MULTIPLE_OUTPUT; }
00092 
00093     private:
00095         void init();
00096 
00097     protected:
00099         SGVector<index_t>* m_labels;
00101         int32_t m_n_labels;
00102 
00103 };
00104 }
00105 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation