Module: RObject::Helper::MatrixMultiply

Included in:
Matrix, Vector
Defined in:
lib/robject/helper.rb

Instance Method Summary collapse

Instance Method Details

#*(val) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/robject/helper.rb', line 4

def * val
  if val.respond_to?(:is_robj_matrix_multiply?) && val.is_robj_matrix_multiply?
    R['%*%'].call self, val
  else
    super
  end
end

#is_robj_matrix_multiply?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/robject/helper.rb', line 12

def is_robj_matrix_multiply?
  true
end