るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. socket udp_server_loop_on

ライブラリ

モジュール

検索結果

<< 1 2 3 ... > >>

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

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

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

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

Fiddle::Function#call(*args) -> Integer|DL::CPtr|nil (21101.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 (18312.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 (18312.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 (18312.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 (18306.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| ...} -> () (18306.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...

static VALUE rb_cont_call(int argc, VALUE *argv, VALUE cont) (12316.0)

Continuation#call の実体。

...Continuation#call の実体。...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (12300.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...
<< 1 2 3 ... > >>