EvgenyKarkan / EKAlgorithms

EKAlgorithms contains some well known CS algorithms & data structures.
MIT License
2.42k stars 362 forks source link

iOS Support #88

Closed aspcartman closed 10 years ago

aspcartman commented 10 years ago

Ported to iOS. Seems to work. #87

iOS doesn't implement NSComparisonMethods protocol since the one was made for MacOSX's scripting support. iOS doesn't deal with scripts.

Those methods, leaving scripting behind, are identical to the usual compare: and isEqual:.

Also had to change a class of weight property of EKEdge from NSObject to NSNumber. Why NSObject in the first place?

Made preprocessor's statements around imports in addition to ones in .h and .m files of iOS-only categories to protect them from IDE's import optimisations and suppression of warnings.

EvgenyKarkan commented 10 years ago

Hey! Thanks. I'll take a look for merge tonight. Best.

aspcartman commented 10 years ago

I had to make my own Graph implementation for top sort to actually work fast. Maybe you're are interested in such a donation, as a new EKTopSortGraph? =)

I can't figure out why EKGraph (I didn't look on other classes though) was implemented as it was implemented. It's unbelievably slow and O() of top sort algorithm in such implementation is huge.

EvgenyKarkan commented 10 years ago

You are welcome. We are open to any "fresh blood & brains" =) As I mentioned on read me, algorithms have no intention of being the best big O solution. Also it will be cool if you point us on slow solutions more detail. E.g : This code requires for optimization. Because - blah blah blah. By fixing it, we get super fast stuff (optimized time value) rather than slow stuff (initially time value). What do you think?