Re: A Matrix collection class
Re: A Matrix collection class
- Subject: Re: A Matrix collection class
- From: email@hidden
- Date: Tue, 07 May 2002 12:14:09 -0700
Chris Purcell wrote:
|Does anyone know of a good implementation of a matrix collection class -
|a multi-dimensional array class without the overheads of NSDictionary?
Would an array of arrays (technically, an NSArray containing NSArrays) work? (I don't think I'd even consider NSDictionary to implement a matrix, unless maybe you want a sparse matrix.) You could wrap it in its own class to hide the ugliness. For example:
- (id) objectAtRow: (int) r column: (int) c
{
return [[iMatrix objectAtIndex: r] objectAtIndex: c];
}
Glen Fisher
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.