クラス
- Matrix (33)
-
URI
:: Generic (44) - Vector (33)
キーワード
- COMPONENT (11)
- InvalidComponentError (11)
-
NEWS for Ruby 2
. 1 . 0 (11) - [] (22)
- decode (7)
-
decode
_ www _ form (11) -
decode
_ www _ form _ component (11) -
each
_ strongly _ connected _ component (32) -
each
_ strongly _ connected _ component _ from (42) - element (22)
- encode (7)
-
encode
_ www _ form (11) -
encode
_ www _ form _ component (11) - escape (7)
- select (11)
-
strongly
_ connected _ components (11) - tsort (11)
- unescape (7)
- xmlrpc (3)
検索結果
先頭5件
-
URI
:: Generic # component -> [Symbol] (21123.0) -
self.class.component を返します。
...self.class.component を返します。
@see URI::Generic.component... -
URI
:: Generic . component -> [Symbol] (21113.0) -
URI の構成要素を表すシンボルの配列を返します。
...URI の構成要素を表すシンボルの配列を返します。
require 'uri'
p URI::Generic.component
p URI::MailTo.component
# => [:scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment]
# => [:scheme, :to, :headers]... -
Matrix
# component(i , j) -> () (18226.0) -
(i,j)要素を返します。 行列の範囲外の値を指定した場合には nil を返します。
...(i,j)要素を返します。
行列の範囲外の値を指定した場合には 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
//}... -
Vector
# component(i) -> object | nil (15226.0) -
i 番目の要素を返します。インデックスは 0 から開始します。 要素が存在しないインデックスを指定した時には nil を返します。
...i 番目の要素を返します。インデックスは 0 から開始します。
要素が存在しないインデックスを指定した時には nil を返します。
@param i 取得する要素のインデックスを整数値で指定します。
インデックスは 0 から始... -
URI
:: InvalidComponentError (12000.0) -
不正な構成要素を指定したときに発生します。
不正な構成要素を指定したときに発生します。 -
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (9319.0) -
URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。
...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。
通常は URI.decode_www_form を使うほうがよいでしょう。
"+" という文字は空白文字にデコードします。
enc で指定したエンコーディングの文字......れています。
//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
p URI.decode_www_form_component(enc)
# => "Ruby リファ......レンスマニュアル"
//}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_form... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (9213.0) -
文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。
...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。
通常は URI.encode_www_form を使うほうがよいでしょう。
このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他......ww.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%83%9E%E3%......83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}
@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form... -
URI
:: Generic :: COMPONENT -> [Symbol] (9101.0) -
URI::Generic で利用可能なコンポーネントの一覧です。
...URI::Generic で利用可能なコンポーネントの一覧です。... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) {|nodes| . . . } -> nil (6320.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...onnected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param each_child 引......ェクトを指定します。
//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]
# [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... -
TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil (6236.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...