Class: FunctionMap

Inherits:
Object
  • Object
show all
Defined in:
lib/mdarray/function_map.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#arityObject (readonly)

arity of the function: 1 or 2


35
36
37
# File 'lib/mdarray/function_map.rb', line 35

def arity
  @arity
end

#descriptionObject

Returns the value of attribute description


40
41
42
# File 'lib/mdarray/function_map.rb', line 40

def description
  @description
end

#elmtwiseObject (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

#functionObject (readonly)

function to be applied to elmts


31
32
33
# File 'lib/mdarray/function_map.rb', line 31

def function
  @function
end

#helperObject (readonly)

Helper method to perform the function


36
37
38
# File 'lib/mdarray/function_map.rb', line 36

def helper
  @helper
end

#input1_typeObject (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_typeObject (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_globalObject (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_nameObject (readonly)

long name of the function


29
30
31
# File 'lib/mdarray/function_map.rb', line 29

def long_name
  @long_name
end

#packageObject (readonly)

package where the function was implemented


30
31
32
# File 'lib/mdarray/function_map.rb', line 30

def package
  @package
end

#return_typeObject (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_nameObject (readonly)

short name of the function


28
29
30
# File 'lib/mdarray/function_map.rb', line 28

def short_name
  @short_name
end