Module: OpenCV::Cv::Vecxi
Instance Method Summary collapse
Instance Method Details
#[](i) ⇒ Object
166 167 168 169 |
# File 'lib/ropencv/ropencv_ruby.rb', line 166 def [](i) raise "Out of bound #{i}" if i < 0 || i >= self.class::SIZE val.get_int(i*FFI.type_size(FFI::Type::INT)) end |
#[]=(i, val0) ⇒ Object
170 171 172 173 |
# File 'lib/ropencv/ropencv_ruby.rb', line 170 def []=(i,val0) raise "Out of bound #{i}" if i < 0 || i >= self.class::SIZE val.put_int(i*FFI.type_size(FFI::Type::INT),val0) end |
#to_a ⇒ Object
174 175 176 |
# File 'lib/ropencv/ropencv_ruby.rb', line 174 def to_a val.get_array_of_int(0,self.class::SIZE) end |