Re: arrays of doubles
Re: arrays of doubles
- Subject: Re: arrays of doubles
- From: Boyd Collier <email@hidden>
- Date: Sat, 4 Feb 2006 15:33:24 -0800
Hi Daniel,
Thanks very much for the response and the code, which is very similar
to what I wrote. I had, however, forgotten about calloc and so had
set up a loop within a method called initWithZeros: to zero out all
the elements of the vector being created. Using calloc is probably
faster and certainly tidier.
Boyd
On Feb 3, 2006, at 2:00 PM, Daniel J Farrell wrote:
Hi Boyd,
I doing similar things and have made a wrapper for a malloc-ed C
arrray. Your welcome to have the code, it's not a 'library' as such
but just a very simple class (http://www.boyfarrell.com/projects/
dynamicdouble/dynamicdouble.zip). I recently abandoned it after
proving the concept because I realised I needed something with
arbitrary precision (http://www.boyfarrell.com/projects/).
Contact me if you need any help with that.
Daniel
On 3 Feb 2006, at 20:12, Boyd Collier wrote:
I've created some rather simple classes to deal with arrays and
matrices of doubles, etc. that I use in carrying out a lot of
statistical number crunching. My motivation is that it seems like
working strictly with NSNumber is cocoa and OOP overkill (at least
for my purposes), and as an old c-coder with lots of legacy code
that makes use of arrays of doubles, I find it a lot easier to
think in these terms. Thus far, I've not run into any problems
with my code, but it seems likely that I'm re-inventing the
wheel. Surely someone else using cocoa for scientific computing
has already created a nice family of classes that handle arrays
and matrices of ints and doubles. I know that this sort of stuff
is common in c++, but from what I've read on this list, I'd like
to avoid using both objective-c and c++ in the same project. If
someone knows of an objective-c library for doing this sort of
thing, I'd very much appreciate receiving information about it.
Thanks, Boyd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40imperial.ac.uk
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden