*(x)
public
Multiplies the vector by x, where x is a number or
another vector.
Show source
def *(x)
case x
when Numeric
els = @elements.collect{|e| e * x}
Vector.elements(els, false)
when Matrix
Matrix.column_vector(self) * x
else
s, x = x.coerce(self)
s * x
end
end