File: math.h

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (15 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
enum bit_count_estimator_type_t { BCE_SHANNON, BCE_COMPRESSION };

class bit_count_estimator
{
private:
	const bit_count_estimator_type_t type;

	int determine_number_of_bits_of_data_shannon(const unsigned char *const data, const unsigned int n_bytes);
	int determine_number_of_bits_of_data_compression(const unsigned char *const data, const unsigned int n_bytes);

public:
	bit_count_estimator(const bit_count_estimator_type_t type_in);

	int get_bit_count(const unsigned char *const data, const unsigned int n_bytes);
};