るりまサーチ

最速Rubyリファレンスマニュアル検索!
266件ヒット [1-100件を表示] (0.131秒)

別のキーワード

  1. tsort each_strongly_connected_component_from
  2. prime int_from_prime_division
  3. _builtin from_name
  4. socket connect_from
  5. addrinfo connect_from

検索結果

<< 1 2 3 > >>

Gem::Package::TarHeader.from(stream) -> Gem::Package::TarHeader (18102.0)

stream から先頭 512 バイトを読み込んで Gem::Package::TarHeader の インスタンスを作成して返します。

stream から先頭 512 バイトを読み込んで Gem::Package::TarHeader の
インスタンスを作成して返します。

@param stream IO のように read メソッドを持つオブジェクトを指定します。

Prime.int_from_prime_division(pd) -> Integer (6124.0)

Prime.instance.int_from_prime_division と同じです。

...Prime.instance.int_from_prime_division と同じです。

@param pd 整数のペアの配列を指定します。含まれているペアの第一要素は素因数を、
第二要素はその素因数の指数をあらわします。


@see Prime#int_from_prime_division...

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

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

...

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

返す値は規定されていません。

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

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

@param e...
...//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| ...} -> () (6121.0)

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

...

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

返す値は規定されていません。

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

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

@param e...
...//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...

Integer.from_prime_division(pd) -> Integer (6120.0)

素因数分解された結果を元の数値に戻します。

...アの第一要素は素因数を、
第二要素はその素因数の指数をあらわします。

@see Prime#int_from_prime_division

//emlist[例][ruby]{
require 'prime'
Prime.int_from_prime_division([[2,2], [3,1]]) #=> 12
Prime.int_from_prime_division([[2,2], [3,2]]) #=> 36
//}...

絞り込み条件を変える

JSON::State.from_state(options) -> JSON::State (6120.0)

与えられた options によって生成した JSON::State のインスタンスを返します。

...e.from_state(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}

//emlist[例 JSON::State を指定][ruby]{
require "json"

json_state = JSON::State.from_state(indent: "\t")
# JSON を出力する何らかの処理を実行する
copy = JSON::State.from_...

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

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

...

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

返す値は規定されていません。

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

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

@param e...
...//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...

Gem::SourceIndex.from_installed_gems(*deprecated) -> Gem::SourceIndex (6108.0)

与えられたパスをもとに、インスタンスを作成するファクトリメソッドです。

...与えられたパスをもとに、インスタンスを作成するファクトリメソッドです。

@param deprecated この引数は非推奨です。後方互換性のためにのみ提供されているので使用すべきではありません。

@see Gem::SourceIndex.from_gems_in...

RubyVM::InstructionSequence.load_from_binary(binary) -> RubyVM::InstructionSequence (6108.0)

RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

...りません。自分が変換したバイナリデータを使うべきです。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}

@see RubyVM::InstructionSequence#to_binary...

RubyVM::InstructionSequence.load_from_binary_extra_data(binary) -> String (6108.0)

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。

...埋め込まれたextra_dataを取り出します。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}

@see RubyVM::InstructionSequence#to_binary...

絞り込み条件を変える

Gem::DependencyList.from_source_index(src_index) -> Gem::DependencyList (6102.0)

与えられた Gem::SourceIndex のインスタンスから自身を作成します。

与えられた Gem::SourceIndex のインスタンスから自身を作成します。

@param src_index Gem::SourceIndex を指定します。

@see Gem::SourceIndex
<< 1 2 3 > >>