HOG2
RangeCompression.h
Go to the documentation of this file.
1 #ifndef RANGE_COMPRESSION_H
2 #define RANGE_COMPRESSION_H
3 
4 #include <vector>
5 #include <stdint.h>
6 
7 /*
8  Code by Malte Helmert
9 
10  Compute best values (= the ones maximizing the average
11  heuristic value) to use in a range-compressed admissible
12  heuristic.
13 
14  `distribution`: histogram of uncompressed heuristic values
15 
16  `num_values`: maximal number of values to use in the compressed
17  heuristic; must be at least 1
18 
19  `result`: receives the result vector.
20 
21  The function computes up to `num_values` values, in sorted
22  order. It will return fewer values if `distribution` contains
23  fewer than `num_values` non-zero entries.
24 */
25 void GetOptimizedBoundaries(const std::vector<uint64_t> &distribution,
26  int numValues, std::vector<int> &result);
27 
28 
29 // Debugging function.
30 void DumpOptimizedBoundaries(const std::vector<uint64_t> &distribution,
31  int numValues);
32 
33 #endif
DumpOptimizedBoundaries
void DumpOptimizedBoundaries(const std::vector< uint64_t > &distribution, int numValues)
GetOptimizedBoundaries
void GetOptimizedBoundaries(const std::vector< uint64_t > &distribution, int numValues, std::vector< int > &result)