encode_Cluster
Overview
encode_Cluster is a class in Aspose.Font FOSS for Python.
This class provides 9 methods for working with encode_Cluster objects in Python programs.
Available methods include: ClusterCostDiff, ClusterHistograms, CompareAndPushToHeap, HistogramBitCostDistance, HistogramCombine, HistogramPairComparator, HistogramReindex, HistogramRemap, __init__.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__init__() | Calls init on this encode_Cluster instance. |
HistogramPairComparator(p1, p2) | Compares two histogram entries p1 and p2 and returns ordering |
ClusterCostDiff(size_a, size_b) | Computes the cost difference between clusters of sizes size_a and size_b |
CompareAndPushToHeap(out, cluster_size, idx1, idx2, pairs) | Compares two clusters and pushes the result onto a heap |
HistogramCombine(out, cluster_size, symbols, symbols_off, symbols_size, max_clusters) | Merges histograms into combined clusters respecting max_clusters |
HistogramBitCostDistance(histogram, candidate) | Calculates the bit‑cost distance between a histogram and a candidate |
HistogramRemap(input, in_size, output, symbols) | Remaps input histogram data to output using a symbol mapping |
HistogramReindex(out, symbols) | Reindexes histogram entries according to the provided symbols |
ClusterHistograms(input, num_contexts, num_blocks, max_histograms, output, outputInt, histogram_symbols) | Groups input histograms into clusters based on contexts and limits |