56件ヒット
[1-56件を表示]
(0.049秒)
種類
- インスタンスメソッド (43)
- 特異メソッド (10)
- ライブラリ (3)
クラス
- Matrix (33)
モジュール
- TSort (20)
キーワード
- [] (11)
-
each
_ strongly _ connected _ component (20) - element (11)
- xmlrpc (3)
検索結果
先頭5件
-
Matrix
# component(i , j) -> () (18123.0) -
(i,j)要素を返します。 行列の範囲外の値を指定した場合には nil を返します。
...定した場合には nil を返します。
@param i 要素の行成分を0オリジンで指定します。
@param j 要素の列成分を0オリジンで指定します。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, 2, 1.5]
m = Matrix[a1, a2, a3]
p m[0,......0] # => 1
p m[1, 1] # => 15
p m[1, 2] # => 20
p m[1, 3] # => nil
//}... -
TSort
# each _ strongly _ connected _ component -> Enumerator (6243.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...TSort#strongly_connected_components メソッドのイテレータ版です。
obj.each_strongly_connected_component は
obj.strongly_connected_components.each に似ていますが、
ブロックの評価中に obj が変更された場合は予期しない結果になる
ことがあります。......each_strongly_connected_component は nil を返します。
//emlist[使用例][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=>[]}
non_sort.......each_strongly_connected_component{|nodes|
p nodes
}
#出力
#=> [4]
#=> [2, 3]
#=> [1]
//}
@see TSort.each_strongly_connected_component... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator (6221.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param.......each_strongly_connected_component(each_node, each_child) {|scc| p scc }
# => [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) }
TSort.each_strongly_connected_component(each_node, each_child)......{|scc| p scc }
# => [4]
# [2, 3]
# [1]
//}
@see TSort#each_strongly_connected_component... -
Matrix
# [](i , j) -> () (3023.0) -
(i,j)要素を返します。 行列の範囲外の値を指定した場合には nil を返します。
...定した場合には nil を返します。
@param i 要素の行成分を0オリジンで指定します。
@param j 要素の列成分を0オリジンで指定します。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, 2, 1.5]
m = Matrix[a1, a2, a3]
p m[0,......0] # => 1
p m[1, 1] # => 15
p m[1, 2] # => 20
p m[1, 3] # => nil
//}... -
Matrix
# element(i , j) -> () (3023.0) -
(i,j)要素を返します。 行列の範囲外の値を指定した場合には nil を返します。
...定した場合には nil を返します。
@param i 要素の行成分を0オリジンで指定します。
@param j 要素の列成分を0オリジンで指定します。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, 2, 1.5]
m = Matrix[a1, a2, a3]
p m[0,......0] # => 1
p m[1, 1] # => 15
p m[1, 2] # => 20
p m[1, 3] # => nil
//}... -
xmlrpc (18.0)
-
XML-RPC を扱うためのライブラリです。
...== Overview
XMLRPC is a lightweight protocol that enables remote procedure calls over
HTTP. It is defined at http://www.xmlrpc.com.
XMLRPC allows you to create simple distributed computing solutions that span
computer languages. Its distinctive feature is its simplicity compared to
other approac......e", 5, 3)
pp result
=== Documentation
See http://www.ntecs.de/projects/xmlrpc4r. There is plenty of detail there to
use the client and implement a server.
=== Features of XMLRPC for Ruby
* Extensions
* Introspection
* multiCall
* optionally nil values and integers larger than 32......)
* Fastest parser is Expat's XMLStreamParser!
* General
* possible to choose between XMLParser module (Expat wrapper) and REXML/NQXML (pure Ruby) parsers
* Marshalling Ruby objects to Hashs and reconstruct them later from a Hash
* SandStorm component architecture Client interfac...