You can subscribe to this list here.
2002 |
Jan
(14) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(3) |
Aug
(6) |
Sep
(14) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(7) |
Dec
(3) |
2004 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
(11) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(29) |
Dec
(16) |
2007 |
Jan
(11) |
Feb
(6) |
Mar
(12) |
Apr
(2) |
May
|
Jun
(16) |
Jul
(9) |
Aug
(5) |
Sep
|
Oct
(4) |
Nov
(8) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(23) |
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(11) |
Nov
(2) |
Dec
(3) |
2009 |
Jan
|
Feb
(2) |
Mar
(15) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(65) |
Sep
(180) |
Oct
(52) |
Nov
(33) |
Dec
|
2010 |
Jan
(5) |
Feb
(3) |
Mar
(24) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(49) |
Oct
|
Nov
|
Dec
|
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/impl In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/impl Removed Files: Tag: TROVE_3_WORKING PrimeFinderTest.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- PrimeFinderTest.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/test/gnu/trove In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove Removed Files: Tag: TROVE_3_WORKING TDecoratorsTest.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TDecoratorsTest.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/benchmark/colt In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/benchmark/colt Removed Files: Tag: TROVE_3_WORKING ColtHashMapPut.java ColtHashMapGet.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- ColtHashMapPut.java DELETED --- --- ColtHashMapGet.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove Removed Files: Tag: TROVE_3_WORKING TCollections.template _E_Collection.template TDecorators.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TCollections.template DELETED --- --- _E_Collection.template DELETED --- --- TDecorators.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/set In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/set Removed Files: Tag: TROVE_3_WORKING _E_Set.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_Set.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/idea In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/idea Removed Files: Tag: TROVE_3_WORKING Core.iml .cvsignore Trove.ipr Generator.iml Log Message: Delete content as it has been moved to CVS. README.txt details this. --- Core.iml DELETED --- --- .cvsignore DELETED --- --- Trove.ipr DELETED --- --- Generator.iml DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/src/gnu/trove/iterator In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/src/gnu/trove/iterator Removed Files: Tag: TROVE_3_WORKING TIterator.java TPrimitiveIterator.java TAdvancingIterator.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TIterator.java DELETED --- --- TPrimitiveIterator.java DELETED --- --- TAdvancingIterator.java DELETED --- |
Update of /cvsroot/trove4j/trove/templates/gnu/trove/procedure In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/procedure Removed Files: Tag: TROVE_3_WORKING _E_Procedure.template _K__V_Procedure.template _E_ObjectProcedure.template Object_E_Procedure.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_Procedure.template DELETED --- --- _K__V_Procedure.template DELETED --- --- _E_ObjectProcedure.template DELETED --- --- Object_E_Procedure.template DELETED --- |
Update of /cvsroot/trove4j/trove/templates/gnu/trove/iterator In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/iterator Removed Files: Tag: TROVE_3_WORKING _E_Iterator.template _E_ObjectIterator.template _K__V_Iterator.template Object_E_Iterator.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_Iterator.template DELETED --- --- _E_ObjectIterator.template DELETED --- --- _K__V_Iterator.template DELETED --- --- Object_E_Iterator.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/impl/hash In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/impl/hash Removed Files: Tag: TROVE_3_WORKING _E_Hash.template _K__V_Hash.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_Hash.template DELETED --- --- _K__V_Hash.template DELETED --- |
Update of /cvsroot/trove4j/trove/src/gnu/trove/impl/hash In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/src/gnu/trove/impl/hash Removed Files: Tag: TROVE_3_WORKING THash.java THashIterator.java TPrimitiveHash.java THashPrimitiveIterator.java TObjectHash.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- THash.java DELETED --- --- THashIterator.java DELETED --- --- TPrimitiveHash.java DELETED --- --- THashPrimitiveIterator.java DELETED --- --- TObjectHash.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/decorator In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/decorator Removed Files: Tag: TROVE_3_WORKING TPrimitivePrimitiveMapDecoratorTest.java TObjectPrimitiveMapDecoratorTest.java TPrimitiveObjectMapDecoratorTest.java TPrimitiveSetDecoratorTest.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TPrimitivePrimitiveMapDecoratorTest.java DELETED --- --- TObjectPrimitiveMapDecoratorTest.java DELETED --- --- TPrimitiveObjectMapDecoratorTest.java DELETED --- --- TPrimitiveSetDecoratorTest.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:26
|
Update of /cvsroot/trove4j/trove/src/gnu/trove/list In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/src/gnu/trove/list Removed Files: Tag: TROVE_3_WORKING TLinkable.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TLinkable.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/set/hash In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/set/hash Removed Files: Tag: TROVE_3_WORKING TPrimitiveHashSetTest.java THashSetTest.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TPrimitiveHashSetTest.java DELETED --- --- THashSetTest.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/decorator In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/decorator Removed Files: Tag: TROVE_3_WORKING _E_ObjectMapDecorator.template _K__V_MapDecorator.template _E_SetDecorator.template Object_E_MapDecorator.template _E_ListDecorator.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_ObjectMapDecorator.template DELETED --- --- _K__V_MapDecorator.template DELETED --- --- _E_SetDecorator.template DELETED --- --- Object_E_MapDecorator.template DELETED --- --- _E_ListDecorator.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/src/gnu/trove/list/linked In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/src/gnu/trove/list/linked Removed Files: Tag: TROVE_3_WORKING TLinkedList.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TLinkedList.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/impl/unmodifiable In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/impl/unmodifiable Removed Files: Tag: TROVE_3_WORKING Unmodifiable_K__V_Map.template UnmodifiableObject_E_Map.template Unmodifiable_E_Set.template Unmodifiable_E_ObjectMap.template UnmodifiableRandomAccess_E_List.template Unmodifiable_E_List.template Unmodifiable_E_Collection.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- Unmodifiable_K__V_Map.template DELETED --- --- UnmodifiableObject_E_Map.template DELETED --- --- Unmodifiable_E_Set.template DELETED --- --- Unmodifiable_E_ObjectMap.template DELETED --- --- UnmodifiableRandomAccess_E_List.template DELETED --- --- Unmodifiable_E_List.template DELETED --- --- Unmodifiable_E_Collection.template DELETED --- |
Update of /cvsroot/trove4j/trove/test/gnu/trove/benchmark/trove2 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/benchmark/trove2 Removed Files: Tag: TROVE_3_WORKING Trove2HashMapForEach.java Trove2HashMapPut.java Trove2HashMapGet.java Trove2HashMapIteration.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- Trove2HashMapForEach.java DELETED --- --- Trove2HashMapPut.java DELETED --- --- Trove2HashMapGet.java DELETED --- --- Trove2HashMapIteration.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/map/hash In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/map/hash Removed Files: Tag: TROVE_3_WORKING _E_ObjectHashMap.template _K__V_HashMap.template Object_E_HashMap.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- _E_ObjectHashMap.template DELETED --- --- _K__V_HashMap.template DELETED --- --- Object_E_HashMap.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/benchmark In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/test/gnu/trove/benchmark Removed Files: Tag: TROVE_3_WORKING TroveHashMapGet.java BenchmarkSet.java JavaHashMapGet.java Benchmark.java BenchmarkRunner.java JavaHashMapIteration.java TroveHashMapPut.java JavaHashMapPut.java TroveHashMapForEach.java TroveHashMapIteration.java Log Message: Delete content as it has been moved to CVS. README.txt details this. --- TroveHashMapGet.java DELETED --- --- BenchmarkSet.java DELETED --- --- JavaHashMapGet.java DELETED --- --- Benchmark.java DELETED --- --- BenchmarkRunner.java DELETED --- --- JavaHashMapIteration.java DELETED --- --- TroveHashMapPut.java DELETED --- --- JavaHashMapPut.java DELETED --- --- TroveHashMapForEach.java DELETED --- --- TroveHashMapIteration.java DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:03:25
|
Update of /cvsroot/trove4j/trove/templates/gnu/trove/impl/sync In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16861/templates/gnu/trove/impl/sync Removed Files: Tag: TROVE_3_WORKING Synchronized_E_Collection.template Synchronized_K__V_Map.template Synchronized_E_ObjectMap.template Synchronized_E_List.template Synchronized_E_Set.template SynchronizedRandomAccess_E_List.template SynchronizedObject_E_Map.template Log Message: Delete content as it has been moved to CVS. README.txt details this. --- Synchronized_E_Collection.template DELETED --- --- Synchronized_K__V_Map.template DELETED --- --- Synchronized_E_ObjectMap.template DELETED --- --- Synchronized_E_List.template DELETED --- --- Synchronized_E_Set.template DELETED --- --- SynchronizedRandomAccess_E_List.template DELETED --- --- SynchronizedObject_E_Map.template DELETED --- |
From: Rob E. <ro...@us...> - 2010-09-27 18:02:55
|
Update of /cvsroot/trove4j/trove In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16790 Modified Files: Tag: TROVE_3_WORKING README.txt Log Message: Delete content as it has been moved to CVS. README.txt details this. Index: README.txt =================================================================== RCS file: /cvsroot/trove4j/trove/README.txt,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** README.txt 1 Nov 2007 16:08:14 -0000 1.3 --- README.txt 27 Sep 2010 18:02:45 -0000 1.3.2.1 *************** *** 1,116 **** ! GNU Trove: High performance collections for Java. ! ! Objectives ! ! The GNU Trove library has two objectives: ! 1. Provide "free" (as in "free speech" and "free beer"), fast, ! lightweight implementations of the java.util Collections API. ! These implementations are designed to be pluggable replacements ! for their JDK equivalents. ! 2. Whenever possible, provide the same collections support for ! primitive types. This gap in the JDK is often addressed by using ! the "wrapper" classes (java.lang.Integer, java.lang.Float, etc.) ! with Object-based collections. For most applications, however, ! collections which store primitives directly will require less ! space and yield significant performance gains. ! ! Hashtable techniques ! ! The Trove maps/sets use open addressing instead of the chaining ! approach taken by the JDK hashtables. This eliminates the need to ! create Map.Entry wrappper objects for every item in a table and so ! reduces the O (big-oh) in the performance of the hashtable algorithm. ! The size of the tables used in Trove's maps/sets is always a prime ! number, improving the probability of an optimal distribution of ! entries across the table, and so reducing the likelihood of ! performance-degrading collisions. Trove sets are not backed by maps, ! and so using a THashSet does not result in the allocation of an unused ! "values" array. ! ! Hashing strategies ! ! Trove's maps/sets support the use of custom hashing strategies, ! allowing you to tune collections based on characteristics of the input ! data. This feature also allows you to define hash functions when it is ! not feasible to override Object.hashCode(). For example, the ! java.lang.String class is final, and its implementation of hashCode() ! takes O(n) time to complete. In some applications, however, it may be ! possible for a custom hashing function to save time by skipping ! portions of the string that are invariant. ! ! Using java.util.HashMap, it is not possible to use Java language ! arrays as keys. For example, this code: ! char[] foo, bar; ! foo = new char[] {'a','b','c'}; ! bar = new char[] {'a','b','c'}; ! System.out.println(foo.hashCode() == bar.hashCode() ? "equal" : "not equal" ! ); ! System.out.println(foo.equals(bar) ? "equal" : "not equal"); ! ! ! produces this output: ! not equal ! not equal ! ! ! And so an entry stored in a java.util.HashMap with foo as a key could ! not be retrieved with bar, since there is no way to override ! hashCode() or equals() on language array objects. ! ! In a gnu.trove.THashMap, however, you can implement a ! TObjectHashingStrategy to enable hashing on arrays: ! class CharArrayStrategy implements TObjectHashingStrategy { ! public int computeHashCode(Object o) { ! char[] c = (char[])o; ! // use the shift-add-xor class of string hashing functions ! // cf. Ramakrishna and Zobel, "Performance in Practice of String Ha ! shing Functions" ! int h = 31; // seed chosen at random ! for (int i = 0; i < c.length; i++) { // could skip invariants ! h = h ^ ((h << 5) + (h >> 2) + c[i]); // L=5, R=2 works well fo ! r ASCII input ! } ! return h; ! } ! ! public boolean equals(Object o1, Object o2) { ! char[] c1 = (char[])o1; ! char[] c2 = (char[])o2; ! if (c1.length != c2.length) { // could drop this check for fixed-le ! ngth keys ! return false; ! } ! for (int i = 0, len = c1.length; i < len; i++) { // could skip inva ! riants ! if (c1[i] != c2[i]) { ! return false; ! } ! } ! return true; ! } ! } ! ! ! Iterators in primitive collections ! ! As of release 0.1.7, Trove's primitive mappings include access through ! Iterators as well as procedures and functions. The API documentation ! on those classes contains several examples showing how these can be ! used effectively and explaining why their semantics differ from those ! of java.util.Iterator. ! ! Miscellaneous ! ! N.B. using Map.entrySet on a Trove Map is supported, but not ! encouraged. The reason is that this API requires the creation of the ! Map.Entry Objects that all other parts of Trove manage to avoid. An ! alternative is to implement the appropriate Procedure interface and ! use it to invoke the Map's forEachEntry API. Map.keySet and Map.values ! are not similarly encumbered; nevertheless, the forEachKey, ! forEachValue, and transformValues APIs will yield slightly better ! performance at the cost of compatibility with the interface of ! java.util.Map. ! _________________________________________________________________ ! ! Last modified: Mon Sep 23 18:22:39 PDT 2002 --- 1,3 ---- + The Trove 3.x code has been moved to SVN, available at: ! https://trove4j.svn.sourceforge.net/svnroot/trove4j \ No newline at end of file |
From: Rob E. <ro...@us...> - 2010-09-27 17:23:16
|
Update of /cvsroot/trove4j/trove/test/gnu/trove/list/linked In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4925/test/gnu/trove/list/linked Modified Files: Tag: TROVE_3_WORKING TLinkedListTest.java Log Message: Fix for bug 2993599 - TLinkedList is not a correct AbstractSequentialList Fix swap() behavior in iterator to make Collections.shuffle() behave. Index: TLinkedListTest.java =================================================================== RCS file: /cvsroot/trove4j/trove/test/gnu/trove/list/linked/Attic/TLinkedListTest.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** TLinkedListTest.java 5 Sep 2009 00:10:06 -0000 1.1.2.3 --- TLinkedListTest.java 27 Sep 2010 17:23:07 -0000 1.1.2.4 *************** *** 21,32 **** package gnu.trove.list.linked; - import junit.framework.*; - - import java.io.*; - import java.util.*; - import gnu.trove.list.TLinkable; import gnu.trove.procedure.TObjectProcedure; --- 21,33 ---- package gnu.trove.list.linked; import gnu.trove.list.TLinkable; import gnu.trove.procedure.TObjectProcedure; + import junit.framework.TestCase; + import java.io.ByteArrayInputStream; + import java.io.ByteArrayOutputStream; + import java.io.ObjectInputStream; + import java.io.ObjectOutputStream; + import java.util.*; *************** *** 907,910 **** --- 908,1053 ---- + public void testJDKIteratorSet2() { + LinkedList<Data> list = new LinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 9 ) ); + list.add( new Data( 3 ) ); + + ListIterator<Data> it = ( ListIterator<Data> ) list.iterator(); + + assertEquals( 1, it.next()._val ); + assertEquals( 9, it.next()._val ); + it.set( new Data( 2 ) ); + + assertEquals( 3, it.next()._val ); + + assertEquals( 3, list.size() ); + assertEquals( 1, list.get( 0 )._val ); + assertEquals( 2, list.get( 1 )._val ); + assertEquals( 3, list.get( 2 )._val ); + } + + + public void testIteratorSet2() { + TLinkedList<Data> list = new TLinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 9 ) ); + list.add( new Data( 3 ) ); + + ListIterator<Data> it = ( ListIterator<Data> ) list.iterator(); + + assertEquals( 1, it.next()._val ); + assertEquals( 9, it.next()._val ); + it.set( new Data( 2 ) ); + + assertEquals( 3, it.next()._val ); + + assertEquals( 3, list.size() ); + assertEquals( 1, list.get( 0 )._val ); + assertEquals( 2, list.get( 1 )._val ); + assertEquals( 3, list.get( 2 )._val ); + } + + + // See bug 2993599 + public void testShuffle() { + for( int loop = 0; loop < 10000; loop++ ) { + if ( ( loop % 10000 ) ==0 ) System.out.println( "Loop: " + loop ); + TLinkedList<Data> list = new TLinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 2 ) ); + list.add( new Data( 3 ) ); + list.add( new Data( 4 ) ); + list.add( new Data( 5 ) ); + list.add( new Data( 6 ) ); + list.add( new Data( 7 ) ); + list.add( new Data( 8 ) ); + list.add( new Data( 9 ) ); + list.add( new Data( 10 ) ); + + Collections.shuffle( list ); + + assertEquals( 10, list.size() ); + + // Make sure all numbers are contained in the list exactly once + for( int i = 1; i <= 10; i++ ) { + boolean found_it = false; + for( Data data : list ) { + if ( data._val == i ) { + assertFalse( "Number found twice: " + i, found_it ); + found_it = true; + } + } + assertTrue( "Number not found: " + i, found_it ); + } + } + } + + + public void testShuffle2() { + Data data1 = new Data( 1 ); + Data data2 = new Data( 2 ); + Data data3 = new Data( 3 ); + Data data4 = new Data( 4 ); + Data data5 = new Data( 5 ); + Data data6 = new Data( 6 ); + Data data7 = new Data( 7 ); + Data data8 = new Data( 8 ); + Data data9 = new Data( 9 ); + Data data10 = new Data( 10 ); + + TLinkedList<Data> list = new TLinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 2 ) ); + list.add( new Data( 3 ) ); + list.add( new Data( 4 ) ); + list.add( new Data( 5 ) ); + list.add( new Data( 6 ) ); + list.add( new Data( 7 ) ); + list.add( new Data( 8 ) ); + list.add( new Data( 9 ) ); + list.add( new Data( 10 ) ); + + ListIterator<Data> it = ( ListIterator<Data> ) list.iterator(); + it.next(); + it.set( data10 ); + } + + public void testFirstLastIteratorSwap() { + Data data10 = new Data( 10 ); + + TLinkedList<Data> list = new TLinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 2 ) ); + list.add( new Data( 3 ) ); + list.add( new Data( 4 ) ); + list.add( new Data( 5 ) ); + list.add( new Data( 6 ) ); + list.add( new Data( 7 ) ); + list.add( new Data( 8 ) ); + list.add( new Data( 9 ) ); + list.add( data10 ); + + ListIterator<Data> it = ( ListIterator<Data> ) list.iterator(); + it.next(); + it.set( data10 ); + } + + public void testIteratorSwapSequential() { + Data slot3 = new Data( 3 ); + TLinkedList<Data> list = new TLinkedList<Data>(); + list.add( new Data( 1 ) ); + list.add( new Data( 2 ) ); + list.add( slot3 ); + list.add( new Data( 4 ) ); + + + ListIterator<Data> it = ( ListIterator<Data> ) list.iterator(); + it.next(); + it.next(); + it.set( slot3 ); + } + + static class Data implements TLinkable<Data> { |
From: Rob E. <ro...@us...> - 2010-09-27 17:23:16
|
Update of /cvsroot/trove4j/trove/src/gnu/trove/list/linked In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4925/src/gnu/trove/list/linked Modified Files: Tag: TROVE_3_WORKING TLinkedList.java Log Message: Fix for bug 2993599 - TLinkedList is not a correct AbstractSequentialList Fix swap() behavior in iterator to make Collections.shuffle() behave. Index: TLinkedList.java =================================================================== RCS file: /cvsroot/trove4j/trove/src/gnu/trove/list/linked/Attic/TLinkedList.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** TLinkedList.java 4 Sep 2009 12:32:34 -0000 1.1.2.2 --- TLinkedList.java 27 Sep 2010 17:23:07 -0000 1.1.2.3 *************** *** 786,799 **** } - // need to check both, since this could be the only - // element in the list. - if ( _lastReturned == _head ) { - _head = linkable; - } - - if ( _lastReturned == _tail ) { - _tail = linkable; - } - swap( _lastReturned, linkable ); _lastReturned = linkable; --- 786,789 ---- *************** *** 808,824 **** */ private void swap( T from, T to ) { ! T p = from.getPrevious(); ! T n = from.getNext(); ! if ( null != p ) { ! to.setPrevious( p ); ! p.setNext( to ); ! } ! if ( null != n ) { ! to.setNext( n ); ! n.setPrevious( to ); ! } ! from.setNext( null ); ! from.setPrevious( null ); } } --- 798,848 ---- */ private void swap( T from, T to ) { ! T from_p = from.getPrevious(); ! T from_n = from.getNext(); ! T to_p = to.getPrevious(); ! T to_n = to.getNext(); ! ! // NOTE: 'to' cannot be null at this point ! if ( from_n == to ) { ! if ( from_p != null ) from_p.setNext( to ); ! to.setPrevious( from_p ); ! to.setNext( from ); ! from.setPrevious( to ); ! from.setNext( to_n ); ! if ( to_n != null ) to_n.setPrevious( from ); ! } ! // NOTE: 'from' cannot be null at this point ! else if ( to_n == from ) { ! if ( to_p != null ) to_p.setNext( to ); ! to.setPrevious( from ); ! to.setNext( from_n ); ! from.setPrevious( to_p ); ! from.setNext( to ); ! if ( from_n != null ) from_n.setPrevious( to ); ! } ! else { ! from.setNext( to_n ); ! from.setPrevious( to_p ); ! if ( to_p != null ) to_p.setNext( from ); ! if ( to_n != null ) to_n.setPrevious( from ); ! ! to.setNext( from_n ); ! to.setPrevious( from_p ); ! if ( from_p != null ) from_p.setNext( to ); ! if ( from_n != null ) from_n.setPrevious( to ); ! } ! ! if ( _head == from ) _head = to; ! else if ( _head == to ) _head = from; ! ! if ( _tail == from ) _tail = to; ! else if ( _tail == to ) _tail = from; ! ! if ( _lastReturned == from ) _lastReturned = to; ! else if ( _lastReturned == to ) _lastReturned = from; ! ! if ( _next == from ) _next = to; ! else if ( _next == to ) _next = from; } } |
From: Rob E. <ro...@us...> - 2010-03-23 18:26:47
|
Update of /cvsroot/trove4j/trove/idea In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27201/idea Modified Files: Tag: TROVE_3_WORKING Trove.ipr Log Message: Updated IDEA file Index: Trove.ipr =================================================================== RCS file: /cvsroot/trove4j/trove/idea/Attic/Trove.ipr,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Trove.ipr 28 Jan 2010 22:33:32 -0000 1.1.2.1 --- Trove.ipr 23 Mar 2010 18:26:38 -0000 1.1.2.2 *************** *** 32,35 **** --- 32,38 ---- <annotationProcessing enabled="false" useClasspath="true" /> </component> + <component name="CopyrightManager" default=""> + <module2copyright /> + </component> <component name="DependencyValidationManager"> <option name="SKIP_IMPORT_STATEMENTS" value="false" /> *************** *** 208,212 **** <option name="MAIN_CLASS_NAME" value="gnu.trove.generator.Generator" /> <option name="VM_PARAMETERS" value="" /> ! <option name="PROGRAM_PARAMETERS" value="templates ../gen_output" /> <option name="WORKING_DIRECTORY" value="file://$TROVE_VCS_ROOT$" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> --- 211,215 ---- <option name="MAIN_CLASS_NAME" value="gnu.trove.generator.Generator" /> <option name="VM_PARAMETERS" value="" /> ! <option name="PROGRAM_PARAMETERS" value="-c templates ../gen_output" /> <option name="WORKING_DIRECTORY" value="file://$TROVE_VCS_ROOT$" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> *************** *** 222,225 **** --- 225,234 ---- </configuration> </component> + <component name="RMI Configuration"> + <Server /> + <Port>0</Port> + <ProjectOutput>false</ProjectOutput> + <CODEBASE /> + </component> <component name="SvnBranchConfigurationManager"> <option name="mySupportsUserInfoFilter" value="true" /> |