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.
9 10 11 |
# File 'lib/rambling/trie/compressible.rb', line 9 def compressible? !(root? || terminal?) && 1 == children_tree.size end |