Class: RubyAi::Search::Core::Frontier
- Inherits:
-
Object
- Object
- RubyAi::Search::Core::Frontier
show all
- Defined in:
- lib/ruby_ai/search/core/frontier.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Frontier.
8
9
10
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 8
def initialize
@store = []
end
|
Instance Attribute Details
#store ⇒ Object
Returns the value of attribute store.
6
7
8
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 6
def store
@store
end
|
Instance Method Details
#append(element:) ⇒ Object
12
13
14
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 12
def append(element:)
raise NotImplementedError
end
|
#empty? ⇒ Boolean
24
25
26
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 24
def empty?
@store.empty?
end
|
#include?(element:) ⇒ Boolean
28
29
30
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 28
def include?(element:)
@store.include?(element)
end
|
#pop ⇒ Object
16
17
18
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 16
def pop
raise NotImplementedError
end
|
#size ⇒ Object
20
21
22
|
# File 'lib/ruby_ai/search/core/frontier.rb', line 20
def size
@store.size
end
|