1812件ヒット
[1-100件を表示]
(0.046秒)
別のキーワード
ライブラリ
クラス
-
ARGF
. class (12) - Array (24)
- Dir (19)
-
Encoding
:: Converter (24) - Exception (56)
- Fiber (18)
- File (28)
- IO (76)
- Integer (48)
- MatchData (48)
- Matrix (162)
- Module (36)
-
OpenSSL
:: BN (24) - OptionParser (204)
- Pathname (24)
- Range (14)
- Rational (12)
- Regexp (12)
- Set (12)
- String (336)
- StringIO (304)
- StringScanner (60)
- Struct (36)
- Thread (10)
- TracePoint (105)
- Vector (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
-
Net
:: HTTPHeader (36) -
OptionParser
:: Arguable (48)
キーワード
- * (36)
- == (12)
- === (12)
- =~ (24)
- [] (132)
- []= (96)
- accept (12)
- adjugate (12)
- antisymmetric? (7)
- backtrace (12)
-
backtrace
_ locations (12) - byteindex (3)
- bytes (14)
-
callee
_ id (12) - children (19)
- chr (24)
-
cofactor
_ expansion (12) -
const
_ get (12) - convert (12)
- det (12)
- determinant (12)
- each (24)
-
each
_ byte (24) -
each
_ line (24) - eigen (12)
- eigensystem (12)
- entries (19)
-
entrywise
_ product (8) - environment (12)
-
eval
_ script (7) - event (12)
- fetch (36)
- finish (12)
- getbyte (12)
- getc (12)
- gets (12)
-
hadamard
_ product (8) - hstack (12)
- inspect (24)
-
instruction
_ sequence (7) - join (12)
-
laplace
_ expansion (12) - lineno (12)
- lines (14)
-
method
_ id (12) - name= (10)
- on (36)
- ord (12)
- order (48)
- order! (48)
- parameters (7)
- parse (24)
- parse! (24)
- path (32)
- peek (12)
- peep (12)
- permute (24)
- permute! (24)
- pointer= (12)
- pos= (24)
- pread (8)
-
prime
_ fasttest? (12) - print (24)
- printf (12)
- private (12)
- public (12)
- puts (12)
- pwrite (8)
-
raised
_ exception (12) - read (12)
- readbyte (12)
- readchar (24)
- readline (12)
- readlines (48)
- regular? (12)
- reopen (24)
-
return
_ value (12) -
set
_ backtrace (12) - setbyte (12)
-
skew
_ symmetric? (7) - slice (72)
- subtract (12)
- syswrite (12)
-
to
_ a (7) -
to
_ path (8) -
to
_ s (24) - trace (12)
- transfer (12)
- truncate (36)
- ungetc (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unscan (12)
-
values
_ at (12) - write (24)
検索結果
先頭5件
-
Matrix
# tr -> Integer | Float | Rational | Complex (21114.0) -
トレース (trace) を返します。
...トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (18228.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...ram backtrace 例外発生時のスタックトレースです。文字列の配列で指定します。
//emlist[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f =......Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (9313.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...イルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeError :sc... -
Matrix
# entrywise _ product(m) -> Matrix (9213.0) -
アダマール積(要素ごとの積)を返します。
...ダマール積(要素ごとの積)を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。
//emlist[例][ruby]{
require 'matrix'
Matrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//}... -
TracePoint
# raised _ exception -> Exception (9125.0) -
発生した例外を返します。
...ます。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begi... -
StringIO
# truncate(len) -> Integer (9119.0) -
自身のサイズが len になるように、自身を切り詰め、もしくは拡大します。 拡大した場合は、その部分を 0 で埋めます。 len を返します。
...。
@raise IOError 自身が書き込み可能でない時に発生します。
@raise Errno::EINVAL len がマイナスの時に発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge", 'r+')
a.truncate(2)
a.string #=> "ho"
a.truncate(5)
a.string... -
Matrix
# trace -> Integer | Float | Rational | Complex (9114.0) -
トレース (trace) を返します。
...トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が... -
Matrix
# antisymmetric? -> bool (9113.0) -
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
...ば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
//emlist[][ruby]{
require 'matrix'
Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true......Matrix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}... -
Matrix
# skew _ symmetric? -> bool (9113.0) -
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
...ば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
//emlist[][ruby]{
require 'matrix'
Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true......Matrix[[1, 2, 3], [4, 5, 6], [7, 8, 9]].antisymmetric? # => false
# 対角要素が違う
Matrix[[1, -2, 3], [2, 0, 6], [-3, -6, 0]].antisymmetric? # => false
# 符号が違う
Matrix[[0, 2, -3], [2, 0, 6], [-3, 6, 0]].antisymmetric? # => false
//}... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (6319.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
...fo nil、String あるいは String の配列のいずれかを指定します。
//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.set_backtrace(["dumm......y1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}... -
Exception
# backtrace -> [String] (6213.0) -
バックトレース情報を返します。
...)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:in `methd'", "filename.rb:6"]
//}
@see Exception#backtrace_locations...