[Biococoa-dev] biococoa svn and everything
Scott Christley
schristley at mac.com
Wed Oct 3 19:54:23 EDT 2007
Hey Koen,
On Sep 26, 2007, at 8:53 PM, Koen van der Drift wrote:
> I noticed you did a lot of updates recently with these class - this
> is great. Form your comments in the code I have a hard time
> understanding what exactly a suffix array is (I'm an analytical
> chemist that mainly works with proteins, so pardon my
> ignorance ;-) Maybe you could add some more info in the source
> code to help better understand these classes?
Definitely! I noticed that there is a documentation setup similar to
how javadoc works, so I will eventually add those comments. I tend
to be an iterative programmer, trying out a design then tweaking it
until it converges on a best setup, so I think I'm getting there and
once I do I will document more thoroughly. The suffix array is a
nifty data structure, it essentially holds all of the strings in a
sequence in sorted order, making it quick to search for exact string
matches.
> Another question I have is why you are using calls such as fopen,
> fread, etc instead of the methods that Obj-C and Cocoa provide for
> I/O. Mind you, I am just trying to understand the code, it's no
> criticism at all.
I presume you mean NSFileHandle? I was actually thinking of using
it, the current code which uses fopen, fread, etc is from the
original code for my standalone programs. The main reason why I
didn't switch over is that NSFileHandle can only return data with
NSData, and the type of programs which use suffix arrays and etc do
alot of file reading, which would mean lots and lots of NSData
objects being created and released. If only NSFileHandle could put
the data directly into a buffer provided by the user, or an existing
NSMutableData, that would be perfect.
cheers
Scott
More information about the Biococoa-dev
mailing list