るりまサーチ

最速Rubyリファレンスマニュアル検索!
518件ヒット [1-100件を表示] (0.086秒)
トップページ > クエリ:-[x] > クエリ:on[x] > クエリ:call[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

モジュール

検索結果

<< 1 2 3 ... > >>

Continuation#call(*ret) -> () (21201.0)

self が記憶した状態を継続します。引数は そのまま Kernel.#callcc の戻り値になります。

...self が記憶した状態を継続します。引数は そのまま
Kernel.#callcc の戻り値になります。

@param ret 継続に復帰した時に返す値を指定します。...

Fiddle::Function#call(*args) -> Integer|DL::CPtr|nil (21201.0)

関数を呼び出します。

...関数を呼び出します。

Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。

引数の変換は...
.../int/long/long long
Ruby の整数を C の整数に変換します。

: double/float
Ruby の整数 or 浮動小数点数を C の浮動小数点数に変換します

返り値の変換は以下の通りです。

: void
nil を返します

: (unsigned) char/short/int/long/long long
C...
...の整数を Ruby の整数に変換します

: void*(つまり任意のポインタ型)
C のポインタを保持した Fiddle::Pointer を返します。

@param args 関数の引数
@see Fiddle::Function.new...

TSort.each_strongly_connected_component(each_node, each_child) -> Enumerator (18412.0)

TSort.strongly_connected_components メソッドのイテレータ版です。

...TSort.strongly_connected_components メソッドのイテレータ版です。

引数 each_node と each_child でグラフを表します。

@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。

@param...
...callメソッ
ドを持つオブジェクトを指定します。

//emlist[使用例][ruby]{
require 'tsort'

g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component...
...[3]
# [1]

g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }

# => [4]
# [2, 3]
# [1]
//}

@see TSort#each_strongly_connected_component...

TSort.each_strongly_connected_component(each_node, each_child) {|nodes| ...} -> nil (18412.0)

TSort.strongly_connected_components メソッドのイテレータ版です。

...TSort.strongly_connected_components メソッドのイテレータ版です。

引数 each_node と each_child でグラフを表します。

@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。

@param...
...callメソッ
ドを持つオブジェクトを指定します。

//emlist[使用例][ruby]{
require 'tsort'

g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component...
...[3]
# [1]

g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }

# => [4]
# [2, 3]
# [1]
//}

@see TSort#each_strongly_connected_component...

TSort.strongly_connected_components(each_node, each_child) -> Array (18412.0)

強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。

...@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。

@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ
ドを持つオブジェクトを指...
...&b| g[n].each(&b) }
p TSort.strongly_connected_components(each_node, each_child)
# => [[4], [2], [3], [1]]

g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
p TSort.strongly_connected_components(each_node, each_child)
# =>...
...[[4], [2, 3], [1]]
//}

@see TSort#strongly_connected_components...

絞り込み条件を変える

TSort.each_strongly_connected_component_from(node, each_child, id_map={}, stack=[]) -> Enumerator (18406.0)

node から到達可能な強連結成分についてのイテレータです。

...ん。

TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。

@param node ノードを指定します。

@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ...
...//emlist[使用例][ruby]{
require 'tsort'

graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
p scc
}
# => [4]
# [2, 3]
# [1]
//}

@see TSort#each_strongly_connected_component_from...

TSort.each_strongly_connected_component_from(node, each_child, id_map={}, stack=[]) {|nodes| ...} -> () (18406.0)

node から到達可能な強連結成分についてのイテレータです。

...ん。

TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。

@param node ノードを指定します。

@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ...
...//emlist[使用例][ruby]{
require 'tsort'

graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
p scc
}
# => [4]
# [2, 3]
# [1]
//}

@see TSort#each_strongly_connected_component_from...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (12400.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

call
er_locations # => []
test3(1, nil)
# => ["/Us...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (12400.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

call
er_locations # => []
test3(1, nil)
# => ["/Us...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Thread#report_on_exception -> bool (12344.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...ad.report_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => tr...
...:1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread...
...:0x00007fc3f48aefc0@(irb):4 dead>
//}

@see Thread.report_on_exception...

絞り込み条件を変える

<< 1 2 3 ... > >>