Class: FunctionMap
- Inherits:
-
Object
- Object
- FunctionMap
- Defined in:
- lib/mdarray/function_map.rb
Instance Attribute Summary collapse
-
#arity ⇒ Object
readonly
arity of the function: 1 or 2.
-
#description ⇒ Object
Returns the value of attribute description.
-
#elmtwise ⇒ Object
readonly
set to true if function applies to all elmts of the array.
-
#function ⇒ Object
readonly
function to be applied to elmts.
-
#helper ⇒ Object
readonly
Helper method to perform the function.
-
#input1_type ⇒ Object
readonly
Returns the value of attribute input1_type.
-
#input2_type ⇒ Object
readonly
Returns the value of attribute input2_type.
-
#is_global ⇒ Object
readonly
Returns the value of attribute is_global.
-
#long_name ⇒ Object
readonly
long name of the function.
-
#package ⇒ Object
readonly
package where the function was implemented.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
-
#short_name ⇒ Object
readonly
short name of the function.
Instance Method Summary collapse
-
#initialize(short_name, long_name, package, function, return_type, input1_type, input2_type, arity, helper, elmtwise = true, is_global = false) ⇒ FunctionMap
constructor
————————————————————————————.
Constructor Details
#initialize(short_name, long_name, package, function, return_type, input1_type, input2_type, arity, helper, elmtwise = true, is_global = false) ⇒ FunctionMap
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/mdarray/function_map.rb', line 46 def initialize(short_name, long_name, package, function, return_type, input1_type, input2_type, arity, helper, elmtwise = true, is_global = false) @short_name = short_name @long_name = long_name @package = package @function = function @return_type = return_type @input1_type = input1_type @input2_type = input2_type @arity = arity @helper = helper @elmtwise = elmtwise @is_global = is_global end |
Instance Attribute Details
#arity ⇒ Object (readonly)
arity of the function: 1 or 2
35 36 37 |
# File 'lib/mdarray/function_map.rb', line 35 def arity @arity end |
#description ⇒ Object
Returns the value of attribute description.
40 41 42 |
# File 'lib/mdarray/function_map.rb', line 40 def description @description end |
#elmtwise ⇒ Object (readonly)
set to true if function applies to all elmts of the array. By default set to false
39 40 41 |
# File 'lib/mdarray/function_map.rb', line 39 def elmtwise @elmtwise end |
#function ⇒ Object (readonly)
function to be applied to elmts
31 32 33 |
# File 'lib/mdarray/function_map.rb', line 31 def function @function end |
#helper ⇒ Object (readonly)
Helper method to perform the function
36 37 38 |
# File 'lib/mdarray/function_map.rb', line 36 def helper @helper end |
#input1_type ⇒ Object (readonly)
Returns the value of attribute input1_type.
33 34 35 |
# File 'lib/mdarray/function_map.rb', line 33 def input1_type @input1_type end |
#input2_type ⇒ Object (readonly)
Returns the value of attribute input2_type.
34 35 36 |
# File 'lib/mdarray/function_map.rb', line 34 def input2_type @input2_type end |
#is_global ⇒ Object (readonly)
Returns the value of attribute is_global.
37 38 39 |
# File 'lib/mdarray/function_map.rb', line 37 def is_global @is_global end |
#long_name ⇒ Object (readonly)
long name of the function
29 30 31 |
# File 'lib/mdarray/function_map.rb', line 29 def long_name @long_name end |
#package ⇒ Object (readonly)
package where the function was implemented
30 31 32 |
# File 'lib/mdarray/function_map.rb', line 30 def package @package end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
32 33 34 |
# File 'lib/mdarray/function_map.rb', line 32 def return_type @return_type end |
#short_name ⇒ Object (readonly)
short name of the function
28 29 30 |
# File 'lib/mdarray/function_map.rb', line 28 def short_name @short_name end |