MCPcopy Create free account
hub / github.com/creatale/node-dv / Init

Method Init

deps/tesseract/classify/intfeaturedist.cpp:36–47  ·  view source on GitHub ↗

Initialize the table to the given size of feature space.

Source from the content-addressed store, hash-verified

34
35// Initialize the table to the given size of feature space.
36void IntFeatureDist::Init(const IntFeatureMap* feature_map) {
37 size_ = feature_map->sparse_size();
38 Clear();
39 feature_map_ = feature_map;
40 features_ = new bool[size_];
41 features_delta_one_ = new bool[size_];
42 features_delta_two_ = new bool[size_];
43 memset(features_, false, size_ * sizeof(features_[0]));
44 memset(features_delta_one_, false, size_ * sizeof(features_delta_one_[0]));
45 memset(features_delta_two_, false, size_ * sizeof(features_delta_two_[0]));
46 total_feature_weight_ = 0.0;
47}
48
49// Setup the map for the given indexed_features that have been indexed by
50// feature_map.

Callers

nothing calls this directly

Calls 1

sparse_sizeMethod · 0.80

Tested by

no test coverage detected