multiset.rb

Path: multiset.rb
Last Update: Wed Apr 23 01:25:39 +0900 2008

概要(Basic information)

Rubyによる多重集合(マルチセット)の実装です。 通常の集合(Rubyでは"set"ライブラリ)と異なり、多重集合は 同一の要素を複数格納することができます。

メソッド名は基本的にSetクラスに合わせてあります。またSetクラスが持つ メソッドの大部分を実装していますが、いくつか未実装なものもあります。

Ruby implementation of multiset. Unlike ordinary set(see Ruby documentation for "set" library), multiset can contain two or more same items.

Most methods’ names are same as those of Set class, and all other than a few methods in Set class is implemented on Multiset class.

  • Set[:a,:b,:c,:b,:b,:c] => #<Set: {:b, :c, :a}>
  • Multiset[:a,:b,:c,:b,:b,:c] => #<Multiset:#3 :b, #2 :c, #1 :a>

インストール(Installation)

インストールはsetup.rbによって行われます。詳しくはINSTALL.ja.txtをご覧下さい。

setup.rb performs installation. See INSTALL.en.txt for more information.

更新履歴(Revision history)

  • Version 0.10(2008/2/9)
    • 公開開始。
  • Version 0.11(2008/2/12)
    • メソッド「&」の実装が誤っていたのを修正。
    • ドキュメントの間違いを修正。
  • Version 0.12(2008/2/16)
    • Hash#to_multisetに冗長な処理があったので修正。
    • Multisetにメソッドmap, map!, collect, collect!, map_with, map_with!を追加。
      • これに伴い、従来のMultiset#mapなどとは挙動が変更されました。 (従来のMultiset#mapなどはEnumerable#mapを呼んでいたので、 返り値は配列でした。)
  • Version 0.13(2008/3/1)
  • Version 0.131(2008/3/2)
    • ドキュメントの間違いを修正。
  • Version 0.132(2008/4/23)
    • GNU LGPLの文書を添付していなかったので追加。申し訳ありません。

  • Version 0.10(2008/2/9)
    • First distribution.
  • Version 0.11(2008/2/12)
    • Fixed wrong implementation of method "&".
    • Fixed wrong documentation.
  • Version 0.12(2008/2/16)
  • Version 0.13(2008/3/1)
  • Version 0.131(2008/3/2)
    • Fixed wrong documentation.
  • Version 0.132(2008/4/23)
    • Added the text of GNU LGPL to the archive. I‘m very sorry…

著作権表示(Copyright)

Author:Maraigue(f52.aaa.livedoor.jp/~maraigue/)
Version:0.132(2008/4/23)
Copyright:(C)2008 Maraigue

このプログラムはBSDライセンスにて提供する 無 保 証 のプログラムです。 詳細はBSDLicense.txtをご覧下さい。

日本語の参考訳は以下のURLにあります。 sourceforge.jp/projects/opensource/wiki/licenses%2Fnew_BSD_license ただし、法的にはBSDLicense.txtに書かれた英語の文章のみが有効です。

setup.rbはMinero Aoki氏(i.loveruby.net/)の制作です。 setup.rbのみは、GNU LGPL(version 2.1)のライセンスが適用されます。 GNU LGPLについてはGNU_LGPL.txtをご覧下さい。

This program is distributed with ABSOLUTELY NO WARRANTY, under BSD License. See BSDLicense.txt for more detail.

setup.rb is made by Minero Aoki(i.loveruby.net/). Only setup.rb is distributed under GNU LGPL(version 2.1). See GNU_LGPL.txt for more detail.

Required files

set  

[Validate]