Class: InfinityNeighbourhood

Inherits:
Object
  • Object
show all
Defined in:
lib/cartesius/neighbourhoods.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


28
29
30
# File 'lib/cartesius/neighbourhoods.rb', line 28

def include?(value)
  (value < -@width) && (value > @width)
end