Class: Hornetseye::INT_
Overview
Class for representing native integers
Constant Summary
Class Attribute Summary (collapse)
-
+ (Integer) bits
Number of bits of this integer.
-
+ (Boolean) signed
Boolean indicating whether this is a signed integer or not.
Class Method Summary (collapse)
-
+ (Boolean) ==(other)
Test equality of classes.
- + (Object) inherit(bits, signed)
-
+ (String) inspect
Get string with information about this class.
Methods inherited from Element
Methods inherited from Node
#<=>, ===, #[], #[]=, #allocate, #b=, #b_with_decompose, #basetype, #between?, bool, #check_shape, #clip, coercion_bool, coercion_byte, coercion_maxint, #collect, #components, cond, #conditional, #convolve, #decompose, #dilate, #dimension, dimension, #downsample, #dup, #each, #empty?, #eq_with_multiarray, #erode, #fill!, #flip, float_scalar, floating, #fmod_with_float, #g=, #g_with_decompose, #gauss_blur, #gauss_gradient, #height, #histogram, #histogram_with_rgb, #if, #if_else, #imag=, #imag_with_decompose, indgen, #inject, #inspect, #integral, #lut, #lut_with_rgb, #mask, #matched?, #max, #mean, #memorise, #memory, #min, #normalise, #prod, #r=, #r_with_decompose, #range, #real=, #real_with_decompose, #reshape, #rgb?, rgb?, #roll, scalar, shape, #shape, #shift, #size, #sobel, #stretch, #sum, #swap_rgb_with_scalar, #to_a, #to_type, to_type, #to_type_with_identity, #to_type_with_rgb, #transpose, #typecode, typecode, #unmask, #unroll, #warp, #width
Constructor Details
This class inherits a constructor from Hornetseye::Element
Class Attribute Details
+ (Integer) bits
Number of bits of this integer
28 29 30 |
# File 'lib/multiarray/int.rb', line 28 def bits @bits end |
+ (Boolean) signed
Boolean indicating whether this is a signed integer or not
signed integer or not.
34 35 36 |
# File 'lib/multiarray/int.rb', line 34 def signed @signed end |
Class Method Details
+ (Boolean) ==(other)
Test equality of classes
175 176 177 178 |
# File 'lib/multiarray/int.rb', line 175 def ==( other ) other.is_a? Class and other < INT_ and bits == other.bits and signed == other.signed end |
+ (Object) inherit(bits, signed)
36 37 38 39 40 41 |
# File 'lib/multiarray/int.rb', line 36 def inherit(bits, signed) retval = Class.new self retval.bits = bits retval.signed = signed retval end |
+ (String) inspect
Get string with information about this class
146 147 148 149 150 151 152 153 |
# File 'lib/multiarray/int.rb', line 146 def inspect unless bits.nil? or signed.nil? IDENTIFIER[ [ bits, signed ] ] || "INT(#{bits.inspect},#{ signed ? 'SIGNED' : 'UNSIGNED' })" else super end end |