Subset.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) 2011-2012 Heiko Strathmann
00008  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
00009  */
00010 
00011 #ifndef __SUBSET_H_
00012 #define __SUBSET_H_
00013 
00014 #include <shogun/base/SGObject.h>
00015 #include <shogun/mathematics/Math.h>
00016 
00017 namespace shogun
00018 {
00019 
00021 class CSubset: public CSGObject
00022 {
00023     friend class CSubsetStack;
00024 
00025 public:
00027     CSubset();
00028 
00035     CSubset(SGVector<index_t> subset_idx);
00036 
00038     virtual ~CSubset();
00039 
00041     index_t get_size() const { return m_subset_idx.vlen; }
00042 
00044     inline const char* get_name() const { return "Subset"; }
00045 
00047     SGVector<index_t> get_subset_idx() const { return m_subset_idx; }
00048 
00049 private:
00050     void init();
00051 
00052 private:
00053     SGVector<index_t> m_subset_idx;
00054 };
00055 
00056 }
00057 #endif /* __SUBSET_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation