Class: Hornetseye::Composite
- Defined in:
- lib/multiarray/composite.rb
Overview
Base class for composite types
Class Attribute Summary collapse
-
.element_type ⇒ Class
Access element type of composite type.
-
.num_elements ⇒ Integer
Get number of elements of composite type.
Class Method Summary collapse
-
.basetype ⇒ Class
Base type of this data type.
-
.descriptor(hash) ⇒ String
Get unique descriptor of this class.
-
.directive ⇒ String
Directive for packing/unpacking elements of this type.
-
.memory ⇒ Class
Memory type required to store elements of this type.
-
.scalar ⇒ Class
Scalar type to this type.
-
.storage_size ⇒ Integer
Get storage size to store an element of this type.
-
.typecodes ⇒ Array<Class>
Get list of types of composite type.
Methods inherited from Element
coercion, #compilable?, construct, #descriptor, #dup, fetch, #get, #initialize, #skip, #store, #strip, #values, #write
Methods inherited from Node
===, #[], #[]=, array_type, #array_type, #basetype, bool, byte, #check_shape, #coerce, coercion_bool, coercion_byte, coercion_maxint, #compilable?, compilable?, cond, contiguous, #decompose, #demand, #descriptor, dimension, #dimension, #dup, #empty?, empty?, #finalised?, finalised?, float, float_scalar, floating, #force, #get, height, #height, indgen, #inspect, match, maxint, #memory, #pointer_type, pointer_type, rgb?, #rgb?, #shape, shape, #simplify, #size, size, #storage_size, strip, #strip, subst, #subst, #to_a, to_s, #to_s, to_type, #typecode, typecode, variables, #variables, #width, width
Methods included from FLOAT_::Match
Methods included from OBJECT::Match
Methods included from Hornetseye::COMPLEX_::Match
Methods included from Sequence_::Match
Methods included from BOOL::Match
Methods included from RGB_::Match
Methods included from INT_::Match
Methods included from Operations
#+@, #<=>, #b=, #b_with_decompose, #collect, #conditional, #convolve, define_binary_op, define_unary_op, #diagonal, #eq_with_multiarray, #fill!, #g=, #g_with_decompose, #histogram, #histogram_with_composite, #imag=, #imag_with_decompose, #inject, #integral, #lut, #lut_with_composite, #max, #min, #normalise, #product, #r=, #r_with_decompose, #range, #real=, #real_with_decompose, #roll, #sum, #to_type, #to_type_with_rgb, #transpose, #unroll
Constructor Details
This class inherits a constructor from Hornetseye::Element
Class Attribute Details
.element_type ⇒ Class
Access element type of composite type
28 29 30 |
# File 'lib/multiarray/composite.rb', line 28 def element_type @element_type end |
.num_elements ⇒ Integer
Get number of elements of composite type
33 34 35 |
# File 'lib/multiarray/composite.rb', line 33 def num_elements @num_elements end |
Class Method Details
.basetype ⇒ Class
Base type of this data type
82 83 84 |
# File 'lib/multiarray/composite.rb', line 82 def basetype element_type end |
.descriptor(hash) ⇒ String
Get unique descriptor of this class
69 70 71 72 73 74 75 |
# File 'lib/multiarray/composite.rb', line 69 def descriptor( hash ) unless element_type.nil? inspect else super end end |
.directive ⇒ String
Directive for packing/unpacking elements of this type
58 59 60 |
# File 'lib/multiarray/composite.rb', line 58 def directive element_type.directive * num_elements end |
.memory ⇒ Class
Memory type required to store elements of this type
40 41 42 |
# File 'lib/multiarray/composite.rb', line 40 def memory element_type.memory end |
.scalar ⇒ Class
Scalar type to this type
100 101 102 |
# File 'lib/multiarray/composite.rb', line 100 def scalar element_type end |
.storage_size ⇒ Integer
Get storage size to store an element of this type
49 50 51 |
# File 'lib/multiarray/composite.rb', line 49 def storage_size element_type.storage_size * num_elements end |
.typecodes ⇒ Array<Class>
Get list of types of composite type
91 92 93 |
# File 'lib/multiarray/composite.rb', line 91 def typecodes [ element_type ] * num_elements end |