Class: Huff::EncodingTreeBuilder
- Inherits:
-
Object
- Object
- Huff::EncodingTreeBuilder
- Defined in:
- lib/huff/encoding_tree_builder.rb
Instance Method Summary collapse
-
#initialize(frequencies) ⇒ EncodingTreeBuilder
constructor
A new instance of EncodingTreeBuilder.
- #simplified_tree ⇒ Object
- #tree ⇒ Object
Constructor Details
#initialize(frequencies) ⇒ EncodingTreeBuilder
Returns a new instance of EncodingTreeBuilder.
3 4 5 |
# File 'lib/huff/encoding_tree_builder.rb', line 3 def initialize(frequencies) @frequencies = frequencies end |
Instance Method Details
#simplified_tree ⇒ Object
11 12 13 |
# File 'lib/huff/encoding_tree_builder.rb', line 11 def simplified_tree simplify(tree) end |
#tree ⇒ Object
7 8 9 |
# File 'lib/huff/encoding_tree_builder.rb', line 7 def tree create_tree(@frequencies).first end |