371件ヒット
[1-100件を表示]
(0.124秒)
クラス
- Array (12)
- CSV (48)
-
CSV
:: FieldInfo (12) -
CSV
:: Row (48) -
CSV
:: Table (60) - Matrix (168)
- UncaughtThrowError (11)
- Vector (12)
キーワード
- << (24)
- cofactor (12)
-
cofactor
_ expansion (12) - covector (12)
- delete (12)
-
delete
_ if (24) -
each
_ with _ index (12) -
find
_ index (36) -
header
_ convert (36) -
header
_ converters (12) - index (36)
-
laplace
_ expansion (12) - line (12)
- minor (24)
-
row
_ vectors (12) -
to
_ a (12) -
to
_ csv (24) -
to
_ hash (12) -
to
_ s (23)
検索結果
先頭5件
-
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...