Module: Rambling::Trie::Compressible
- Included in:
- Nodes::Node
- Defined in:
- lib/rambling/trie/compressible.rb
Overview
Provides the compressible behavior for the trie data structure.
Instance Method Summary collapse
-
#compressible? ⇒ Boolean
Indicates if the current Node can be compressed or not.
Instance Method Details
#compressible? ⇒ Boolean
Indicates if the current Node can be compressed or not.
11 12 13 |
# File 'lib/rambling/trie/compressible.rb', line 11 def compressible? !(root? || terminal?) && children_tree.size == 1 end |