るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.086秒)

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric -@
  4. numeric %
  5. numeric i

ライブラリ

キーワード

  • * (24)
  • / (12)

検索結果

Vector#/(other) -> Vector (20.0)

self の各要素を数 other で割ったベクトルを返します。

...self の各要素を数 other で割ったベクトルを返します。

@
param other self の各要素を割る Numeric オブジェクトを指定します。
@
raise ExceptionForMatrix::ErrOperationNotDefined other が Vector や Matrix
の場合に発生します...

Vector#*(m) -> Matrix (16.0)

自分自身を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。

...身を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。

@
param m 右から乗算を行う行列
@
raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に...
...発生します

=== 注意

引数の行列 m は自分自身を列ベクトルとした場合に乗算が定義できる行列である必要があります。

//emlist[例][ruby]{
require 'matrix'

v = Vector[1, 2]
a = [4, 5, 6]
m = Matrix[a]

p v * m # => Matrix[[4, 5, 6], [8, 10, 12]]
//}...

Vector#*(other) -> Vector (16.0)

self の各要素に数 other を乗じたベクトルを返します。

...クトルを返します。

@
param other self の各要素に掛ける Numeric オブジェクトを指定します。

//emlist[例][ruby]{
require 'matrix'
a = [1, 2, 3.5, 100]
v1 = Vector.elements(a)
p v1.*(2) # => Vector[2, 4, 7.0, 200]
p v1.*(-1.5) # => Vector[-1.5, -3.0, -5.25, -150.0]
/...