るりまサーチ

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

別のキーワード

  1. matrix []
  2. matrix map
  3. matrix each
  4. matrix index

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Matrix#*(m) -> Matrix | Vector (35202.0)

self に行列またはベクトル m を右から乗じた行列を返します。

...を返します。

m が Vector オブジェクトなら返り値も Vector オブジェクトになります。

@param m 右からの乗算が定義可能な行列やベクトルを指定します。

@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します...

Matrix#*(other) -> Matrix (35202.0)

self の各成分に数 other を掛けた行列を返します。

self の各成分に数 other を掛けた行列を返します。

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

Vector#*(m) -> Matrix (26258.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 (26113.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]
//}...

Matrix#**(n) -> Matrix (23201.0)

self の n 乗を返します。

...self の n 乗を返します。

@param n べき数の指定
@raise ExceptionForMatrix::ErrNotRegular n が 0 以下で、行列が正則でない場合に発生します...

絞り込み条件を変える

Matrix.combine(*matrices) {|*elements| ... } -> Matrix (17253.0)

要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

...ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[6, 6], [4, 4]]
y = Matrix[[1, 2], [3, 4]]
Matrix
.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
//}

@param matrices 並べる行列。すべて...
...の行列の行数と列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します
@see Matrix#combine...

Matrix#hstack(*matrices) -> Matrix (17249.0)

行列 self と matrices を横に並べた行列を生成します。

...self と matrices を横に並べた行列を生成します。

Matrix
.hstack(self, *matrices) と同じです。

//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}

@param matrices 並べる行列。...
...すべての行列の行数がselfの行数と一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行数の異なる行列がある場合に発生します

@see Matrix.hstack, Matrix#vstack...

Matrix.hstack(*matrices) -> Matrix (17243.0)

行列 matrices を横に並べた行列を生成します。

...[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
Matrix
.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}

@param matrices 並べる行列。すべての行列の行数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch...
...行数の異なる行列がある場合に発生します
@see Matrix.vstack, Matrix#hstack...

Matrix.vstack(*matrices) -> Matrix (17243.0)

行列 matrices を縦に並べた行列を生成します。

...][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
Matrix
.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
//}

@param matrices 並べる行列。すべての行列の列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch...
...列数の異なる行列がある場合に発生します
@see Matrix.hstack, Matrix#vstack...

Matrix#combine(*matrices) {|*elements| ... } -> Matrix (17235.0)

要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

...要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。

Matrix
.combine(self, *matrices) { ... } と同じです。

@see Matrix.combine...

絞り込み条件を変える

<< 1 2 3 ... > >>