320件ヒット
[201-300件を表示]
(0.051秒)
別のキーワード
ライブラリ
- ビルトイン (48)
- e2mmap (12)
- forwardable (48)
- matrix (92)
-
minitest
/ spec (1) -
net
/ imap (96) - rake (12)
- tsort (11)
モジュール
- Exception2MessageMapper (12)
- Forwardable (24)
- SingleForwardable (24)
- TSort (11)
キーワード
- append (12)
- authenticate (12)
- collect (14)
- collect! (14)
- collect2 (12)
- create (12)
-
def
_ delegators (24) -
def
_ exception (6) -
def
_ instance _ delegators (12) -
def
_ single _ delegators (12) - each (24)
-
each
_ strongly _ connected _ component _ from (11) -
enum
_ for (24) - fetch (12)
-
infect
_ with _ assertions (1) - map! (14)
-
pathmap
_ replace (12) - status (12)
- store (12)
-
to
_ enum (24) -
uid
_ fetch (12) -
uid
_ store (12)
検索結果
先頭5件
- Matrix
# collect(which = :all) {|x| . . . } -> Matrix - Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class - Exception2MessageMapper
# def _ e2message(exception _ class , message _ format) -> Class - Matrix
# each(which = :all) -> Enumerator - Matrix
# collect!(which = :all) {|element| . . . } -> self
-
Matrix
# collect(which = :all) {|x| . . . } -> Matrix (3127.0) -
行列の各要素に対してブロックの適用を繰り返した結果を、要素として持つ行列を生成します。
...Enumerator を返します。
@param which which に以下の Symbol を指定することで、
引数として使われる要素を限定できます。
デフォルトは、:all (全ての要素)です。
指定できる Symbol の詳細は、 Matrix#ea......ch の項目を参照して下さい。
//emlist[例][ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
p m.map { |x| x + 100 } # => Matrix[[101, 102], [103, 104]]
p m.map(:diagonal) { |x| x * 10 } # => Matrix[[10, 2], [3, 40]]
//}
@see Matrix#each, Matrix#map!... -
Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class (3119.0) -
exception_name という名前の例外クラスを定義します。
...ption_name という名前の例外クラスを定義します。
@param exception_name 定義する例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマット。
@param superclass 定義する例外のスーパークラスを指定し... -
Exception2MessageMapper
# def _ e2message(exception _ class , message _ format) -> Class (3113.0) -
すでに存在する例外クラス exception_class に、 エラーメッセージ用フォーマット message_format を関連づけます。
...マット message_format を関連づけます。
このフォーマットは Exception2MessageMapper#Raise,
Exception2MessageMapper#Fail で使用します。
@param exception_class メッセージを登録する例外クラスを指定します。
@param message_format メッセージのフォ... -
Matrix
# each(which = :all) -> Enumerator (3113.0) -
行列の各要素を引数としてブロックを呼び出します。
...側
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを......呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Matrix
# collect!(which = :all) {|element| . . . } -> self (3027.0) -
行列の各要素に対してブロックの適用を繰り返した結果で要素を置き換えます。
...の適用を繰り返した結果で要素を置き換えます。
ブロックのない場合は、自身と map! から生成した Enumerator オブジェクトを返します。
@param which which に以下の Symbol を指定することで、
引数として使われる要素......詳細は、 Matrix#each の項目を参照して下さい。
//emlist[例][ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
p m.map! { |element| element * 10 } #=> Matrix[[10, 20], [30, 40]]
p m #=> Matrix[[10, 20], [30, 40]]
//}
@see Matrix#each, Matrix#map... -
Matrix
# each(which = :all) {|e| . . . } -> self (3013.0) -
行列の各要素を引数としてブロックを呼び出します。
...側
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを......呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Module
# infect _ with _ assertions(positive _ prefix , negative _ prefix , skip _ regexp , map = {}) -> () (232.0) -
BDD 風にテストを書くために使用するメソッド群を定義します。
...す。
@param positive_prefix assert の代わりのプレフィックスを指定します。
@param negative_prefix refute の代わりのプレフィックスを指定します。
@param skip_regexp この正規表現にマッチしたメソッドは定義しません。
@param map メソッ... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (209.0) -
node から到達可能な強連結成分についてのイテレータです。
...レータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
ali... -
Object
# enum _ for(method = :each , *args) -> Enumerator (119.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if......ここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end
%i[hello world].repeat(2) { |w| puts w }
#... -
Object
# enum _ for(method = :each , *args) {|*args| . . . } -> Enumerator (119.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if......ここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end
%i[hello world].repeat(2) { |w| puts w }
#... -
Object
# to _ enum(method = :each , *args) -> Enumerator (119.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if......ここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end
%i[hello world].repeat(2) { |w| puts w }
#... -
Object
# to _ enum(method = :each , *args) {|*args| . . . } -> Enumerator (119.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if......ここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end
%i[hello world].repeat(2) { |w| puts w }
#...