るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. tracepoint self
  4. _builtin self
  5. codeobject document_self

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

Array#repeated_combination(n) -> Enumerator (14.0)

サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。

...
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result << e} # => [1,2,3]
result #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
//}

@see Array#repeated_permutation, Array#combi...

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

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

...できます。これを [L, U, P] と書くと、
L*U = P*self を満たします。

//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(...

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

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

...できます。これを [L, U, P] と書くと、
L*U = P*self を満たします。

//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(...
<< < 1 2 >>