Documentation
¶
Index ¶
- type FlatFrequencyTable
- func (self *FlatFrequencyTable) Get(symbol uint) uint
- func (self *FlatFrequencyTable) GetHigh(symbol uint) uint
- func (self *FlatFrequencyTable) GetLow(symbol uint) uint
- func (self *FlatFrequencyTable) GetSymbolLimit() uint
- func (self *FlatFrequencyTable) GetTotal() uint
- func (self *FlatFrequencyTable) Increment(symbol uint)
- func (self *FlatFrequencyTable) Set(symbol uint, freq uint)
- func (self *FlatFrequencyTable) String() string
- type FrequencyTable
- type SimpleFrequencyTable
- func (self *SimpleFrequencyTable) Get(symbol uint) uint
- func (self *SimpleFrequencyTable) GetHigh(symbol uint) uint
- func (self *SimpleFrequencyTable) GetLow(symbol uint) uint
- func (self *SimpleFrequencyTable) GetSymbolLimit() uint
- func (self *SimpleFrequencyTable) GetTotal() uint
- func (self *SimpleFrequencyTable) Increment(symbol uint)
- func (self *SimpleFrequencyTable) Set(symbol uint, freq uint)
- func (self *SimpleFrequencyTable) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlatFrequencyTable ¶
type FlatFrequencyTable struct {
// contains filtered or unexported fields
}
func NewFlatFrequencyTable ¶
func NewFlatFrequencyTable(numSymbols uint) *FlatFrequencyTable
func (*FlatFrequencyTable) Get ¶
func (self *FlatFrequencyTable) Get(symbol uint) uint
func (*FlatFrequencyTable) GetHigh ¶
func (self *FlatFrequencyTable) GetHigh(symbol uint) uint
func (*FlatFrequencyTable) GetLow ¶
func (self *FlatFrequencyTable) GetLow(symbol uint) uint
func (*FlatFrequencyTable) GetSymbolLimit ¶
func (self *FlatFrequencyTable) GetSymbolLimit() uint
func (*FlatFrequencyTable) GetTotal ¶
func (self *FlatFrequencyTable) GetTotal() uint
func (*FlatFrequencyTable) Increment ¶
func (self *FlatFrequencyTable) Increment(symbol uint)
func (*FlatFrequencyTable) Set ¶
func (self *FlatFrequencyTable) Set(symbol uint, freq uint)
func (*FlatFrequencyTable) String ¶
func (self *FlatFrequencyTable) String() string
type FrequencyTable ¶
type FrequencyTable interface { String() string // Returns the number of symbols in this frequency table. GetSymbolLimit() uint // Returns the frequency of the given symbol. Get(symbol uint) uint // Sets the frequency of the given symbol to the given value. Set(symbol uint, freq uint) // Increments the frequency of the given symbol. Increment(symbol uint) // Returns the total of all symbol frequencies. // The returned value is always equal to getHigh(getSymbolLimit() - 1). GetTotal() uint // Returns the sum of the frequencies of all the symbols strictly below the given symbol value. GetLow(symbol uint) uint // Returns the sum of the frequencies of the given symbol and all the symbols below. GetHigh(symbol uint) uint }
type SimpleFrequencyTable ¶
type SimpleFrequencyTable struct {
// contains filtered or unexported fields
}
func NewSimpleFrequencyTable ¶
func NewSimpleFrequencyTable(freqs *FrequencyTable) *SimpleFrequencyTable
func (*SimpleFrequencyTable) Get ¶
func (self *SimpleFrequencyTable) Get(symbol uint) uint
func (*SimpleFrequencyTable) GetHigh ¶
func (self *SimpleFrequencyTable) GetHigh(symbol uint) uint
func (*SimpleFrequencyTable) GetLow ¶
func (self *SimpleFrequencyTable) GetLow(symbol uint) uint
func (*SimpleFrequencyTable) GetSymbolLimit ¶
func (self *SimpleFrequencyTable) GetSymbolLimit() uint
func (*SimpleFrequencyTable) GetTotal ¶
func (self *SimpleFrequencyTable) GetTotal() uint
func (*SimpleFrequencyTable) Increment ¶
func (self *SimpleFrequencyTable) Increment(symbol uint)
func (*SimpleFrequencyTable) Set ¶
func (self *SimpleFrequencyTable) Set(symbol uint, freq uint)
func (*SimpleFrequencyTable) String ¶
func (self *SimpleFrequencyTable) String() string
Click to show internal directories.
Click to hide internal directories.