SHOGUN  v2.0.0
 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 
16 #include <shogun/lib/common.h>
18 
19 namespace shogun
20 {
21 template <class ST> class CStringFeatures;
22 
30 template <class ST> class CStringPreprocessor : public CPreprocessor
31 {
32  public:
36 
40  virtual bool apply_to_string_features(CFeatures* f)=0;
41 
43  virtual ST* apply_to_string(ST* f, int32_t &len)=0;
44 
46  inline virtual EFeatureClass get_feature_class() { return C_STRING; }
48  inline virtual EFeatureType get_feature_type();
49 
51  virtual inline const char* get_name() const { return "UNKNOWN"; }
52 
54  virtual inline EPreprocessorType get_type() const { return P_UNKNOWN; }
55 
56 };
57 
59 {
60  return F_ULONG;
61 }
62 
64 {
65  return F_LONG;
66 }
67 
69 {
70  return F_UINT;
71 }
72 
74 {
75  return F_INT;
76 }
77 
79 {
80  return F_WORD;
81 }
82 
84 {
85  return F_WORD;
86 }
87 
89 {
90  return F_BYTE;
91 }
92 
94 {
95  return F_BYTE;
96 }
97 
99 {
100  return F_CHAR;
101 }
102 
104 {
105  return F_BOOL;
106 }
107 
109 {
110  return F_SHORTREAL;
111 }
112 
114 {
115  return F_DREAL;
116 }
117 
119 {
120  return F_LONGREAL;
121 }
122 
123 }
124 #endif

SHOGUN Machine Learning Toolbox - Documentation