|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WheelOfFortune
Abstract interface for the "Wheel of Fortune" - an ordered array of frequencies used for entropy encoding.
| Field Summary |
|---|
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Method Summary | |
|---|---|
int |
convert(long _sum)
Converts a frequency sum to the corresponding symbol. |
long |
get(int _symbol)
Returns the frequency of the given symbol. |
int |
getSymbols()
Returns total number of symbols (intervals). |
long |
left(int _symbol)
Returns the start of the symbol's cummulative frequency interval (the frequency sum of all preceding symbols). |
void |
set(int _symbol,
long _freq)
Sets a single symbol's frequency. |
void |
set(long[] _freq)
Sets frequencies of all symbols at once. |
void |
setSymbols(int _symbols)
Changes total number of symbols (intervals). |
long |
total()
Returns the frequency sum of all symbols. |
| Methods inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
commit, get, set |
| Method Detail |
|---|
void setSymbols(int _symbols)
_symbols - New number of symbols.getSymbols()int getSymbols()
void set(long[] _freq)
null parameter).
_freq - Array of new frequencies.
Can be null for context re-initialization.set(int,long),
EntropyHistogram.decimate()
void set(int _symbol,
long _freq)
_symbol - Symbol code._freq - New frequency of the symbol.set(long[]),
EntropyHistogram.decimate()long total()
left( getSymbols() ), but might be more effective.
left(int),
get(int),
convert(long)long left(int _symbol)
_symbol - Symbol code.
total(),
get(int),
convert(long)long get(int _symbol)
left( _symbol + 1 ) - left( _symbol ).
_symbol - Symbol code.
total(),
left(int),
convert(long)int convert(long _sum)
_sum - Frequency sum of the unknown symbol.
_sum in it's cummulative frequency interval.total(),
left(int),
get(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||