public enum RankPrecision extends java.lang.Enum<RankPrecision> implements CustomRankPrecision
Some predefined precision characteristics of rank operations, described in RankMorphology
interface.
Note: for every bit levels
array, represented by this enum,
there are both instances of this class with interpolated()
==falseinterpolated()
==true
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
MAX_NUMBER_OF_ANALYZED_BITS
Modifier and Type | Method and Description |
---|---|
int[] |
bitLevels()
The bit levels.
|
boolean |
interpolated()
Selects the histogram model used while calculating rank characteristics:
true means the precise histogram model, false means the simple histogram model.
|
int |
numberOfAnalyzedBits()
Returns the last element of the
CustomRankPrecision.bitLevels() array. |
RankPrecision |
otherInterpolation(boolean interpolated)
Returns the enum instance with the same
bit levels and with the specified
"interpolated " flag. |
static RankPrecision |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RankPrecision[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RankPrecision BITS_1
bitLevels()
={1}, interpolated()
=false.public static final RankPrecision BITS_1_INTERPOLATED
bitLevels()
={1}, interpolated()
=true.public static final RankPrecision BITS_2
bitLevels()
={2}, interpolated()
=false.public static final RankPrecision BITS_2_INTERPOLATED
bitLevels()
={2}, interpolated()
=true.public static final RankPrecision BITS_3
bitLevels()
={3}, interpolated()
=false.public static final RankPrecision BITS_3_INTERPOLATED
bitLevels()
={3}, interpolated()
=true.public static final RankPrecision BITS_4
bitLevels()
={4}, interpolated()
=false.public static final RankPrecision BITS_4_INTERPOLATED
bitLevels()
={4}, interpolated()
=true.public static final RankPrecision BITS_5
bitLevels()
={5}, interpolated()
=false.public static final RankPrecision BITS_5_INTERPOLATED
bitLevels()
={5}, interpolated()
=true.public static final RankPrecision BITS_6
bitLevels()
={6}, interpolated()
=false.public static final RankPrecision BITS_6_INTERPOLATED
bitLevels()
={6}, interpolated()
=true.public static final RankPrecision BITS_7
bitLevels()
={7}, interpolated()
=false.public static final RankPrecision BITS_7_INTERPOLATED
bitLevels()
={7}, interpolated()
=true.public static final RankPrecision BITS_8
bitLevels()
={8}, interpolated()
=false.public static final RankPrecision BITS_8_INTERPOLATED
bitLevels()
={8}, interpolated()
=true.public static final RankPrecision BITS_8_PER_4
bitLevels()
={4, 8}, interpolated()
=false.public static final RankPrecision BITS_8_PER_4_INTERPOLATED
bitLevels()
={4, 8}, interpolated()
=true.public static final RankPrecision BITS_9
bitLevels()
={9}, interpolated()
=false.public static final RankPrecision BITS_9_INTERPOLATED
bitLevels()
={9}, interpolated()
=true.public static final RankPrecision BITS_10
bitLevels()
={10}, interpolated()
=false.public static final RankPrecision BITS_10_INTERPOLATED
bitLevels()
={10}, interpolated()
=true.public static final RankPrecision BITS_10_PER_5
bitLevels()
={5, 10}, interpolated()
=false.public static final RankPrecision BITS_10_PER_5_INTERPOLATED
bitLevels()
={5, 10}, interpolated()
=true.public static final RankPrecision BITS_11
bitLevels()
={11}, interpolated()
=false.public static final RankPrecision BITS_11_INTERPOLATED
bitLevels()
={11}, interpolated()
=true.public static final RankPrecision BITS_11_PER_5
bitLevels()
={5, 11}, interpolated()
=false.public static final RankPrecision BITS_11_PER_5_INTERPOLATED
bitLevels()
={5, 11}, interpolated()
=true.public static final RankPrecision BITS_12
bitLevels()
={12}, interpolated()
=false.public static final RankPrecision BITS_12_INTERPOLATED
bitLevels()
={12}, interpolated()
=true.public static final RankPrecision BITS_12_PER_6
bitLevels()
={6, 12}, interpolated()
=false.public static final RankPrecision BITS_12_PER_6_INTERPOLATED
bitLevels()
={6, 12}, interpolated()
=true.public static final RankPrecision BITS_12_PER_4
bitLevels()
={4, 8, 12}, interpolated()
=false.public static final RankPrecision BITS_12_PER_4_INTERPOLATED
bitLevels()
={4, 8, 12}, interpolated()
=true.public static final RankPrecision BITS_13
bitLevels()
={13}, interpolated()
=false.public static final RankPrecision BITS_13_INTERPOLATED
bitLevels()
={13}, interpolated()
=true.public static final RankPrecision BITS_13_PER_6
bitLevels()
={6, 13}, interpolated()
=false.public static final RankPrecision BITS_13_PER_6_INTERPOLATED
bitLevels()
={6, 13}, interpolated()
=true.public static final RankPrecision BITS_14
bitLevels()
={14}, interpolated()
=false.public static final RankPrecision BITS_14_INTERPOLATED
bitLevels()
={14}, interpolated()
=true.public static final RankPrecision BITS_14_PER_7
bitLevels()
={7, 14}, interpolated()
=false.public static final RankPrecision BITS_14_PER_7_INTERPOLATED
bitLevels()
={7, 14}, interpolated()
=true.public static final RankPrecision BITS_15
bitLevels()
={15}, interpolated()
=false.public static final RankPrecision BITS_15_INTERPOLATED
bitLevels()
={15}, interpolated()
=true.public static final RankPrecision BITS_15_PER_7
bitLevels()
={7, 15}, interpolated()
=false.public static final RankPrecision BITS_15_PER_7_INTERPOLATED
bitLevels()
={7, 15}, interpolated()
=true.public static final RankPrecision BITS_15_PER_5
bitLevels()
={5, 10, 15}, interpolated()
=false.public static final RankPrecision BITS_15_PER_5_INTERPOLATED
bitLevels()
={5, 10, 15}, interpolated()
=true.public static final RankPrecision BITS_16
bitLevels()
={16}, interpolated()
=false.public static final RankPrecision BITS_16_INTERPOLATED
bitLevels()
={16}, interpolated()
=true.public static final RankPrecision BITS_16_PER_8
bitLevels()
={8, 16}, interpolated()
=false.public static final RankPrecision BITS_16_PER_8_INTERPOLATED
bitLevels()
={8, 16}, interpolated()
=true.public static final RankPrecision BITS_16_PER_5
bitLevels()
={5, 10, 16}, interpolated()
=false.public static final RankPrecision BITS_16_PER_5_INTERPOLATED
bitLevels()
={5, 10, 16}, interpolated()
=true.public static final RankPrecision BITS_20
bitLevels()
={20}, interpolated()
=false.public static final RankPrecision BITS_20_INTERPOLATED
bitLevels()
={20}, interpolated()
=true.public static final RankPrecision BITS_20_PER_10
bitLevels()
={10, 20}, interpolated()
=false.public static final RankPrecision BITS_20_PER_10_INTERPOLATED
bitLevels()
={10, 20}, interpolated()
=true.public static final RankPrecision BITS_20_PER_7
bitLevels()
={6, 13, 20}, interpolated()
=false.public static final RankPrecision BITS_20_PER_7_INTERPOLATED
bitLevels()
={6, 13, 20}, interpolated()
=true.public static final RankPrecision BITS_20_PER_5
bitLevels()
={5, 10, 15, 20}, interpolated()
=false.public static final RankPrecision BITS_20_PER_5_INTERPOLATED
bitLevels()
={5, 10, 15, 20}, interpolated()
=true.public static final RankPrecision BITS_22
bitLevels()
={22}, interpolated()
=false.public static final RankPrecision BITS_22_INTERPOLATED
bitLevels()
={22}, interpolated()
=true.public static final RankPrecision BITS_22_PER_11
bitLevels()
={11, 22}, interpolated()
=false.public static final RankPrecision BITS_22_PER_11_INTERPOLATED
bitLevels()
={11, 22}, interpolated()
=true.public static final RankPrecision BITS_22_PER_7
bitLevels()
={7, 14, 22}, interpolated()
=false.public static final RankPrecision BITS_22_PER_7_INTERPOLATED
bitLevels()
={7, 14, 22}, interpolated()
=true.public static final RankPrecision BITS_22_PER_5
bitLevels()
={5, 10, 15, 22}, interpolated()
=false.public static final RankPrecision BITS_22_PER_5_INTERPOLATED
bitLevels()
={5, 10, 15, 22}, interpolated()
=true.public static final RankPrecision BITS_24
bitLevels()
={24}, interpolated()
=false.public static final RankPrecision BITS_24_INTERPOLATED
bitLevels()
={24}, interpolated()
=true.public static final RankPrecision BITS_24_PER_12
bitLevels()
={12, 24}, interpolated()
=false.public static final RankPrecision BITS_24_PER_12_INTERPOLATED
bitLevels()
={12, 24}, interpolated()
=true.public static final RankPrecision BITS_24_PER_8
bitLevels()
={8, 16, 24}, interpolated()
=false.public static final RankPrecision BITS_24_PER_8_INTERPOLATED
bitLevels()
={8, 16, 24}, interpolated()
=true.public static final RankPrecision BITS_24_PER_6
bitLevels()
={6, 12, 18, 24}, interpolated()
=false.public static final RankPrecision BITS_24_PER_6_INTERPOLATED
bitLevels()
={6, 12, 18, 24}, interpolated()
=true.public static final RankPrecision BITS_24_PER_4
bitLevels()
={4, 8, 12, 16, 20, 24}, interpolated()
=false.public static final RankPrecision BITS_24_PER_4_INTERPOLATED
bitLevels()
={4, 8, 12, 16, 20, 24}, interpolated()
=true.public static final RankPrecision BITS_26
bitLevels()
={26}, interpolated()
=false.public static final RankPrecision BITS_26_INTERPOLATED
bitLevels()
={26}, interpolated()
=true.public static final RankPrecision BITS_26_PER_13
bitLevels()
={13, 26}, interpolated()
=false.public static final RankPrecision BITS_26_PER_13_INTERPOLATED
bitLevels()
={13, 26}, interpolated()
=true.public static final RankPrecision BITS_26_PER_8
bitLevels()
={8, 16, 26}, interpolated()
=false.public static final RankPrecision BITS_26_PER_8_INTERPOLATED
bitLevels()
={8, 16, 26}, interpolated()
=true.public static final RankPrecision BITS_26_PER_6
bitLevels()
={6, 12, 18, 26}, interpolated()
=false.public static final RankPrecision BITS_26_PER_6_INTERPOLATED
bitLevels()
={6, 12, 18, 26}, interpolated()
=true.public static RankPrecision[] values()
for (RankPrecision c : RankPrecision.values()) System.out.println(c);
public static RankPrecision valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int[] bitLevels()
CustomRankPrecision
The last element of this array bitLevels[bitLevels.length-1] is named
the number of analysed bits and specifies the logarithm of the length
of the histogram, used while calculating rank characteristics. More precisely, the length
of the histogram is array()
.bitsPerElement()
RankMorphology
interface, section 3.
First bitLevels.length-1 elements of this array, i.e.
JArrays.copyOfRange
(bitLevels,0,bitLevels.length-1)Histogram.newIntHistogram
or SummingHistogram.newSummingIntHistogram
methods, when they are called for creating objects,
which really calculate the rank characteristics, described in RankMorphology
interface.
In other words, first bitLevels.length-1 elements describe the levels of the pyramid
of histograms: it is necessary for efficient processing large histograms,
consisting of thousands or millions bars.
This array must not be empty and must not contain more than 31 elements,
and all its elements must be sorted in strictly increasing order:
CustomRankPrecision.MAX_NUMBER_OF_ANALYZED_BITS
limit.
Below are possible examples of the array, returned by this method:
Note that the situation, when some or even all elements of this array are greater than 2β, is not an error — it just will lead to unjustified slowing down of calculations, because some levels of the pyramid of histograms will contain only 1 "wide" bar.
bitLevels
in interface CustomRankPrecision
the pyramid of histograms
(all elements excepting the last one) and
the maximal possible total number of analyzed bits CustomRankPrecision.numberOfAnalyzedBits()
public int numberOfAnalyzedBits()
CustomRankPrecision
CustomRankPrecision.bitLevels()
array.numberOfAnalyzedBits
in interface CustomRankPrecision
public boolean interpolated()
CustomRankPrecision
Histogram
and SummingHistogram
classes
about these models.interpolated
in interface CustomRankPrecision
public RankPrecision otherInterpolation(boolean interpolated)
bit levels
and with the specified
"interpolated
" flag.
If the argument is equal to the current result of interpolated()
method,
returns the reference to this instance.
interpolated
- new "interpolated" flag.bit levels
and
the specified "interpolated
" flag.