BaseMulticlassMachine.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) 2012 Chiyuan Zhang
00008  * Copyright (C) 2012 Chiyuan Zhang
00009  */
00010 
00011 #ifndef BASEMULTICLASSMACHINE_H__
00012 #define BASEMULTICLASSMACHINE_H__
00013 
00014 #include <shogun/machine/Machine.h>
00015 
00016 namespace shogun
00017 {
00018 
00019 class CMachine;
00020 
00023 class CBaseMulticlassMachine: public CMachine
00024 {
00025 public:
00027     CBaseMulticlassMachine();
00028 
00030     virtual ~CBaseMulticlassMachine();
00031 
00033     virtual const char* get_name() const { return "BaseMulticlassMachine"; }
00034 
00035     
00040     inline int32_t get_num_machines() const
00041     {
00042         return m_machines->get_num_elements();
00043     }
00044 
00046     virtual EProblemType get_machine_problem_type() const 
00047     {
00048         return PT_MULTICLASS;
00049     }
00050 
00055     virtual bool is_label_valid(CLabels *lab) const
00056     {
00057         return lab->get_label_type() == LT_MULTICLASS;
00058     }
00059 protected:
00060 
00062     CDynamicObjectArray *m_machines;
00063 };
00064 
00065 } /* shogun */ 
00066 
00067 #endif /* end of include guard: BASEMULTICLASSMACHINE_H__ */
00068 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation