SHOGUN  v2.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/base/SGObject.h>
16 
17 namespace shogun
18 {
19 
21 class CSubset: public CSGObject
22 {
23  friend class CSubsetStack;
24 
25 public:
27  CSubset();
28 
35  CSubset(SGVector<index_t> subset_idx);
36 
38  virtual ~CSubset();
39 
41  index_t get_size() const { return m_subset_idx.vlen; }
42 
44  inline const char* get_name() const { return "Subset"; }
45 
47  SGVector<index_t> get_subset_idx() const { return m_subset_idx; }
48 
49 private:
50  void init();
51 
52 private:
53  SGVector<index_t> m_subset_idx;
54 };
55 
56 }
57 #endif /* __SUBSET_H_ */

SHOGUN Machine Learning Toolbox - Documentation