るりまサーチ

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Matrix#row(i) -> Vector | nil (18215.0)

i 番目の行を Vector オブジェクトで返します。 i 番目の行が存在しない場合は nil を返します。 ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

...i 番目の行を Vector オブジェクトで返します。
i 番目の行が存在しない場合は nil を返します。
ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

Vector オブジェクトは Matrix オブジェクトとの...
...のインデックスと見倣します。末尾の行が -1 番目になります。

//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.row(1) # => Vector[10, 15, 20]

cnt = 0
m.row(0) { |x|
cnt = cnt + x
}
p cnt # => 6
//}...

Matrix#row_vectors -> [Vector] (12308.0)

自分自身を行ベクトルの配列として返します。

...自分自身を行ベクトルの配列として返します。

//emlist[例][ruby]{
require 'matrix'
a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.row_vectors # => [Vector[1, 2, 3], Vector[10, 15, 20], Vector[-1, -2, 1.5]]
//}...

CSV::Row#to_csv -> String (9145.0)

自身を CSV な文字列として返します。ヘッダは使用しません。

...自身を CSV な文字列として返します。ヘッダは使用しません。

//emlist[例][ruby]{
require "csv"

row
= CSV::Row.new(["header1", "header2"], [1, 2])
row
.to_csv # => "1,2\n"
row
.to_csv( {col_sep: "|", row_sep: "<br>"} ) # => "1|2<br>"
//}...

CSV::Row#to_s -> String (9145.0)

自身を CSV な文字列として返します。ヘッダは使用しません。

...自身を CSV な文字列として返します。ヘッダは使用しません。

//emlist[例][ruby]{
require "csv"

row
= CSV::Row.new(["header1", "header2"], [1, 2])
row
.to_csv # => "1,2\n"
row
.to_csv( {col_sep: "|", row_sep: "<br>"} ) # => "1|2<br>"
//}...

CSV::Row#to_hash -> Hash (9126.0)

自身をシンプルなハッシュに変換します。

...プルなハッシュに変換します。

フィールドの順序は無視されます。
重複したフィールドは削除されます。

//emlist[例][ruby]{
require "csv"

row
= CSV::Row.new(["header2", "header1", "header2"], [1, 2, 3])
row
.to_hash # => {"header2"=>3, "header1"=>2}
//}...

絞り込み条件を変える

UncaughtThrowError#to_s -> String (9108.0)

self を tag を含む文字列表現にして返します。

...self を tag を含む文字列表現にして返します。

//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
//}...

Vector#covector -> Matrix (9107.0)

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 # => Matrix[[2, 3, 5]]
//}...

Matrix#cofactor_expansion(row: nil, column: nil) -> object | Integer | Rational | Float (6243.0)

row 行、もしくは column 列に関するラプラス展開をする。

...
row
行、もしくは column 列に関するラプラス展開をする。

通常の行列に対してはこれは単に固有値を計算するだけです。かわりにMatrix#determinant を
利用すべきです。

変則的な形状の行列に対してはそれ以上の意味を持ちま...
...す。例えば
row
行/column列が行列やベクトルである場合には

//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # => 45
Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # => Vector[3, -2]
//}

@param row
@param column...
...
@raise ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します
@see Matrix#cofactor...

Matrix#cofactor(row, column) -> Integer | Rational | Float (6224.0)

(row, column)-余因子を返します。

...(row, column)-余因子を返します。

各要素の型によって返り値が変わります。

@param row
@param column 列
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#adjugate...
<< 1 2 3 ... > >>