るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 > >>

StringScanner#pos -> Integer (15150.0)

現在のスキャンポインタのインデックスを返します。

...デックスを返します。

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

s = StringScanner.new('test string')
s.pos # => 0
s.scan(/\w+/) # => "test"
s.pos # => 4
s.scan(/\w+/) # => nil
s.pos # => 4
s.scan(/\s+/) # => " "
s.pos # => 5
//}

@
see StringScanner#charpos...

StringIO#pos=(n) (6138.0)

自身の位置を n に移動します。自身が表す文字列のサイズより大きくても構いません。

...イズより大きくても構いません。

@
param n 自身の位置を整数で指定します。

@
raise Errno::EINVAL n がマイナスである場合に発生します。

//emlist[例][ruby]{
require
"stringio"
a = StringIO.new("hoge", 'r+')
a.pos = 10
a << 'Z'
a.string...

StringScanner#charpos -> Integer (6137.0)

現在のスキャンポインタのインデックスを文字単位で返します。

...キャンポインタのインデックスを文字単位で返します。

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

s = StringScanner.new("abcädeföghi")
s.charpos # => 0
s.scan_until(/ä/) # => "abcä"
s.pos # => 5
s.charpos # => 4
//}

@
see StringScanner#pos...

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

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

...trix::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [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([2, 5]) # => Vector[(1/1), (1/2)]
//}

@
see Matrix::LUPDecomposition...

StringScanner#pos=(n) (3162.0)

スキャンポインタのインデックスを n にセットします。

...トします。

@
param n 整数で、バイト単位で指定します。
負数を指定すると文字列の末尾からのオフセットとして扱います。
@
raise RangeError マッチ対象の文字列の長さを超える値を指定すると発生します。

@
return n を返...
...ist[例][ruby]{
require
'strscan'

s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\w+/) # => "est"
p s.pos = 7 # => 7
p s.scan(/\w+/) # => "ring"

begin
s.pos = 20
rescue RangeError => err
puts err #=> index out of range
end
p s.pos = -4...

絞り込み条件を変える

Matrix::LUPDecomposition#solve(b) -> Vector | Matrix (3025.0)

self が正方行列 A の LUP 分解の時、一次方程式 Ax = b の解を返します。 b には Vector, Matrix, 数値の配列を指定出来ます。

...ばなりません。
返り値は b が行列なら行列、それ以外はベクトルになります。

@
param b 一次方程式の定数項を指定します。

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

lup = Matrix[[2, 1], [1, 2]].lup

lup.solve([1, -1]) #=> Vector[(1/1), (-1/1)]
l...

Matrix#eigen -> Matrix::EigenvalueDecomposition (131.0)

行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

Matrix::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで...
.../emlist[例][ruby]{
require
'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}

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

Matrix#eigensystem -> Matrix::EigenvalueDecomposition (131.0)

行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。

Matrix::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで...
.../emlist[例][ruby]{
require
'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}

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

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

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

...trix::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [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([2, 5]) # => Vector[(1/1), (1/2)]
//}

@
see Matrix::LUPDecomposition...
<< 1 2 3 > >>