ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::AnyMethod[iI" product:ETI"Array#product;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Computes all combinations of elements from all the arrays, ;TI".including both +self+ and +other_arrays+:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"OThe number of combinations is the product of the sizes of all the arrays, ;TI".including both +self+ and +other_arrays+.;To;;0; [o; ; [I"=The order of the returned combinations is indeterminate.;T@o; ; [I"IWith no block given, returns the combinations as an array of arrays:;T@o:RDoc::Markup::Verbatim; [ I" p = [0, 1].product([2, 3]) ;TI"+# => [[0, 2], [0, 3], [1, 2], [1, 3]] ;TI"p.size # => 4 ;TI"(p = [0, 1].product([2, 3], [4, 5]) ;TI"b# => [[0, 2, 4], [0, 2, 5], [0, 3, 4], [0, 3, 5], [1, 2, 4], [1, 2, 5], [1, 3, 4], [1, 3,... ;TI"p.size # => 8 ;T: @format0o; ; [I"@If +self+ or any argument is empty, returns an empty array:;T@o;; [I"([].product([2, 3], [4, 5]) # => [] ;TI"([0, 1].product([2, 3], []) # => [] ;T;0o; ; [I"DIf no argument is given, returns an array of 1-element arrays, ;TI"*each containing an element of +self+:;T@o;; [I"$a.product # => [[0], [1], [2]] ;T;0o; ; [I"OWith a block given, calls the block with each combination; returns +self+:;T@o;; [I" p = [] ;TI"A[0, 1].product([2, 3]) {|combination| p.push(combination) } ;TI"-p # => [[0, 2], [0, 3], [1, 2], [1, 3]] ;T;0o; ; [I"AIf +self+ or any argument is empty, does not call the block:;T@o;; [ I"F[].product([2, 3], [4, 5]) {|combination| fail 'Cannot happen' } ;TI" # => [] ;TI"F[0, 1].product([2, 3], []) {|combination| fail 'Cannot happen' } ;TI"# => [0, 1] ;T;0o; ; [I"_If no argument is given, calls the block with each element of +self+ as a 1-element array:;T@o;; [I" p = [] ;TI"9[0, 1].product {|combination| p.push(combination) } ;TI"p # => [[0], [1]] ;T;0o; ; [I"PRelated: see {Methods for Combining}[rdoc-ref:Array@Methods+for+Combining].;T: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"]product(*other_arrays) -> new_array product(*other_arrays) {|combination| ... } -> self ;T0[I" (*args);T@RFI" Array;TcRDoc::NormalClass00