Questions tagged [chdatastructures]

Use this tag for questions related to CHDataStructures, a library of standard data structures for Objective-C.

is a library of standard data structures which can be used in any Objective-C program, for educational purposes, or as a foundation for other data structures to build on. Data structures in this library adopt Objective-C protocols that define the functionality of and API for interacting with any implementation thereof, regardless of its internals.

as mentioned here.


If you are using this tag, then you should probably use as well.

13 questions
47
votes
3 answers

Implementing -hash / -isEqual: / -isEqualTo...: for Objective-C collections

Note: The following SO questions are related, but neither they nor the linked resources seem to fully answer my questions, particularly in relation to implementing equality tests for collections of objects. Best practices for overriding -isEqual:…
Quinn Taylor
  • 44,553
  • 16
  • 113
  • 131
11
votes
1 answer

Objective-C Data Structures (Building my own DAWG)

After not programming for a long, long time (20+ years) I'm trying to get back into it. My first real attempt is a Scrabble/Words With Friends solver/cheater (pick your definition). I've built a pretty good engine, but it's solves the problems…
10
votes
9 answers

Naming a dictionary structure that stores keys in a predictable order?

Note: Although my particular context is Objective-C, my question actually transcends programming language choice. Also, I tagged it as "subjective" since someone is bound to complain otherwise, but I personally think it's almost entirely objective.…
7
votes
1 answer

How to implement CHCircularBuffer in iOS project?

for my game iOS project I need a ring buffer. It should work similar to a queue where elements go out and go in but the total amount of elements in the buffer should stay the same. I implemented the ring buffer successfully using java but I am not…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
5
votes
2 answers

Creating an Xcode data formatter bundle for custom Obj-C objects

To help simplify debugging of some custom Objective-C objects in the Xcode debugger window, I've created a set of data formatter strings for each of the objects, using the related Apple documentation and Xcode's built-in data formatters as a…
Quinn Taylor
  • 44,553
  • 16
  • 113
  • 131
3
votes
1 answer

How to create framework from Xcode 4 project?

I want to use CHDataStructures as framework: https://github.com/davedelong/CHDataStructures. However there is no binary of the project. So I assume I have to build the .a file myself using xcode. How do I do that in xcode 4? I read the…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
3
votes
1 answer

CHDataStructures.framework won't compile for iOS in Xcode 4

I downloaded CHDataStructures source code (r709), and tried to compile the iOS static library under xCode 4. It complained when compiling: Can anyone give me some ideas how to compile it?
Jack
  • 3,913
  • 8
  • 41
  • 66
3
votes
1 answer

Using CHDataStructures.framework on iPhone

I'm new to iPhone programming and I'm trying to use CHDataStructures in my project. But I'm running into some issues: When I directly try to build it right after download I get the error "Foundation/Foundation.h" no such file or directory. The…
nununo
  • 223
  • 2
  • 11
2
votes
2 answers

Linking error duplicate symbol _kCHPointerSize with CHDataStructure static lib

I am trying to use the CHDataStructures static library for iPhone in my Xcode project. I included it with # import "CHDataStructures.h" in my class header. However, when I compile my project I get the error: d: duplicate symbol _kCHPointerSize in…
1
vote
1 answer

CHDataStructures: Priority Queue?

I need a priority queue, I guess in the framework, CHMutableArrayHeap and CHBinaryHeap can do the job, right? However, if i send objects with identical priority to the queue, both CHMutableArrayHeap and CHBinaryHeap cannot maintain their adding…
Jack
  • 3,913
  • 8
  • 41
  • 66
0
votes
1 answer

How to implement circular buffer in Objective C for high performance

We want to add an array of doubles to a circular buffer in Objective C many times a second. We are currently using a NSMutableArray nested within another NSMutableArray (2D array). This works fine but is too slow for our needs. We want to add to the…
0
votes
1 answer

CHDataStructures CHMutableDictionary HIDDEN void createCollectableCFMutableDictionary

Attempting to compile trunk@711 on OSX 10.8 with Xcode 4.5.2 getting compilation error. CHMutableDictionary.m:54 Conflicting types for 'createCollectableCFMutableDictionary' Looking at CHMutableDictionary.h:14 HIDDEN void…
Bob Tanner
  • 250
  • 1
  • 2
  • 5
0
votes
2 answers

Is CHDataStructures ARC-compliant?

The documentation probably says, but I'm a newbie and can't yet make sense of it all. I'm having all sorts of ARC errors trying to use it, but I'm hoping it's just my own mistake(s).