Class: Hornetseye::BOOL
Overview
Class for representing native booleans
Defined Under Namespace
Modules: Match
Class Method Summary collapse
-
.default ⇒ Object
Get default value for elements of this type.
-
.descriptor(hash) ⇒ String
Get unique descriptor of this class.
-
.directive ⇒ String
Directive for packing/unpacking elements of this type.
-
.fetch(ptr) ⇒ BOOL
Retrieve element from memory.
-
.inspect ⇒ String
Get string with information about this class.
-
.memory_type ⇒ Class
Memory type required to store elements of this type.
-
.storage_size ⇒ Integer
Get storage size to store an element of this type.
Instance Method Summary collapse
-
#write(ptr) ⇒ BOOL
Write element to memory.
Methods inherited from Element
#assign, coercion, #compilable?, construct, #descriptor, #dup, #get, #initialize, #skip, #strip, #values
Methods inherited from Node
#+@, #<=>, ===, #[], #[]=, #allocate, #b=, #b_with_decompose, #basetype, basetype, #between?, bool, byte, #check_shape, #clip, #coerce, coercion_bool, coercion_byte, coercion_maxint, #collect, #compilable?, compilable?, #components, cond, #conditional, #convolve, #decompose, define_binary_op, define_unary_op, #demand, #descriptor, #diagonal, #dilate, dimension, #dimension, #downsample, #dup, #each, #empty?, #eq_with_multiarray, #erode, #fill!, finalised?, #finalised?, #flip, float, float_scalar, floating, #fmod_with_float, #force, #g=, #g_with_decompose, #gauss_blur, #gauss_gradient, #get, #height, #histogram, #histogram_with_rgb, identity, #if, #if_else, #imag=, #imag_with_decompose, indgen, #inject, #inspect, #integral, #lut, #lut_with_rgb, #malloc, #mask, match, #matched?, #max, maxint, #mean, #memorise, #memory, #min, #normalise, #prod, #r=, #r_with_decompose, #range, #real=, #real_with_decompose, #reshape, #rgb?, rgb?, #roll, scalar, #shape, shape, #shift, #simplify, #size, #sobel, #stretch, #stride, #strides, #strip, strip, #subst, subst, #sum, #swap_rgb_with_scalar, #table, #to_a, #to_s, to_s, #to_type, to_type, #to_type_with_identity, #to_type_with_rgb, #transpose, #typecode, typecode, typecodes, #unmask, #unroll, #variables, variables, #warp, #width
Methods included from Field_::Match
Methods included from FLOAT_::Match
Methods included from OBJECT::Match
Methods included from COMPLEX_::Match
Methods included from Match
Methods included from RGB_::Match
Methods included from INT_::Match
Constructor Details
This class inherits a constructor from Hornetseye::Element
Class Method Details
.default ⇒ Object
Get default value for elements of this type
79 80 81 |
# File 'lib/multiarray/bool.rb', line 79 def default false end |
.descriptor(hash) ⇒ String
Get unique descriptor of this class
39 40 41 |
# File 'lib/multiarray/bool.rb', line 39 def descriptor( hash ) inspect end |
.directive ⇒ String
Directive for packing/unpacking elements of this type
88 89 90 |
# File 'lib/multiarray/bool.rb', line 88 def directive 'c' end |
.fetch(ptr) ⇒ BOOL
Retrieve element from memory
52 53 54 |
# File 'lib/multiarray/bool.rb', line 52 def fetch( ptr ) new ptr.load( self ).first.ne( 0 ) end |
.inspect ⇒ String
Get string with information about this class
28 29 30 |
# File 'lib/multiarray/bool.rb', line 28 def inspect 'BOOL' end |
.memory_type ⇒ Class
Memory type required to store elements of this type
61 62 63 |
# File 'lib/multiarray/bool.rb', line 61 def memory_type Malloc end |
.storage_size ⇒ Integer
Get storage size to store an element of this type
70 71 72 |
# File 'lib/multiarray/bool.rb', line 70 def storage_size 1 end |