Class: Cabriolet::Compressors::Quantum::ModelSymbol

Inherits:
Object
  • Object
show all
Defined in:
lib/cabriolet/compressors/quantum.rb

Overview

Represents a symbol in an arithmetic coding model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sym, cumfreq) ⇒ ModelSymbol

Returns a new instance of ModelSymbol.



56
57
58
59
# File 'lib/cabriolet/compressors/quantum.rb', line 56

def initialize(sym, cumfreq)
  @sym = sym
  @cumfreq = cumfreq
end

Instance Attribute Details

#cumfreqObject

Returns the value of attribute cumfreq.



54
55
56
# File 'lib/cabriolet/compressors/quantum.rb', line 54

def cumfreq
  @cumfreq
end

#symObject

Returns the value of attribute sym.



54
55
56
# File 'lib/cabriolet/compressors/quantum.rb', line 54

def sym
  @sym
end