Package kala.compress.harmony.pack200
Class BandSet.BandData
- java.lang.Object
-
- kala.compress.harmony.pack200.BandSet.BandData
-
- Enclosing class:
- BandSet
public class BandSet.BandData extends java.lang.ObjectBandData represents information about a band, e.g. largest value etc and is used in the heuristics that calculate whether an alternative Codec could make the encoded band smaller.
-
-
Field Summary
Fields Modifier and Type Field Description private doubleaverageAbsoluteDeltaprivate doubleaverageAbsoluteValueprivate int[]bandprivate intdeltaIsAscendingprivate java.util.Map<java.lang.Integer,java.lang.Integer>distinctValuesprivate intlargestprivate intlargestDeltaprivate intsmallDeltaCountprivate intsmallestprivate intsmallestDelta
-
Constructor Summary
Constructors Constructor Description BandData(int[] band)Constructs a new instance of BandData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleananyNegatives()Returns true if any band elements are negative.booleanmainlyPositiveDeltas()Returns true if the band deltas are mainly positive (heuristic).booleanmainlySmallDeltas()Returns true if the deltas between adjacent band elements are mainly small (heuristic).intnumDistinctValues()Returns the total number of distinct values found in the band.booleanwellCorrelated()Returns true if the band is well correlated (i.e.
-
-
-
Field Detail
-
band
private final int[] band
-
smallest
private int smallest
-
largest
private int largest
-
smallestDelta
private int smallestDelta
-
largestDelta
private int largestDelta
-
deltaIsAscending
private int deltaIsAscending
-
smallDeltaCount
private int smallDeltaCount
-
averageAbsoluteDelta
private double averageAbsoluteDelta
-
averageAbsoluteValue
private double averageAbsoluteValue
-
distinctValues
private java.util.Map<java.lang.Integer,java.lang.Integer> distinctValues
-
-
Method Detail
-
anyNegatives
public boolean anyNegatives()
Returns true if any band elements are negative.- Returns:
- true if any band elements are negative.
-
mainlyPositiveDeltas
public boolean mainlyPositiveDeltas()
Returns true if the band deltas are mainly positive (heuristic).- Returns:
- true if the band deltas are mainly positive (heuristic).
-
mainlySmallDeltas
public boolean mainlySmallDeltas()
Returns true if the deltas between adjacent band elements are mainly small (heuristic).- Returns:
- true if the deltas between adjacent band elements are mainly small (heuristic).
-
numDistinctValues
public int numDistinctValues()
Returns the total number of distinct values found in the band.- Returns:
- the total number of distinct values found in the band.
-
wellCorrelated
public boolean wellCorrelated()
Returns true if the band is well correlated (i.e. would be suitable for a delta encoding) (heuristic).- Returns:
- true if the band is well correlated (i.e. would be suitable for a delta encoding) (heuristic).
-
-