SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
IndexBlock.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 INDEXBLOCK_H_
00011 #define INDEXBLOCK_H_
00012 
00013 #include <shogun/lib/SGVector.h>
00014 #include <shogun/lib/List.h>
00015 
00016 namespace shogun
00017 {
00018 
00022 class CIndexBlock : public CSGObject
00023 {
00024 public:
00025 
00027     CIndexBlock();
00028 
00035     CIndexBlock(index_t min_index, index_t max_index,
00036           float64_t weight=1.0, const char* name="task");
00037 
00039     ~CIndexBlock();
00040 
00042     index_t get_min_index() const { return m_min_index; }
00044     void set_min_index(index_t min_index) { m_min_index = min_index; }
00046     index_t get_max_index() const { return m_max_index; }
00048     void set_max_index(index_t max_index) { m_max_index = max_index; }
00050     float64_t get_weight() const { return m_weight; }
00052     void set_weight(float64_t weight) { m_weight = weight; }
00053 
00055     virtual const char* get_name() const { return "IndexBlock"; };
00056 
00058     CList* get_sub_blocks();
00059 
00061     int32_t get_num_sub_blocks();
00062 
00066     void add_sub_block(CIndexBlock* sub_block);
00067 
00068 private:
00070     index_t m_min_index;
00071 
00073     index_t m_max_index;
00074 
00076     float64_t m_weight;
00077 
00079     CList* m_sub_blocks;
00080 
00081 };
00082 
00083 }
00084 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation