Initialize the table to the given size of feature space.
| 34 | |
| 35 | // Initialize the table to the given size of feature space. |
| 36 | void 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. |
nothing calls this directly
no test coverage detected