SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Subset.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2011-2012 Heiko Strathmann
8  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9  */
10 
11 #ifndef __SUBSET_H_
12 #define __SUBSET_H_
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
17 #include <shogun/base/SGObject.h>
19 #include <shogun/lib/SGVector.h>
20 
21 namespace shogun
22 {
24 class CSubset: public CSGObject
25 {
26  friend class CSubsetStack;
27 
28 public:
30  CSubset();
31 
36  CSubset(SGVector<index_t> subset_idx);
37 
39  virtual ~CSubset();
40 
42  index_t get_size() const { return m_subset_idx.vlen; }
43 
45  inline const char* get_name() const { return "Subset"; }
46 
48  SGVector<index_t> get_subset_idx() const { return m_subset_idx; }
49 
50 private:
51  void init();
52 
53 private:
54  SGVector<index_t> m_subset_idx;
55 };
56 
57 }
58 #endif /* __SUBSET_H_ */

SHOGUN Machine Learning Toolbox - Documentation