るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Matrix#entrywise_product(m) -> Matrix (9208.0)

アダマール積(要素ごとの積)を返します。

...ダマール積(要素ごとの積)を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。

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

Matrix
[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//}...

Matrix#antisymmetric? -> bool (9108.0)

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

... true を返します。

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

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

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

Mat...
...rix[[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#hadamard_product(m) -> Matrix (9108.0)

アダマール積(要素ごとの積)を返します。

...ダマール積(要素ごとの積)を返します。

@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。

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

Matrix
[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//}...

Matrix#skew_symmetric? -> bool (9108.0)

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

... true を返します。

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

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

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

Mat...
...rix[[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#tr -> Integer | Float | Rational | Complex (9108.0)

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

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

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

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

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

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

絞り込み条件を変える

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

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

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

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

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

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

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

Vector#covector -> Matrix (9108.0)

Matrix オブジェクトへ変換します。

...Matrix オブジェクトへ変換します。

列ベクトル (行列)、すなわち、(n, 1) 型の行列に変換します。
実際には Matrix.row_vector(self) を適用します。

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

v = Vector[2, 3, 5]
p v # => Vector[2, 3, 5]
m = v.covector
p m # => M...
...atrix[[2, 3, 5]]
//}...

Vector#elements_to_f -> Vector (9108.0)

ベクトルの各成分をFloatに変換したベクトルを返します。

...ベクトルの各成分をFloatに変換したベクトルを返します。

このメソッドは deprecated です。 map(&:to_f) を使ってください。

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

v = Vector.elements([2, 3, 5, 7, 9])
p v.elements_to_f
# => Vector[2.0, 3.0, 5.0, 7.0, 9.0]
//}...

Vector#elements_to_i -> Vector (9108.0)

ベクトルの各成分をIntegerに変換したベクトルを返します。

...ベクトルの各成分をIntegerに変換したベクトルを返します。

このメソッドは deprecated です。 map(&:to_i) を使ってください。

//emlist[例][ruby]{
require 'matrix'
v = Vector.elements([2.5, 3.0, 5.01, 7])
p v.elements_to_i
# => Vector[2, 3, 5, 7]
//}...

Vector#elements_to_r -> Vector (9108.0)

ベクトルの各成分をRationalに変換したベクトルを返します。

...クトルの各成分をRationalに変換したベクトルを返します。

このメソッドは deprecated です。 map(&:to_r) を使ってください。

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

v = Vector.elements([2.5, 3.0, 5.75, 7])
p v.elements_to_r
# => Vector[(5/2), (3/1), (23/4), (7/1)...

絞り込み条件を変える

<< 1 2 3 ... > >>