SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringPreprocessor.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) 1999-2009 Soeren Sonnenburg
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _CSTRINGPREPROC__H__
12 #define _CSTRINGPREPROC__H__
13 
14 #include <shogun/lib/config.h>
15 
18 #include <shogun/lib/common.h>
20 
21 namespace shogun
22 {
23 template <class ST> class CStringFeatures;
24 
32 template <class ST> class CStringPreprocessor : public CPreprocessor
33 {
34  public:
38 
42  virtual bool apply_to_string_features(CFeatures* f)=0;
43 
45  virtual ST* apply_to_string(ST* f, int32_t &len)=0;
46 
51 
53  virtual const char* get_name() const { return "UNKNOWN"; }
54 
56  virtual EPreprocessorType get_type() const { return P_UNKNOWN; }
57 
58 };
59 
61 {
62  return F_ULONG;
63 }
64 
66 {
67  return F_LONG;
68 }
69 
71 {
72  return F_UINT;
73 }
74 
76 {
77  return F_INT;
78 }
79 
81 {
82  return F_WORD;
83 }
84 
86 {
87  return F_WORD;
88 }
89 
91 {
92  return F_BYTE;
93 }
94 
96 {
97  return F_BYTE;
98 }
99 
101 {
102  return F_CHAR;
103 }
104 
106 {
107  return F_BOOL;
108 }
109 
111 {
112  return F_SHORTREAL;
113 }
114 
116 {
117  return F_DREAL;
118 }
119 
121 {
122  return F_LONGREAL;
123 }
124 
125 }
126 #endif

SHOGUN Machine Learning Toolbox - Documentation