Class: Contrek::Concurrent::Sequence
- Inherits:
-
Object
- Object
- Contrek::Concurrent::Sequence
- Includes:
- Queueable
- Defined in:
- lib/contrek/finder/concurrent/sequence.rb
Instance Attribute Summary collapse
-
#shape ⇒ Object
Returns the value of attribute shape.
Attributes included from Queueable
Instance Method Summary collapse
Methods included from Queueable
#add, #each, #forward!, #initialize, #iterator, #map, #move_from, #next_of!, #pop!, #rem, #reverse_each, #rewind!, #to_a
Instance Attribute Details
#shape ⇒ Object
Returns the value of attribute shape.
6 7 8 |
# File 'lib/contrek/finder/concurrent/sequence.rb', line 6 def shape @shape end |
Instance Method Details
#get_vector_cache ⇒ Object
20 21 22 |
# File 'lib/contrek/finder/concurrent/sequence.rb', line 20 def get_vector_cache @vector_cache ||= to_a end |
#is_not_vertical ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/contrek/finder/concurrent/sequence.rb', line 9 def is_not_vertical return false if size < 2 x0 = head.payload[:x] rewind! while (position = iterator) return true if position.payload[:x] != x0 forward! end false end |