Class: GSL4r::Block::GSL_Block_Cast

Inherits:
FFI::Struct
  • Object
show all
Includes:
BlockLayout
Defined in:
lib/gsl4r/block.rb

Instance Method Summary collapse

Methods included from BlockLayout

included

Instance Method Details

#lengthObject



76
77
78
# File 'lib/gsl4r/block.rb', line 76

def length
  return self[:size]
end

#set(a) ⇒ Object



84
85
86
# File 'lib/gsl4r/block.rb', line 84

def set( a )
  self[:data].put_array_of_double(0,a)
end

#valuesObject



80
81
82
# File 'lib/gsl4r/block.rb', line 80

def values
  return self[:data].get_array_of_double(0,length)
end