On November 30th, 2005, version 1.3.2 was
released. In this version a new methode
toArray() in the class
BitMathIntSet was added.
As a software project at our institute, Siegfried Hodri and Sergej Schütz developed a java package representing a consistent and efficient extension to the Java Collection Framework of JDK 1.4 that adds the handling of mathematical sets (Interface MathSet), sets of sets (Interface SetOfSets) and multisets (bags) (Interface Multiset). There is also a special class for mathematical sets of integer values (BitMathIntSet). Mathematical sets implement usual mathematical functions for sets in an non-destructive way, sets of sets have sets as elements and multisets count the frequency of each element in the collection. The package can be used, except for class BitMathIntSet, with JDK 1.3. Beginning with version 1.3, the software is distributed under the GNU Lesser General Public License.
The following files are available:
fixedSizeSubsets(Set,int)from MathSet) are compared by using the classes HashSet, MathSet and Multiset.
sortedArraySupersets(Set)from the class HashSetOfSets are compared.
javac -classpath mathCollection.jar Comparison.javaThen run the tests with the following commands:
javac -classpath mathCollection.jar TestPerfSupersets.java
java -classpath mathCollection.jar:. ComparisonUnder Windows, use a semicolon instead of the colon.
java -Xmx300M -classpath mathCollection.jar:. TestPerfSupersets
Note that the test class
TestPerfSupersets needs 300 Mbytes
of heap memory.
The package was included in the Java Bug Parade under Bug Id 4938537.
If you find this package useful, I would rejoice if you send me a note. Then I would inform you when next next version is released.