Vowpal Wabbit
vowpalwabbit
example_predict.cc
Go to the documentation of this file.
1
/*
2
Copyright (c) by respective owners including Yahoo!, Microsoft, and
3
individual contributors. All rights reserved. Released under a BSD
4
license as described in the file LICENSE.
5
*/
6
7
#include "
example_predict.h
"
8
9
safe_example_predict::safe_example_predict
()
10
{
11
indices
= v_init<namespace_index>();
12
ft_offset
= 0;
13
// feature_space is initialized through constructors
14
}
15
16
safe_example_predict::~safe_example_predict
()
17
{
18
indices
.
delete_v
();
19
for
(
size_t
i = 0; i < UINT8_MAX; i++)
feature_space
[i].delete_v();
20
}
21
22
void
safe_example_predict::clear
()
23
{
24
for
(
auto
ns :
indices
)
feature_space
[ns].clear();
25
indices.clear();
26
}
example_predict::indices
v_array< namespace_index > indices
Definition:
example_predict.h:40
example_predict::ft_offset
uint64_t ft_offset
Definition:
example_predict.h:42
example_predict::feature_space
std::array< features, NUM_NAMESPACES > feature_space
Definition:
example_predict.h:41
example_predict.h
safe_example_predict::clear
void clear()
Definition:
example_predict.cc:22
v_array::delete_v
void delete_v()
Definition:
v_array.h:98
safe_example_predict::safe_example_predict
safe_example_predict()
Definition:
example_predict.cc:9
safe_example_predict::~safe_example_predict
~safe_example_predict()
Definition:
example_predict.cc:16
Generated on Thu Apr 9 2020 14:45:24 for Vowpal Wabbit by
1.8.13