るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Matrix#lup -> Matrix::LUPDecomposition (23357.0)

行列の LUP 分解を保持したオブジェクトを返します。

...の LUP 分解を保持したオブジェクトを返します。

Matrix
::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [L, U, P] と書くと、
L*U = P*s...
...します。

//emlist[例][ruby]{
require 'matrix'
a = Matrix[[1, 2], [3, 4]]
l, u, p = a.lup
l.lower_triangular? # => true
u
.upper_triangular? # => true
p.permutation? # => true
l * u == p * a # => true
a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
//}

@see Matrix::LUPDecomposition...

Matrix#lup_decomposition -> Matrix::LUPDecomposition (23357.0)

行列の LUP 分解を保持したオブジェクトを返します。

...の LUP 分解を保持したオブジェクトを返します。

Matrix
::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [L, U, P] と書くと、
L*U = P*s...
...します。

//emlist[例][ruby]{
require 'matrix'
a = Matrix[[1, 2], [3, 4]]
l, u, p = a.lup
l.lower_triangular? # => true
u
.upper_triangular? # => true
p.permutation? # => true
l * u == p * a # => true
a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
//}

@see Matrix::LUPDecomposition...

Matrix.columns(columns) -> Matrix (23338.0)

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

...columns を列ベクトルの集合とする行列を生成します。

@param columns 配列の配列を渡します。

=== 注意

Matrix
.rows との違いは引数として渡す配列の配列を列ベクトルの配列とみなして行列を生成します。

//emlist[例][ruby]{
require '...
...
m = Matrix.rows([a1, a2, a3], true)
p m # => Matrix[[1, 2, 3], [4, 5, 6], [-1, -2, -3]]
# 行列としてのイメージ => [ 1, 2, 3]
# [ 4, 5, 6]
# [-1, -2, -3]

# 配列を列ベクトルとして生成
m = Matrix.columns([a1,...
...a2, a3])
p m # => Matrix[[1, 4, -1], [2, 5, -2], [3, 6, -3]]
# 行列としてのイメージ => [1, 4, -1]
# [2, 5, -2]
# [3, 6, -3]
//}...

Matrix.column_vector(column) -> Matrix (23302.0)

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

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

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

Matrix.build(row_size, column_size = row_size) {|row, col| ... } -> Matrix (23232.0)

row_size×column_sizeの行列をブロックの返り値から生成します。

...lumn_sizeの行列をブロックの返り値から生成します。

行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
m = Matrix...
....build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}

@param row_size 行列の行数
@param column_size 行列の列数...

絞り込み条件を変える

Matrix#entrywise_product(m) -> Matrix (23227.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#hadamard_product(m) -> Matrix (23227.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#adjugate -> Matrix (23226.0)

余因子行列を返します。

...余因子行列を返します。

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

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

Matrix#round(ndigits = 0) -> Matrix (23202.0)

行列の各要素を指定した桁数で丸めた行列を返します。

...行列の各要素を指定した桁数で丸めた行列を返します。

@see Float#round...

Matrix.build(row_size, column_size = row_size) -> Enumerable (23132.0)

row_size×column_sizeの行列をブロックの返り値から生成します。

...lumn_sizeの行列をブロックの返り値から生成します。

行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
m = Matrix...
....build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
//}

@param row_size 行列の行数
@param column_size 行列の列数...

絞り込み条件を変える

<< 1 2 3 ... > >>