Class: Hornetseye::OBJECT
- Defined in:
- lib/multiarray/object.rb
Overview
Class for representing Ruby objects
Defined Under Namespace
Modules: Match
Class Method Summary collapse
-
.bool ⇒ Class
Get corresponding boolean-based datatype.
-
.coerce(other) ⇒ Array<Node>
Type coercion for native elements.
-
.coercion(other) ⇒ Class
Compute balanced type for binary operation.
-
.compilable? ⇒ Boolean
Check whether this term is compilable.
-
.default ⇒ Object
Get default value for elements of this type.
-
.descriptor(hash) ⇒ String
Get unique descriptor of this class.
-
.float ⇒ Class
Convert to type based on floating point numbers.
-
.inspect ⇒ String
Get string with information about this class.
-
.memory ⇒ Class
Get memory type required to store elements of this type.
-
.storage_size ⇒ Integer
Get storage size to store an element of this type.
Methods inherited from Element
#compilable?, construct, #descriptor, #dup, fetch, #get, #initialize, #skip, #store, #strip, #values, #write
Methods inherited from Node
===, #[], #[]=, #array_type, array_type, basetype, #basetype, byte, #check_shape, #coerce, coercion_bool, coercion_byte, coercion_maxint, #compilable?, cond, contiguous, #decompose, #demand, #descriptor, dimension, #dimension, #dup, empty?, #empty?, #finalised?, finalised?, float_scalar, floating, #force, #get, height, #height, indgen, #inspect, match, maxint, #memory, pointer_type, #pointer_type, #rgb?, rgb?, scalar, #shape, shape, #simplify, #size, size, #storage_size, strip, #strip, subst, #subst, #to_a, to_s, #to_s, to_type, #typecode, typecode, typecodes, variables, #variables, #width, width
Methods included from FLOAT_::Match
Methods included from Match
Methods included from 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 Method Details
.bool ⇒ Class
Get corresponding boolean-based datatype
99 100 101 |
# File 'lib/multiarray/object.rb', line 99 def bool self end |
.coerce(other) ⇒ Array<Node>
Type coercion for native elements
92 93 94 |
# File 'lib/multiarray/object.rb', line 92 def coerce( other ) return self, self end |
.coercion(other) ⇒ Class
Compute balanced type for binary operation
79 80 81 82 83 84 85 |
# File 'lib/multiarray/object.rb', line 79 def coercion( other ) if other < Sequence_ other.coercion self else self end end |
.compilable? ⇒ Boolean
Check whether this term is compilable
117 118 119 |
# File 'lib/multiarray/object.rb', line 117 def compilable? false end |
.default ⇒ Object
Get default value for elements of this type
68 69 70 |
# File 'lib/multiarray/object.rb', line 68 def default nil end |
.descriptor(hash) ⇒ String
Get unique descriptor of this class
39 40 41 |
# File 'lib/multiarray/object.rb', line 39 def descriptor( hash ) inspect end |
.float ⇒ Class
Convert to type based on floating point numbers
108 109 110 |
# File 'lib/multiarray/object.rb', line 108 def float OBJECT end |
.inspect ⇒ String
Get string with information about this class
28 29 30 |
# File 'lib/multiarray/object.rb', line 28 def inspect 'OBJECT' end |
.memory ⇒ Class
Get memory type required to store elements of this type
50 51 52 |
# File 'lib/multiarray/object.rb', line 50 def memory List end |
.storage_size ⇒ Integer
Get storage size to store an element of this type
59 60 61 |
# File 'lib/multiarray/object.rb', line 59 def storage_size 1 end |