種類
ライブラリ
- ビルトイン (3737)
- benchmark (12)
- bigdecimal (40)
-
bigdecimal
/ util (12) -
cgi
/ core (12) -
cgi
/ session (12) - coverage (8)
- csv (414)
- date (28)
- etc (48)
- fiddle (24)
-
fiddle
/ import (24) - fileutils (367)
- getoptlong (12)
-
irb
/ context (48) - json (648)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (24) -
json
/ add / date _ time (24) -
json
/ add / exception (24) -
json
/ add / range (24) -
json
/ add / rational (12) -
json
/ add / regexp (24) -
json
/ add / struct (24) -
json
/ add / time (24) - kconv (12)
- matrix (156)
- mkmf (12)
- monitor (78)
-
net
/ http (468) - objspace (36)
- open-uri (28)
- openssl (24)
- optparse (744)
- pathname (24)
- pp (24)
- prime (48)
- psych (48)
- rake (240)
-
rake
/ packagetask (12) -
rake
/ testtask (12) - rbconfig (60)
-
rbconfig
/ sizeof (24) -
rdoc
/ parser / ruby (12) - resolv (12)
- rexml (12)
-
rexml
/ document (156) -
rexml
/ streamlistener (12) -
ripper
/ filter (24) -
ripper
/ lexer (12) - rubygems (36)
-
rubygems
/ commands / update _ command (12) -
rubygems
/ config _ file (24) -
rubygems
/ installer (24) -
rubygems
/ requirement (60) -
rubygems
/ source _ index (12) -
rubygems
/ specification (156) -
rubygems
/ version (168) - set (36)
- socket (72)
- strscan (24)
- thread (18)
- timeout (29)
- tsort (116)
- uri (24)
-
webrick
/ ssl (24) - win32ole (60)
- zlib (12)
クラス
- Addrinfo (36)
- Array (232)
- BasicObject (36)
- BigDecimal (38)
- Binding (7)
- CGI (12)
- CSV (360)
-
CSV
:: Row (6) -
CSV
:: Table (24) - Class (12)
- Complex (72)
- Coverage (8)
- Data (6)
- Date (50)
- DateTime (26)
-
Encoding
:: Converter (264) -
Encoding
:: InvalidByteSequenceError (24) -
Encoding
:: UndefinedConversionError (12) -
Enumerator
:: Lazy (24) - Exception (176)
- Fiber (6)
-
Fiddle
:: Closure :: BlockCaller (12) -
Fiddle
:: Function (12) - File (12)
- Float (36)
-
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: ConfigFile (24) -
Gem
:: Installer (24) -
Gem
:: Requirement (60) -
Gem
:: SourceIndex (12) -
Gem
:: Specification (156) -
Gem
:: Version (156) - Hash (48)
- IO (216)
-
IRB
:: Context (48) - Integer (64)
-
JSON
:: Parser (36) -
JSON
:: State (240) - MatchData (4)
- Matrix (144)
-
Matrix
:: LUPDecomposition (12) - Method (24)
- Module (219)
- Monitor (42)
- Mutex (2)
-
Net
:: HTTP (216) -
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (144) - NilClass (36)
- Numeric (48)
- Object (166)
- OptionParser (648)
- PP (24)
- Pathname (24)
- Prime (24)
- Proc (18)
-
Psych
:: Visitors :: YAMLTree (12) -
RDoc
:: Parser :: Ruby (12) -
REXML
:: Document (72) -
REXML
:: Instruction (24) -
REXML
:: Text (12) -
Rake
:: Application (108) -
Rake
:: InvocationChain (60) -
Rake
:: PackageTask (12) -
Rake
:: TestTask (12) - Range (24)
- Rational (333)
- Regexp (84)
-
Resolv
:: DNS (12) - Ripper (12)
-
Ripper
:: Filter (12) - RubyVM (12)
-
RubyVM
:: InstructionSequence (246) - Set (48)
- SignalException (60)
- Socket (36)
- String (216)
- StringScanner (24)
- Struct (48)
- Thread (94)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (24) -
Thread
:: Mutex (10) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - Time (237)
- TracePoint (19)
- UnboundMethod (24)
-
WEBrick
:: GenericServer (12) - WIN32OLE (12)
-
WIN32OLE
_ EVENT (24) -
WIN32OLE
_ TYPE (12)
モジュール
- Benchmark (12)
- Enumerable (232)
- Etc (36)
-
Fiddle
:: Importer (24) - FileUtils (367)
- Gem (24)
- JSON (216)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kconv (12)
- Kernel (306)
- Marshal (24)
- MonitorMixin (12)
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (72) - ObjectSpace (36)
- OpenSSL (12)
-
OpenSSL
:: SSL (12) -
OpenURI
:: Meta (24) -
OptionParser
:: Arguable (84) - Psych (36)
-
REXML
:: Security (24) -
REXML
:: StreamListener (12) - Rake (24)
-
Rake
:: Cloneable (24) -
Rake
:: TaskManager (24) - RbConfig (72)
- TSort (116)
- Timeout (21)
- URI (24)
-
WEBrick
:: Config (12) - Zlib (12)
オブジェクト
- ENV (12)
キーワード
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (9)
-
/ (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - <=> (24)
- == (24)
- === (24)
- =~ (12)
- BigDecimal (14)
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - CONFIG (12)
- Complex (14)
- ConditionVariable (12)
- Constants (12)
- ConverterNotFoundError (12)
- Filter (12)
- Float (7)
- GetoptLong (12)
- HTTPServerException (12)
-
INSTRUCTION
_ NAMES (12) - Instruction (12)
- InstructionSequence (12)
- Integer (7)
- InvalidByteSequenceError (12)
- JSON (12)
- LIMITS (12)
- LL2NUM (12)
- Location (12)
-
MAJOR
_ VERSION (12) -
MINOR
_ VERSION (12) - MemoryStore (12)
- MinGW (12)
- Monitor (12)
- MonitorMixin (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NotationDecl (12)
-
OPERATING
_ SYSTEM _ DEFAULTS (12) -
OP
_ NO _ COMPRESSION (12) - OptionParser (12)
-
PLATFORM
_ DEFAULTS (12) - ParseException (12)
-
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE _ VERSION (10) -
RUBY
_ REVISION (12) -
RUBY
_ VERSION (12) - Rational (24)
- RbConfig (12)
- Requirement (12)
- RubyGemsPackageVersion (12)
- RubyGemsVersion (12)
- Rubyの起動 (12)
- SIZEOF (12)
- SSL (12)
- State (12)
- TOPDIR (12)
- Thread (12)
- UndefinedConversionError (12)
- VERSION (24)
- Version (24)
-
WIN32OLE
_ EVENT (12) - [] (12)
-
abort
_ on _ exception (24) -
abort
_ on _ exception= (24) - abs (9)
-
absolute
_ path (24) - accept (24)
-
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ loader (12) -
add
_ runtime _ dependency (12) -
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) -
allow
_ nan? (12) - append (24)
- application (12)
- application= (12)
-
arg
_ config (12) -
array
_ nl (12) -
array
_ nl= (12) -
asciicompat
_ encoding (24) - at (15)
- autoload (24)
- autoload? (24)
- backtrace (12)
-
backtrace
_ locations (36) -
base
_ label (24) - benchmark (12)
-
bigdecimal
/ newton (12) - bind (12)
- binread (24)
- body (12)
-
body
_ permitted? (12) - broadcast (12)
- bump (12)
- byteindex (3)
- call (12)
-
caller
_ locations (24) - canonname (12)
- capitalize (9)
- capitalize! (9)
- cause (12)
- cd (24)
- ceil (12)
- cgi (12)
-
cgi
/ session (12) - chdir (24)
-
check
_ circular? (12) - chmod (12)
-
chmod
_ R (12) - chown (12)
-
chown
_ R (12) - civil (12)
- cleanpath (12)
- clone (108)
- code (12)
- coerce (12)
-
cofactor
_ expansion (12) -
collect
_ concat (36) - combination (24)
- compile (24)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - component (12)
- concat (66)
- configure (12)
- confstr (12)
- conj (36)
- conjugate (36)
- connect (12)
-
connect
_ from (24) -
const
_ added (3) -
const
_ defined? (12) -
const
_ get (12) -
const
_ load (12) -
const
_ missing (12) -
const
_ set (12) -
const
_ source _ location (12) - constants (24)
- content (12)
-
content
_ encoding (12) -
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type (24) -
content
_ type= (12) - continuation (12)
- convert (48)
- converters (12)
- convpath (12)
- copy (12)
- correct? (12)
- cp (12)
-
cp
_ lr (7) -
cp
_ r (12) - create (12)
-
create
_ id (12) -
create
_ id= (12) - debug (12)
-
decode
_ www _ form _ component (12) - deconstruct (14)
-
deconstruct
_ keys (20) -
default
_ argv (12) -
default
_ argv= (12) -
default
_ event _ sources (12) -
define
_ singleton _ method (24) - denominator (12)
-
deprecate
_ constant (12) - deq (24)
-
destination
_ encoding (12) - detect (24)
- diagonal (12)
- disasm (24)
- disassemble (24)
-
do
_ rubygems _ update (12) -
double
_ fig (12) - downcase (9)
- downcase! (9)
- dump (36)
- dup (72)
-
e
_ option _ supplied (12) - each (72)
-
each
_ cons (24) -
each
_ line (72) -
each
_ strongly _ connected _ component (46) -
each
_ strongly _ connected _ component _ from (46) - eigen (12)
- eigensystem (12)
- encode (36)
- encode! (24)
-
encode
_ www _ form _ component (12) - enter (12)
- entity (12)
-
entity
_ expansion _ limit (12) -
entity
_ expansion _ limit= (12) -
entity
_ expansion _ text _ limit (24) -
entity
_ expansion _ text _ limit= (24) - entitydecl (12)
- environment (12)
- eql? (12)
-
error
_ bytes (12) -
error
_ char (12) - eval (12)
- exception (36)
- exec (48)
- exit (12)
-
fast
_ generate (12) -
fast
_ unparse (12) - fdiv (12)
- fetch (12)
-
field
_ size _ limit (12) - filter (36)
- find (24)
- finish (12)
-
first
_ lineno (12) -
flat
_ map (36) - flock (12)
- floor (12)
- foreach (24)
-
from
_ prime _ division (12) -
from
_ state (12) -
from
_ yaml (12) - gem (12)
- generate (24)
-
generate
_ line (12) - get (24)
- get2 (24)
- getoptlong (12)
- getopts (36)
- gm (24)
- handler= (12)
- head (12)
- head2 (24)
- header (12)
-
header
_ convert (36) -
header
_ converters (12) - help (12)
-
http
_ version (12) -
ignore
_ deadlock= (4) -
incomplete
_ input? (12) - indent (12)
- indent= (12)
- init (12)
-
insert
_ output (12) - inspect (48)
- install (24)
- instance (24)
-
instruction
_ sequence (7) -
int
_ from _ prime _ division (12) - intersection (18)
- irb (12)
- isjis (12)
- json (12)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / core (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) -
json
_ creatable? (12) -
json
_ create (96) - kconv (12)
- label (24)
-
laplace
_ expansion (12) -
last
_ description (12) -
last
_ description= (12) -
last
_ error (12) - lex (12)
- lineno (12)
- link (12)
- list (12)
- ln (12)
-
ln
_ s (12) - load (24)
-
load
_ file (12) -
load
_ file! (12) -
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) -
load
_ specification (12) - local (24)
- lup (12)
-
lup
_ decomposition (12) - magnitude (9)
- makedirs (12)
-
marshal
_ dump (12) -
marshal
_ load (12) -
max
_ nesting (12) -
max
_ nesting= (12) - member? (12)
- merge (12)
- mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- mktime (24)
-
module
_ function (36) - mon (12)
-
mon
_ enter (18) -
mon
_ exit (6) - monday? (12)
- monitor (12)
- month (12)
- move (12)
- msg (12)
- mv (12)
- name (12)
- negative? (9)
- new (330)
- none? (65)
- nonzero? (24)
- numerator (12)
-
object
_ nl (12) -
object
_ nl= (12) - of (12)
-
on
_ head (12) -
on
_ tail (12) - one? (53)
- open (52)
- optparse (12)
-
optparse
/ date (12) -
optparse
/ shellwords (12) -
optparse
/ time (12) -
optparse
/ uri (12) - order (48)
- order! (48)
-
original
_ dir (12) - parse (84)
- parse! (36)
-
parse
_ csv (12) -
parse
_ line (12) - parser (12)
- partition (36)
- path (24)
- pathconf (12)
- permutation (24)
- permute (24)
- permute! (24)
- platform= (12)
- pop (24)
- positive? (9)
- post (24)
- post2 (24)
- prerelease? (12)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
prime
_ division (24) -
primitive
_ convert (48) -
primitive
_ errinfo (12) -
private
_ constant (12) -
program
_ name (12) -
program
_ name= (12) -
prompt
_ mode (12) -
prompt
_ mode= (12) -
public
_ constant (12) - putback (24)
- quo (24)
- raise (6)
-
raised
_ exception (12) - rakefile (12)
- rationalize (108)
-
rb
_ ary _ entry (12) -
rb
_ ary _ new2 (12) -
rb
_ ary _ new3 (12) -
rb
_ ary _ store (12) -
rb
_ call _ super (12) -
rb
_ compile _ cstr (12) -
rb
_ compile _ error (12) -
rb
_ compile _ error _ with _ enc (12) -
rb
_ compile _ file (12) -
rb
_ compile _ string (12) -
rb
_ define _ class _ under (12) -
rb
_ define _ method (12) -
rb
_ eval _ string (12) -
rb
_ eval _ string _ protect (12) -
rb
_ gv _ get (12) -
rb
_ gv _ set (12) -
rb
_ io _ mode _ flags (1) -
rb
_ scan _ args (12) -
rb
_ str _ new (12) - rbconfig (12)
-
rbconfig
/ sizeof (12) - rdoc (12)
-
rdoc
/ markdown (12) - read (12)
-
read
_ body (24) - readlines (12)
- reject (24)
- release (24)
- remove (12)
-
remove
_ const (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - replacement (12)
- replacement= (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
request
_ get (24) -
request
_ head (24) -
request
_ post (24) -
required
_ ruby _ version (12) -
required
_ ruby _ version= (12) -
required
_ rubygems _ version (12) -
required
_ rubygems _ version= (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - response (12)
-
response
_ body _ permitted? (12) - restore (12)
-
rinda
/ rinda (12) - rm (12)
-
rm
_ r (12) - rmdir (12)
- round (12)
- rpartition (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby2
_ keywords (18) -
ruby
_ opts= (12) -
ruby
_ xcalloc (12) -
ruby
_ xmalloc (12) -
ruby
_ xrealloc (12) -
rubygems
/ command _ manager (12) -
rubygems
/ commands / contents _ command (12) -
rubygems
/ commands / environment _ command (12) -
rubygems
/ commands / server _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ exceptions (12) -
rubygems
/ ext / configure _ builder (12) -
rubygems
/ ext / ext _ conf _ builder (12) -
rubygems
/ specification (12) -
rubygems
/ user _ interaction (12) -
rubygems
/ version (12) -
rubygems
/ version _ option (12) -
rubygems
_ version (12) -
rubygems
_ version= (12) -
satisfied
_ by? (12) -
search
_ convpath (12) -
send
_ request (12) - separator (12)
-
set
_ backtrace (12) -
set
_ content _ type (12) -
sharing
_ detection (12) -
sharing
_ detection= (12) - shift (24)
- signal (12)
- signm (12)
- signo (12)
-
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
slice
_ before (24) - solve (12)
- source (12)
-
source
_ encoding (12) -
source
_ location (43) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - spawn (48)
-
stand
_ alone? (12) - start (8)
- state (12)
- strftime (12)
-
strongly
_ connected _ components (24) - subsec (12)
- summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) -
summary
_ width (12) -
summary
_ width= (12) - swapcase (9)
- swapcase! (9)
- symlink (12)
- synchronize (12)
- syscall (12)
- sysconf (12)
- sysconfdir (12)
- system (48)
- table (12)
- target (12)
- tcp (24)
-
test
/ unit (1) - thread (2)
- timeout (29)
-
to
_ a (30) -
to
_ binary (10) -
to
_ csv (24) -
to
_ d (12) -
to
_ f (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ i (12) -
to
_ json (240) -
to
_ r (84) -
to
_ ruby (12) -
to
_ s (84) -
top
_ level (12) -
top
_ level _ tasks (12) - touch (12)
- tr (12)
- trace (12)
-
trace
_ object _ allocations (12) - tracer (12)
- truncate (12)
-
try
_ convert (52) - tsort (12)
-
tty
_ output= (12) -
unconverted
_ fields? (12) - union (43)
- unparse (12)
- upcase (9)
- upcase! (9)
- uptodate? (12)
-
use
_ readline (12) -
use
_ readline? (12) - utc (24)
- value (12)
- values (6)
- ver (12)
- version (24)
-
wait
_ for _ cond (6) -
warn
_ unless _ e _ option (12) -
warning
_ unless _ e _ option (12) - write (24)
- zone (12)
- スレッド (12)
- 制御構造 (12)
- 正規表現 (12)
検索結果
先頭5件
- TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () - TSort
# strongly _ connected _ components -> Array - TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator - TSort
. each _ strongly _ connected _ component(each _ node , each _ child) {|nodes| . . . } -> nil - TSort
. each _ strongly _ connected _ component _ from(node , each _ child , id _ map={} , stack=[]) -> Enumerator
-
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (18306.0) -
node から到達可能な強連結成分についてのイテレータです。
...す。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_eac......ach_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s -> %s\n", node, ns.join(","......))
}
}
}
#出力
#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
TSort
# strongly _ connected _ components -> Array (18306.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
p non_sort.strongly_connected_components
#=> [[4], [2, 3], [1]]
//}
@see TSort.strongly_con......nected_components... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator (18306.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param......ジェクトを指定します。
//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(each_node, each_child) {|scc| p scc }
# => [4]
#......[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 (18306.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param......ジェクトを指定します。
//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(each_node, each_child) {|scc| p scc }
# => [4]
#......[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 _ from(node , each _ child , id _ map={} , stack=[]) -> Enumerator (18306.0) -
node から到達可能な強連結成分についてのイテレータです。
...レータです。
引数 node と each_child でグラフを表します。
返す値は規定されていません。
TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。
@param node ノードを指定しま......//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 から到達可能な強連結成分についてのイテレータです。
...レータです。
引数 node と each_child でグラフを表します。
返す値は規定されていません。
TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。
@param node ノードを指定しま......//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
. strongly _ connected _ components(each _ node , each _ child) -> Array (18306.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...ジェクトを指定します。
//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) }
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... -
rubygems
/ version _ option (18000.0) -
Gem::Command の --version, --platform オプションのためのモジュールを 定義したライブラリです。
...Gem::Command の --version, --platform オプションのためのモジュールを
定義したライブラリです。... -
Gem
:: Specification # rubygems _ version=(version) (15300.0) -
この Gem パッケージを作成した RubyGems のバージョンをセットします。 この属性は Gem パッケージが作成された時に自動的にセットされます。
...この Gem パッケージを作成した RubyGems のバージョンをセットします。
この属性は Gem パッケージが作成された時に自動的にセットされます。
@param version RubyGems のバージョンを指定します。... -
Gem
:: Specification # required _ ruby _ version -> Gem :: Requirement (15217.0) -
この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。
...この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。...