Module: NArrayMethod

Defined in:
ext/numo/narray/gen/narray_def.rb

Instance Method Summary collapse

Instance Method Details

#accum(meth, dtype, result_class) ⇒ Object



51
52
53
54
# File 'ext/numo/narray/gen/narray_def.rb', line 51

def accum(meth, dtype, result_class)
  h = {dtype:dtype, result_class:result_class}
  def_method(meth, "accum", **h)
end

#accum_arg(meth) ⇒ Object



60
61
62
# File 'ext/numo/narray/gen/narray_def.rb', line 60

def accum_arg(meth)
  def_method(meth, "accum_arg")
end

#accum_binary(meth, ope = nil) ⇒ Object



68
69
70
71
# File 'ext/numo/narray/gen/narray_def.rb', line 68

def accum_binary(meth, ope=nil)
  ope = meth if ope.nil?
  def_method(meth, "accum_binary", op:ope)
end

#accum_index(meth) ⇒ Object



56
57
58
# File 'ext/numo/narray/gen/narray_def.rb', line 56

def accum_index(meth)
  def_method(meth, "accum_index")
end

#binary(meth, ope = nil) ⇒ Object



5
6
7
8
# File 'ext/numo/narray/gen/narray_def.rb', line 5

def binary(meth, ope=nil)
  ope = meth if ope.nil?
  def_method(meth, "binary", op:ope)
end

#binary2(meth, ope = nil) ⇒ Object



10
11
12
13
# File 'ext/numo/narray/gen/narray_def.rb', line 10

def binary2(meth, ope=nil)
  ope = meth if ope.nil?
  def_method(meth, "binary2", op:ope)
end

#bit_count(meth) ⇒ Object



42
43
44
# File 'ext/numo/narray/gen/narray_def.rb', line 42

def bit_count(meth)
  def_method(meth, "bit_count")
end

#bit_reduce(meth, init_bit) ⇒ Object



46
47
48
49
# File 'ext/numo/narray/gen/narray_def.rb', line 46

def bit_reduce(meth, init_bit)
  h = {init_bit:init_bit}
  def_method(meth, "bit_reduce", **h)
end

#cond_binary(meth, op = nil) ⇒ Object



33
34
35
36
# File 'ext/numo/narray/gen/narray_def.rb', line 33

def cond_binary(meth,op=nil)
  op = meth unless op
  def_method(meth, "cond_binary", op:op)
end

#cond_unary(meth) ⇒ Object



38
39
40
# File 'ext/numo/narray/gen/narray_def.rb', line 38

def cond_unary(meth)
  def_method(meth, "cond_unary")
end

#cum(meth, cmacro) ⇒ Object



64
65
66
# File 'ext/numo/narray/gen/narray_def.rb', line 64

def cum(meth, cmacro)
  def_method(meth, "cum", cmacro:cmacro)
end

#powObject



19
20
21
# File 'ext/numo/narray/gen/narray_def.rb', line 19

def pow
  def_method("pow", "pow", op:"**")
end

#qsort(type_name, dtype, dcast, suffix = "") ⇒ Object



73
74
75
76
# File 'ext/numo/narray/gen/narray_def.rb', line 73

def qsort(type_name, dtype, dcast, suffix="")
  h = {type_name:type_name, dtype:dtype, dcast:dcast, suffix:suffix}
  def_method("qsort", **h)
end

#set2(meth, dtype, result_class) ⇒ Object



28
29
30
31
# File 'ext/numo/narray/gen/narray_def.rb', line 28

def set2(meth, dtype, result_class)
  h = {dtype:dtype, result_class:result_class}
  def_method(meth, "set2", **h)
end

#unary(meth, ope = nil) ⇒ Object



15
16
17
# File 'ext/numo/narray/gen/narray_def.rb', line 15

def unary(meth, ope=nil)
  def_method(meth, "unary", op:ope)
end

#unary2(meth, dtype, result_class) ⇒ Object



23
24
25
26
# File 'ext/numo/narray/gen/narray_def.rb', line 23

def unary2(meth, dtype, result_class)
  h = {dtype:dtype, result_class:result_class}
  def_method(meth, "unary2", **h)
end