From 51e4cf7ac1f72beec4fc433a51e193d8559ea815 Mon Sep 17 00:00:00 2001 From: rfm Date: Wed, 4 Oct 2006 15:39:58 +0000 Subject: [PATCH] Hide skip list better. Bump version number for next release git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@23759 72102866-910b-0410-8b05-ffd578937521 --- GNUmakefile | 4 ++-- GSSkipMutableArray.h | 15 +++++---------- GSSkipMutableArray.m | 5 ++++- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 397f7a0..d2cfb75 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,7 +3,7 @@ include $(GNUSTEP_MAKEFILES)/common.make -include config.make PACKAGE_NAME = Performance -PACKAGE_VERSION = 0.1.0 +PACKAGE_VERSION = 0.2.0 CVS_MODULE_NAME = gnustep/dev-libs/Performance CVS_TAG_NAME = Performance @@ -12,7 +12,7 @@ TEST_TOOL_NAME= LIBRARY_NAME=Performance DOCUMENT_NAME=Performance -Performance_INTERFACE_VERSION=0.1 +Performance_INTERFACE_VERSION=0.2 Performance_OBJC_FILES += \ GSCache.m \ diff --git a/GSSkipMutableArray.h b/GSSkipMutableArray.h index 3567d7e..382173f 100644 --- a/GSSkipMutableArray.h +++ b/GSSkipMutableArray.h @@ -23,8 +23,8 @@ #include /** -

An NSMutableArray subclass which uses a skip list variant for - it's underlying data structure. +

An NSMutableArray category to provide an NSMutableArray instance + which uses a skip list variant for it's underlying data structure.

While a skip list is typically sorted and represents a dictionary. the indexed skip list is sorted by index and maintains deltas to represent @@ -68,17 +68,12 @@ index -> HEAD 1 2 3 4 5 6 TAIL memory overhead.

*/ -@interface GSSkipMutableArray : NSMutableArray -@end -/** - * This category just provides a simpole convenience method to obtain - * a GSSkipMutableArray instance; - */ @interface NSMutableArray (GSSkipMutableArray) /** - * Creates and returns an autoreleased GSSkipMutableArray. + * Creates and returns an autoreleased NSMutableArray implemented as a + * skip list for rapid insertion/deletion within very large arrays. */ -+ (GSSkipMutableArray*) skipArray; ++ (NSMutableArray*) skipArray; @end diff --git a/GSSkipMutableArray.m b/GSSkipMutableArray.m index 3fc54f3..5668b76 100644 --- a/GSSkipMutableArray.m +++ b/GSSkipMutableArray.m @@ -31,6 +31,9 @@ static Class abstractClass = 0; static Class concreteClass = 0; +@interface GSSkipMutableArray : NSMutableArray +@end + @interface GSConcreteSkipArray : GSSkipMutableArray { GSISList l; @@ -39,7 +42,7 @@ static Class concreteClass = 0; @end @implementation NSMutableArray (GSSkipMutableArray) -+ (GSSkipMutableArray*) skipArray ++ (NSMutableArray*) skipArray { return [GSSkipMutableArray array]; }