Class: InfinityNeighbourhood
- Inherits:
-
Object
- Object
- InfinityNeighbourhood
- Defined in:
- lib/cartesius/neighbourhoods.rb
Instance Method Summary collapse
- #include?(value) ⇒ Boolean
-
#initialize(width) ⇒ InfinityNeighbourhood
constructor
A new instance of InfinityNeighbourhood.
Constructor Details
#initialize(width) ⇒ InfinityNeighbourhood
Returns a new instance of InfinityNeighbourhood.
24 25 26 |
# File 'lib/cartesius/neighbourhoods.rb', line 24 def initialize(width) @width = width end |
Instance Method Details
#include?(value) ⇒ Boolean
28 29 30 |
# File 'lib/cartesius/neighbourhoods.rb', line 28 def include?(value) (value < -@width) && (value > @width) end |