SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StreamingDotFeatures.cpp
Go to the documentation of this file.
2 
3 using namespace shogun;
4 
6 {
7  init();
9 }
10 
12  int32_t size) : CStreamingFeatures()
13 {
14  init(file, is_labelled, size);
16 }
17 
19  float64_t* lab)
20 {
22  return;
23 }
24 
26 {
27 }
28 
30  float32_t* vec, int32_t dim, float32_t b, int32_t num_vec)
31 {
32  ASSERT(num_vec>=0);
33 
34  int32_t counter=0;
35  start_parser();
36  while (get_next_example())
37  {
38  if (alphas)
39  output[counter]=alphas[counter]*dense_dot(vec, dim)+b;
40  else
41  output[counter]=dense_dot(vec, dim)+b;
42 
44 
45  counter++;
46  if ((counter>=num_vec) && (num_vec>0))
47  break;
48  }
49  end_parser();
50 }
51 
53 {
54  int32_t dim = get_dim_feature_space();
55  if (dim > len)
56  {
57  vec = SG_REALLOC(float32_t, vec, dim);
58  memset(&vec[len], 0, (dim-len) * sizeof(float32_t));
59  len = dim;
60  }
61 }
62 
64 {
65  int32_t dim = get_dim_feature_space();
66  if (dim > len)
67  {
68  vec = SG_REALLOC(float64_t, vec, dim);
69  memset(&vec[len], 0, (dim-len) * sizeof(float64_t));
70  len = dim;
71  }
72 }
73 
75 {
77  return NULL;
78 }
79 
81 {
83  return -1;
84 }
85 
86 bool CStreamingDotFeatures::get_next_feature(int32_t& index, float32_t& value, void* iterator)
87 {
89  return false;
90 }
91 
93 {
95  return;
96 }
97 
98 void CStreamingDotFeatures::init()
99 {
100 }
101 
102 void CStreamingDotFeatures::init(CStreamingFile *file, bool is_labelled, int32_t size)
103 {
104 }

SHOGUN Machine Learning Toolbox - Documentation