Module: Dawg

Extended by:
Dawg
Included in:
Dawg
Defined in:
lib/dawg.rb,
lib/dawg/word.rb,
lib/dawg/finder.rb,
lib/dawg/dawg/dawg.rb,
lib/dawg/node/node.rb,
lib/dawg/serialization.rb,
lib/dawg/dawg/memory_dawg.rb,
lib/dawg/node/memory_node.rb

Defined Under Namespace

Modules: Finder, Serialization Classes: Dawg, MemoryDawg, MemoryNode, Node, Word

Constant Summary collapse

NODE_START =
8
NODE_SIZE =
21
EDGE_SIZE =
16

Instance Method Summary collapse

Instance Method Details

#load(filename, type = :small) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/dawg.rb', line 20

def load(filename, type = :small)
  return case type
  when :small
    MemoryDawg.load(filename)
  when :fast
    Dawg.load(filename)
  end
  dawg
end

#newObject



16
17
18
# File 'lib/dawg.rb', line 16

def new
  Dawg.new
end