るりまサーチ

最速Rubyリファレンスマニュアル検索!
1426件ヒット [1-100件を表示] (0.091秒)
トップページ > クエリ:r[x] > クラス:Matrix[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Matrix#antisymmetric? -> bool (9101.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
r
equire 'matrix'

Matrix
[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix
.empty.antisymmetric? # => true

Matr...
...ix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix
[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix
[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

Matrix#lower_triangular? -> bool (9101.0)

行列が下三角行列ならば true を返します。

...行列が下三角行列ならば true を返します。...

Matrix#skew_symmetric? -> bool (9101.0)

行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。

...true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します

//emlist[][ruby]{
r
equire 'matrix'

Matrix
[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix
.empty.antisymmetric? # => true

Matr...
...ix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix
[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix
[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}...

Matrix#symmetric? -> bool (9101.0)

行列が対称ならば true を返します。

...行列が対称ならば true を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します...

Matrix#upper_triangular? -> bool (9101.0)

行列が上三角行列ならば true を返します。

...行列が上三角行列ならば true を返します。...

絞り込み条件を変える

Matrix#tr -> Integer | Float | Rational | Complex (6201.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
r
equire 'matrix'
Matrix
[[7,6], [3,9]].trace # => 16
//}

trace は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...

Matrix#trace -> Integer | Float | Rational | Complex (6201.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
r
equire 'matrix'
Matrix
[[7,6], [3,9]].trace # => 16
//}

trace は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...

Matrix.row_vector(row) -> Matrix (6201.0)

要素がrowの(1,n)型の行列(行ベクトル)を生成します。

...要素がrowの(1,n)型の行列(行ベクトル)を生成します。

@param row (1,n)型の行列として生成するVector Array オブジェクト...

Matrix.rows(rows, copy = true) -> Matrix (6201.0)

引数 rows を行ベクトルの列とする行列を生成します。

...引数 rows を行ベクトルの列とする行列を生成します。

引数 copy が偽(false)ならば、rows の複製を行いません。

//emlist[例][ruby]{
r
equire 'matrix'

a1 = [1, 2, 3]
a2 = [10, 15, 20]

m = Matrix.rows([a1, a2], false) # 配列を複製せずに行列を生成
p m...
...# => Matrix[[1, 2, 3], [10, 15, 20]]
a2[1] = 1000 # 配列のデータを変更
p m # => Matrix[[1, 2, 3], [10, 1000, 20]]
//}

@param rows 配列の配列
@param copy 配列を複製するかどうかを真偽値で指定...

Matrix.zero(row, column) -> Matrix (6201.0)

row × column の零行列(要素が全て 0 の行列)を生成して返します。

...
r
ow × column の零行列(要素が全て 0 の行列)を生成して返します。

//emlist[例][ruby]{
r
equire 'matrix'
p Matrix.zero(2, 3) #=> Matrix[[0, 0, 0], [0, 0, 0]]
//}

@param row 生成する行列の行数
@param column 生成する行列の列数...

絞り込み条件を変える

<< 1 2 3 ... > >>