<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>babiy3104</author_name>
  <author_url>https://blog.hatena.ne.jp/babiy3104/</author_url>
  <blog_title>そういうことだったんですね</blog_title>
  <blog_url>https://babiy3104.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>データ分析やゲームなどでパターンの組み合わせや順列が欲しい場合が多いと思います。 Ruby では Array クラスにこれらを生成する便利なメソッドが定義されています。 組み合わせ(combination) N個の要素からM個を取り出し、順番を考慮しないで列挙します。comination メソッドを使います。引数に取り出す数(M)を与えます。 instance method Array#combination 例： 巨人、中日、阪神、横浜、東京ヤクルト、広島の６チームから試合を行うときの組み合わせ $ irb &gt; %w(巨人 中日 阪神 横浜 東京ヤクルト 広島).combination(2)…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbabiy3104.hateblo.jp%2Fentry%2F2013%2F09%2F10%2F183208&quot; title=&quot;Ruby - 順列と組み合わせのまとめ - そういうことだったんですね&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-09-10 18:32:08</published>
  <title>Ruby - 順列と組み合わせのまとめ</title>
  <type>rich</type>
  <url>https://babiy3104.hateblo.jp/entry/2013/09/10/183208</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
