SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VwEnvironment.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights
3  * embodied in the content of this file are licensed under the BSD
4  * (revised) open source license.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Written (W) 2011 Shashwat Lal Das
12  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society.
13  */
14 
15 #ifndef _VW_ENV_H__
16 #define _VW_ENV_H__
17 
18 #include <shogun/lib/config.h>
19 
20 #include <shogun/base/SGObject.h>
21 #include <shogun/base/DynArray.h>
22 #include <shogun/lib/DataType.h>
23 #include <shogun/lib/common.h>
24 #include <shogun/lib/v_array.h>
26 
27 namespace shogun
28 {
29 
42 {
43 public:
49 
53  virtual ~CVwEnvironment() { }
54 
59  inline void set_num_bits(vw_size_t bits) { num_bits = bits; }
60 
65  inline vw_size_t get_num_bits() { return num_bits; }
66 
71  inline void set_mask(vw_size_t m) { mask = m; }
72 
77  inline vw_size_t get_mask() { return mask; }
78 
83  inline float64_t get_min_label() { return min_label; }
84 
89  inline float64_t get_max_label() { return max_label; }
90 
95  inline vw_size_t num_threads() { return 1 << thread_bits; }
96 
101  inline vw_size_t length() { return 1 << num_bits; }
102 
109  void set_stride(vw_size_t new_stride);
110 
116  virtual const char* get_name() const { return "VwEnvironment"; }
117 
118 private:
122  virtual void init();
123 
124 public:
135 
140 
145 
147  bool adaptive;
152 
157 
160 
167 
169  int64_t example_number;
184 
189 
193  bool ignore[256];
194 
197 
199  const char* vw_version;
202 };
203 
204 }
205 #endif // _VW_ENV_H__

SHOGUN Machine Learning Toolbox - Documentation