SHOGUN  v3.0.0
 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/common.h>
15 #include <shogun/base/SGObject.h>
17 #include <shogun/lib/SGVector.h>
18 
19 namespace shogun
20 {
22 class CSubset: public CSGObject
23 {
24  friend class CSubsetStack;
25 
26 public:
28  CSubset();
29 
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