Class: Kumi::FunctionRegistry::Function

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/function_registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases

Returns:

  • (Object)

    the current value of aliases



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def aliases
  @aliases
end

#dtypeObject

Returns the value of attribute dtype

Returns:

  • (Object)

    the current value of dtype



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def dtype
  @dtype
end

#expandObject

Returns the value of attribute expand

Returns:

  • (Object)

    the current value of expand



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def expand
  @expand
end

#folding_class_methodObject

Returns the value of attribute folding_class_method

Returns:

  • (Object)

    the current value of folding_class_method



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def folding_class_method
  @folding_class_method
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def id
  @id
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def kind
  @kind
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def options
  @options
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def params
  @params
end

#reduction_strategyObject

Returns the value of attribute reduction_strategy

Returns:

  • (Object)

    the current value of reduction_strategy



30
31
32
# File 'lib/kumi/function_registry.rb', line 30

def reduction_strategy
  @reduction_strategy
end

Instance Method Details

#dtype_ruleObject



40
41
42
# File 'lib/kumi/function_registry.rb', line 40

def dtype_rule
  @dtype_rule ||= Loader.build_dtype_rule_from_yaml(dtype)
end

#elementwise?Boolean

Returns:

  • (Boolean)


34
# File 'lib/kumi/function_registry.rb', line 34

def elementwise? = kind == :elementwise

#param_namesObject



36
37
38
# File 'lib/kumi/function_registry.rb', line 36

def param_names
  @param_names ||= params.map { |p| p["name"].to_sym }
end

#reduce?Boolean

Returns:

  • (Boolean)


32
# File 'lib/kumi/function_registry.rb', line 32

def reduce? = kind == :reduce

#select?Boolean

Returns:

  • (Boolean)


33
# File 'lib/kumi/function_registry.rb', line 33

def select? = id == SELECT_ID