別のキーワード
ライブラリ
- ビルトイン (109)
- bigdecimal (12)
- csv (36)
- date (24)
- fiber (8)
-
fiddle
/ import (36) - json (24)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - matrix (288)
- openssl (12)
- optparse (240)
- pathname (72)
- prime (12)
- rubygems (12)
-
rubygems
/ specification (36) - set (18)
- stringio (44)
- strscan (36)
- zlib (24)
クラス
- Array (33)
- BigDecimal (24)
-
CSV
:: Table (12) - Complex (12)
- Date (36)
- DateTime (12)
- Enumerator (12)
- Exception (12)
- Fiber (12)
-
Gem
:: Specification (36) - Matrix (152)
-
OpenSSL
:: BN (12) - OptionParser (228)
- Pathname (72)
- Prime (12)
- Range (12)
- Rational (12)
- Regexp (12)
- String (36)
- StringIO (44)
- StringScanner (36)
- Struct (12)
- Time (12)
- Vector (136)
-
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (66)
-
Fiddle
:: Importer (36) - Kernel (36)
-
OptionParser
:: Arguable (12)
キーワード
- accept (12)
-
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ runtime _ dependency (12) - bind (12)
- binread (12)
- close (12)
- collect (38)
- collect! (28)
- collect2 (24)
- crypt (12)
- each (24)
-
each
_ line (24) -
each
_ with _ index (24) - eigen (12)
- eigensystem (12)
- entries (12)
- finish (12)
- fnmatch (12)
- gem (12)
- getopts (12)
- hstack (12)
- inspect (12)
-
int
_ from _ prime _ division (12) - j (12)
- jj (12)
- join (12)
- lup (12)
-
lup
_ decomposition (12) - map (38)
- map! (28)
- map2 (12)
-
mod
_ mul (12) -
next
_ year (12) - on (144)
-
on
_ head (12) -
on
_ tail (12) - order (24)
- pack (21)
- parse (12)
-
parse
_ csv (12) - permute (12)
-
prev
_ year (12) - print (12)
- printf (12)
- push (12)
- puts (12)
-
scan
_ full (12) -
search
_ full (12) - split (12)
- struct (12)
-
to
_ a (12) -
to
_ csv (12) -
to
_ json (120) -
to
_ set (18) - transfer (12)
- union (12)
- unpack (12)
- vstack (12)
-
with
_ index (12) - write (8)
検索結果
先頭5件
-
Vector
# *(m) -> Matrix (21221.0) -
自分自身を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。
...トル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。
@param m 右から乗算を行う行列
@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します......=== 注意
引数の行列 m は自分自身を列ベクトルとした場合に乗算が定義できる行列である必要があります。
//emlist[例][ruby]{
require 'matrix'
v = Vector[1, 2]
a = [4, 5, 6]
m = Matrix[a]
p v * m # => Matrix[[4, 5, 6], [8, 10, 12]]
//}... -
Vector
# *(other) -> Vector (21216.0) -
self の各要素に数 other を乗じたベクトルを返します。
...数 other を乗じたベクトルを返します。
@param other self の各要素に掛ける Numeric オブジェクトを指定します。
//emlist[例][ruby]{
require 'matrix'
a = [1, 2, 3.5, 100]
v1 = Vector.elements(a)
p v1.*(2) # => Vector[2, 4, 7.0, 200]
p v1.*(-1.5) # => Vector[-1.... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (9229.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
StringIO
# write(*obj) -> Integer (6313.0) -
自身に obj を書き込みます。obj が文字列でなければ to_s による文字列化を試みます。 書き込まれた文字列の長さを返します。
...自身に obj を書き込みます。obj が文字列でなければ to_s による文字列化を試みます。
書き込まれた文字列の長さを返します。
全ての出力メソッドは、最終的に「write」という名のメソッドを呼び出すので、
このメソッド......ram obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み可能でない時に発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge", 'r+')
a.write("aaa") #=> 3
a.string #=> "aaae"
//}... -
Gem
:: Specification # add _ runtime _ dependency(gem , *requirements) -> [Gem :: Dependency] (6309.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
...この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の......名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。
@see Gem::Specification#add_development_dependency, Gem::Dependency... -
Gem
:: Specification # add _ development _ dependency(gem , *requirements) -> [Gem :: Dependency] (6308.0) -
この gem の DEVELOPMENT 依存性を追加します。 この gem の開発時に必要となる gem を指定します。
...DEVELOPMENT 依存性を追加します。
この gem の開発時に必要となる gem を指定します。
//emlist[][ruby]{
gem "rack", "~> 1.6", ">= 1.6.12"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージ......ョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。
@see Gem::Specification#add_runtime_dependency, Gem::Dependency... -
Array
# to _ csv(**options) -> String (6255.0) -
CSV.generate_line(self, options) と同様です。
...generate_line(self, options) と同様です。
Array オブジェクトを 1 行の CSV 文字列に変換するためのショートカットです。
@param options CSV.generate_line と同様のオプションを指定します。
//emlist[][ruby]{
require 'csv'
p [1, 'Matz', :Ruby, Date.new......(1965, 4, 14)].to_csv # => "1,Matz,Ruby,1965-04-14\n"
p [1, 'Matz', :Ruby, Date.new(1965, 4, 14)].to_csv(col_sep: ' ', row_sep: "\r\n") # => "1 Matz Ruby 1965-04-14\r\n"
//}
@see CSV.generate_line......to_csv # => "1,Matz,Ruby,1965-04-14\n"
p [1, 'Matz', :Ruby, Date.new(1965, 4, 14)].to_csv(col_sep: ' ', row_sep: "\r\n") # => "1 Matz Ruby 1965-04-14\r\n"
//}
Ruby 3.0 (CSV 3.1.9) から、次のオプションが使えるようになりました。
//emlist[][ruby......]{
require 'csv'
puts [1, nil].to_csv # => 1,
puts [1, nil].to_csv(write_nil_value: "N/A") # => 1,N/A
puts [2, ""].to_csv # => 2,""
puts [2, ""].to_csv(write_empty_value: "BLANK") # => 2,BLANK
//}
@see CSV.generate_line... -
Matrix
# lup _ decomposition -> Matrix :: LUPDecomposition (6237.0) -
行列の LUP 分解を保持したオブジェクトを返します。
...Matrix::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... -
OptionParser
:: Arguable # getopts(short _ opt , *long _ opt) -> Hash (6232.0) -
指定された short_opt や long_opt に応じて自身をパースし、結果を Hash として返します。
...指定された short_opt や long_opt に応じて自身をパースし、結果を Hash として返します。
コマンドラインに - もしくは -- を指定した場合、それ以降の解析を行ないません。
@param short_opt ショートネームのオプション(-f や -fx)......ときは空文字列を指定します。
オプションが引数をとる場合は直後に ":" を付けます。
@param long_opt ロングネームのオプション(--version や --bufsize=512)を文字列で指定をします。
オプションが引数をと......e OptionParser::ParseError 自身のパースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスの例外になります。
//emlist[t.rb][ruby]{
require 'optparse'
params = ARGV.getopts("a...