Module: MemDB::Index
- Included in:
- Any, Enum, PatternMatch, PrefixTree, SequenceMatch
- Defined in:
- lib/mem_db/index.rb,
lib/mem_db/index/any.rb,
lib/mem_db/index/enum.rb,
lib/mem_db/index/bucket.rb,
lib/mem_db/index/prefix_tree.rb,
lib/mem_db/index/pattern_match.rb,
lib/mem_db/index/sequence_match.rb
Defined Under Namespace
Modules: Bucket
Classes: Any, Enum, PatternMatch, PrefixTree, SequenceMatch
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.compose(chain) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/mem_db/index.rb', line 7
def self.compose(chain)
(0..chain.length - 2).each do |parent_i|
chain[parent_i].bucket = chain[parent_i + 1]
end
chain[0].new
end
|
Instance Method Details
#add(_obj, _value) ⇒ Object
22
23
24
|
# File 'lib/mem_db/index.rb', line 22
def add(_obj, _value)
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|
#bucket ⇒ Object
18
19
20
|
# File 'lib/mem_db/index.rb', line 18
def bucket
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|
#idx ⇒ Object
14
15
16
|
# File 'lib/mem_db/index.rb', line 14
def idx
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|
#query(_query, out: MemDB::Out.new) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
27
28
29
|
# File 'lib/mem_db/index.rb', line 27
def query(_query, out: MemDB::Out.new)
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|