Class: CVFFI::FloatArrayCommon

Inherits:
NiceFFI::Struct
  • Object
show all
Includes:
Enumerable
Defined in:
lib/opencv-ffi-wrappers/vectors.rb

Direct Known Subclasses

Float128, Float64

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enumerable

#inject_with_index

Class Attribute Details

.nElemObject

Returns the value of attribute nElem.



9
10
11
# File 'lib/opencv-ffi-wrappers/vectors.rb', line 9

def nElem
  @nElem
end

Instance Method Details

#eachObject



14
15
16
17
18
# File 'lib/opencv-ffi-wrappers/vectors.rb', line 14

def each
  nElem.times { |i|
    yield d[i]
  }
end

#nElemObject Also known as: length



11
# File 'lib/opencv-ffi-wrappers/vectors.rb', line 11

def nElem; self.class.nElem; end