1/* Copyright 2013 Google Inc. All Rights Reserved.
2
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5*/
6
7/* Functions for clustering similar histograms together. */
8
9#ifndef BROTLI_ENC_CLUSTER_H_
10#define BROTLI_ENC_CLUSTER_H_
11
12#include "../common/platform.h"
13#include <brotli/types.h>
14#include "./histogram.h"
15#include "./memory.h"
16
17#if defined(__cplusplus) || defined(c_plusplus)
18extern "C" {
19#endif
20
21typedef struct HistogramPair {
22 uint32_t idx1;
23 uint32_t idx2;
24 double cost_combo;
25 double cost_diff;
26} HistogramPair;
27
28#define CODE(X) /* Declaration */;
29
30#define FN(X) X ## Literal
31#include "./cluster_inc.h" /* NOLINT(build/include) */
32#undef FN
33
34#define FN(X) X ## Command
35#include "./cluster_inc.h" /* NOLINT(build/include) */
36#undef FN
37
38#define FN(X) X ## Distance
39#include "./cluster_inc.h" /* NOLINT(build/include) */
40#undef FN
41
42#undef CODE
43
44#if defined(__cplusplus) || defined(c_plusplus)
45} /* extern "C" */
46#endif
47
48#endif /* BROTLI_ENC_CLUSTER_H_ */
49