Class: Hornetseye::INDEX_
- Defined in:
- lib/multiarray/index.rb
Class Attribute Summary collapse
-
.size ⇒ Object
Size of range for this index.
Class Method Summary collapse
-
.array_type ⇒ Class
Get type of result of delayed operation.
-
.descriptor(hash) ⇒ String
Get unique descriptor of this class.
-
.inspect ⇒ String
Display information about this class.
-
.strip ⇒ Array<Array,Node>
Strip of all values.
-
.subst(hash) ⇒ Class
Substitute variables.
-
.variables ⇒ Set
Get variables contained in this class.
Instance Method Summary collapse
-
#initialize ⇒ INDEX_
constructor
A new instance of INDEX_.
Methods inherited from Element
coercion, #compilable?, construct, #descriptor, #dup, fetch, #get, #skip, #store, #strip, #values, #write
Methods inherited from Node
===, #[], #[]=, #array_type, basetype, #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?, scalar, #shape, shape, #simplify, #size, #storage_size, #strip, #subst, #to_a, to_s, #to_s, to_type, #typecode, typecode, typecodes, #variables, #width, width
Methods included from FLOAT_::Match
Methods included from OBJECT::Match
Methods included from COMPLEX_::Match
Methods included from Sequence_::Match
Methods included from BOOL::Match
Methods included from RGB_::Match
Methods included from Hornetseye::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
#initialize ⇒ INDEX_
Returns a new instance of INDEX_.
99 100 101 |
# File 'lib/multiarray/index.rb', line 99 def initialize raise "#{self.class.inspect} must not be instantiated" end |
Class Attribute Details
.size ⇒ Object
Size of range for this index
27 28 29 |
# File 'lib/multiarray/index.rb', line 27 def size @size end |
Class Method Details
.array_type ⇒ Class
Get type of result of delayed operation
53 54 55 |
# File 'lib/multiarray/index.rb', line 53 def array_type INT end |
.descriptor(hash) ⇒ String
Get unique descriptor of this class
44 45 46 |
# File 'lib/multiarray/index.rb', line 44 def descriptor( hash ) "INDEX(#{size.descriptor( hash )})" end |
.inspect ⇒ String
Display information about this class
33 34 35 |
# File 'lib/multiarray/index.rb', line 33 def inspect "INDEX(#{size.inspect})" end |
.strip ⇒ Array<Array,Node>
Strip of all values
Split up into variables, values, and a term where all values have been replaced with variables.
values, and the term based on variables.
66 67 68 69 70 71 72 73 |
# File 'lib/multiarray/index.rb', line 66 def strip , = size.strip if .empty? return [], [], self else return , , Hornetseye::INDEX( .first ) end end |
.subst(hash) ⇒ Class
Substitute variables
Substitute the variables with the values given in the hash.
84 85 86 |
# File 'lib/multiarray/index.rb', line 84 def subst( hash ) Hornetseye::INDEX size.subst( hash ) end |
.variables ⇒ Set
Get variables contained in this class
93 94 95 |
# File 'lib/multiarray/index.rb', line 93 def variables size.variables end |