{"id":18271024,"url":"https://github.com/skyfe79/CHDataStructures","last_synced_at":"2025-04-05T01:31:01.460Z","repository":{"id":137746245,"uuid":"2496063","full_name":"skyfe79/CHDataStructures","owner":"skyfe79","description":null,"archived":false,"fork":true,"pushed_at":"2011-04-06T21:40:12.000Z","size":5456,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-05T11:53:17.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cocoaheads.byu.edu/code/chdatastructures","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"quinntaylor/CHDataStructures","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyfe79.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-01T18:47:02.000Z","updated_at":"2015-01-22T03:20:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa671eff-592f-46cf-a295-1420bc97d80f","html_url":"https://github.com/skyfe79/CHDataStructures","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FCHDataStructures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FCHDataStructures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FCHDataStructures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FCHDataStructures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyfe79","download_url":"https://codeload.github.com/skyfe79/CHDataStructures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276043,"owners_count":20912286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:39:01.644Z","updated_at":"2025-04-05T01:30:59.528Z","avatar_url":"https://github.com/skyfe79.png","language":"Objective-C","readme":"\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n\u003chead\u003e\n\t\u003ctitle\u003eREADME \u0026mdash; CHDataStructures.framework\u003c/title\u003e\n\t\u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/\u003e\n\t\u003cstyle type=\"text/css\" media=\"all\"\u003e\n\t\tbody {\n\t\t\tfont-family: \"Lucida Grande\", Verdana, Geneva, Arial, sans-serif;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\tp {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t\tli {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t\tli li {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\tcode {\n\t\t\tcolor: #007;\n\t\t}\n\t\u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eCHDataStructures.framework\u003c/h1\u003e\n\u003ch2\u003eVersion 1.4 \u0026mdash; 09 Feb 2010\u003c/h2\u003e\n\u003ch4\u003e\u003ca href=\"http://cocoaheads.byu.edu/code/CHDataStructures\"\u003ehttp://cocoaheads.byu.edu/code/CHDataStructures\u003c/a\u003e\u003c/h4\u003e\n\u003ch4\u003e\u0026copy; 2008\u0026ndash;2010 \u003ca href=\"http://homepage.mac.com/quinntaylor/\"\u003eQuinn Taylor\u003c/a\u003e \u0026mdash; BYU CocoaHeads\u003cbr /\u003e\n\u0026copy; 2002 \u003ca href=\"http://www.phillipmorelock.com/\"\u003ePhillip Morelock\u003c/a\u003e \u0026mdash; Los Angeles, CA\u003c/h4\u003e\n\u003c/div\u003e\n\n\u003ch2\u003eOverview\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eCHDataStructures\u003c/strong\u003e is a library of standard data structures which can be used in (virtually) any Objective-C program. 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.\u003c/p\u003e\n\u003cp\u003eThis library provides Objective-C implementations of common data structures which are currently beyond the purview of Apple's extensive and flexible \u003ca href=\"http://developer.apple.com/cocoa/\"\u003eCocoa frameworks\u003c/a\u003e. Collections that are a part of Cocoa are highly optimized and amenable to many situations. However, sometimes an honest-to-goodness stack, queue, linked list, tree, etc. can greatly improve the clarity and comprehensibility of code. The currently supported abstract data types include:\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Deque\"\u003edeque\u003c/a\u003e,\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Heap_(data_structure)\"\u003eheap\u003c/a\u003e,\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Linked_list\"\u003elinked list\u003c/a\u003e,\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Queue_(data_structure)\"\u003equeue\u003c/a\u003e,\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Stack_(data_structure)\"\u003estack\u003c/a\u003e, and\n\t\u003ca href=\"http://en.wikipedia.org/wiki/Tree_(data_structure)\"\u003etree\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThe code is written against Apple's \u003ca href=\"http://developer.apple.com/mac/library/documentation/cocoa/Reference/Foundation/ObjC_classic/Intro/IntroFoundation.html\"\u003eFoundation framework\u003c/a\u003e and uses some features of \u003ca href=\"http://developer.apple.com/leopard/overview/objectivec2.html\"\u003eObjective-C 2.0\u003c/a\u003e (present in OS X 10.5+ and iOS) when possible. Most of the code could be easily ported to other Objective-C environments (such as \u003ca href=\"http://www.gnustep.org\"\u003eGNUStep\u003c/a\u003e) but such efforts would be better accomplished by forking this project rather than integrating with it, for several main reasons:\u003c/p\u003e\n\u003col\u003e\n\t\u003cli\u003eSupporting multiple environments increases code complexity, and consequently the effort required to test, maintain, and improve it.\u003c/li\u003e\n\t\u003cli\u003eLibraries that have bigger and slower binaries to accommodate all possible platforms don't help the mainstream developer.\u003c/li\u003e\n\t\u003cli\u003eMac OS X is by far the most prevalent Objective-C environment in use, a trend which isn't likely to change soon.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eWhile certain implementations utilize straight C for their internals, this framework is fairly high-level, and uses composition rather than inheritance in most cases. The framework began its existence as an exercise in writing Objective-C code and consisted mainly of ported Java code. In later revisions, performance has gained greater emphasis, but the primary motivation is to provide friendly, intuitive Objective-C interfaces for data structures, not to maximize speed at any cost (a common outcome when using C++ and the STL). The algorithms should all be sound (i.e., you won't get O(n) performance when it should be O(log n) or O(1), etc.) and perform quite well in general. If your choice of data structure type and implementation are dependent on performance or memory usage, it would be wise to run the benchmarks from Xcode and choose based on the time and memory complexity for specific implementations.\u003c/p\u003e\n  \n\u003ch2\u003eGetting the Code\u003c/h2\u003e\n\u003cp\u003eAll source code and resources for the framework are freely available at \u003ca href=\"http://cocoaheads.byu.edu/code/CHDataStructures/\"\u003ethis link\u003c/a\u003e. They are organized in an Xcode 3 project with all relevant dependencies.\u003c/p\u003e\n\u003cp\u003eIf you only need a few of the classes in the framework, you can cut down on code size by either excluding parts you don't need from the framework, or just including the source you do need in your own code. Please don't forget to include relevant copyright and license information if you choose to do so!\u003c/p\u003e\n\u003cp\u003eThe original page for the framework when it was maintained by Phillip Morelock (back when its name was \"Cocoa Data Structures Framework\") is \u003ca href=\"http://www.phillipmorelock.com/examples/cocoadata/\"\u003e here.\u003c/a\u003e\u003c/p\u003e\n\n\u003ch2\u003eUsing the Library\u003c/h2\u003e\n\u003cp\u003eCHDataStructures builds for both OS X (as a framework) and iOS (as a static library, since third-party frameworks are not permitted). The following directions assume that you have either built the appropriate library form (framework or static library) from source, or are using a binary distribution. (When building from source, compile the All target in the Release configuration, which produces a disk image containing the binaries.)\u003c/p\u003e\n\u003cp\u003eNOTE: When using this library, if you get a \"Declaration does not declare anything\" compiler warning, set the \"C Language Dialect\" (\u003ccode\u003eGCC_C_LANGUAGE_STANDARD\u003c/code\u003e) setting in your target's build settings to \u003ccode\u003eGNU99 [-std=gnu99]\u003c/code\u003e.\u003c/p\u003e\n\n\u003ch3\u003eUsing the framework in a Mac application\u003c/h3\u003e\n\u003col\u003e\n  \u003cli\u003eOpen the Xcode project for your Mac application.\u003c/li\u003e\n  \u003cli\u003eAdd \u003ccode\u003eCHDataStructures.framework\u003c/code\u003e to your project by dragging it to the \"Groups \u0026amp; Files\" pane.\u003c/li\u003e\n  \u003cli\u003eExpand the appropriate target and use a \"Copy Files\" build phase to copy the framework to the \u003ccode\u003eContents/Frameworks/\u003c/code\u003e directory in your application bundle. (The executable path in the framework binary expects this location.)\u003c/li\u003e\n  \u003cli\u003eAdd \u003ccode\u003e#import \u0026lt;CHDataStructures/CHDataStructures.h\u0026gt;\u003c/code\u003e where necessary in your code.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eFor details or clarification about frameworks, consult the \u003ca href=\"http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/\"\u003eFramework Programming Guide\u003c/a\u003e.\u003c/p\u003e\n\n\u003ch3\u003eUsing the static library in an iOS app\u003c/h3\u003e\n\u003col\u003e\n  \u003cli\u003eOpen the Xcode project for your iOS app.\u003c/li\u003e\n  \u003cli\u003eAdd \u003ccode\u003elibCHDataStructures.a\u003c/code\u003e and the library header files to your project by dragging them to the \"Groups \u0026amp; Files\" pane. (You can organize the headers in their own physical directory and sidebar group to prevent clutter.)\u003c/li\u003e\n  \u003cli\u003eExpand the appropriate target and drag \u003ccode\u003elibCHDataStructures.a\u003c/code\u003e into the \"Link Binary With Libraries\" build phase.\u003c/li\u003e\n  \u003cli\u003eAdd \u003ccode\u003e#import \"CHDataStructures.h\"\u003c/code\u003e where necessary in your code.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eIf you have any issues with this approach, you can opt to drag \u003ccode\u003eCHDataStructures-iOS.xcodeproj\u003c/code\u003e into the \"Groups \u0026amp; Files\" pane and use the \u003ccode\u003elibCHDataStructures.a\u003c/code\u003e product from that project. In this case, you must also include \u003ccode\u003ePATH_TO_CHDATASTRUCTURES/source\u003c/code\u003e in Header Search Paths (\u003ccode\u003eHEADER_SEARCH_PATHS\u003c/code\u003e) for your target.\u003c/p\u003e\n\n\u003ch2\u003eDocumentation\u003c/h2\u003e\n\u003cp\u003eDocumentation is auto-generated after each Subversion commit, and is \u003ca href=\"http://dysart.cs.byu.edu/CHDataStructures/\"\u003eavailable online\u003c/a\u003e. You can also generate it yourself from the main Xcode project by building the \"Documentation\" target (if \u003ca href=\"http://doxygen.org\"\u003eDoxygen\u003c/a\u003e is installed and its executable is in your Unix \u003ccode\u003e$PATH\u003c/code\u003e variable).\u003c/p\u003e\n\n\u003ch2\u003eFuture Improvements\u003c/h2\u003e\n\u003cp\u003eLet's just say it: no software is perfect. It would be foolish (and a lie) to claim that this framework is flawless, or even complete. There are several things that could be improved, and admitting you have a problem is the first step.... Accordingly, the online documentation includes lists of \u003ca href=\"http://dysart.cs.byu.edu/CHDataStructures/bug.html\"\u003eknown bugs\u003c/a\u003e and \u003ca href=\"http://dysart.cs.byu.edu/CHDataStructures/todo.html\"\u003ewish list items\u003c/a\u003e that are documented in the code.\u003c/p\u003e\n\n\u003cp\u003ePlease know that it is not my intent to leave the hard things \"as an exercise to the reader.\" (Believe me, writing a generic, iterative, state-saving tree traversal enumerator was no walk in the park!) However, I would love to draw on the talents of others who can provide solutions which currently evade me, or which I haven't had time to implement yet. If you have ideas (or even better, a fix) for one of these items, \u003ca href=\"mailto:quinntaylor@mac.com?subject=CHDataStructures.framework\"\u003eemail me\u003c/a\u003e and we'll talk. Thanks!\u003c/p\u003e\n\n\u003ch2\u003eLicense Information\u003c/h2\u003e\n\u003cp\u003eThis framework is released under a variant of the \u003ca href=\"http://www.isc.org/software/license\"\u003eISC license\u003c/a\u003e, an extremely simple and permissive free software license (functionally equivalent to the \u003ca href=\"http://opensource.org/licenses/mit-license\"\u003eMIT license\u003c/a\u003e and two-clause \u003ca href=\"http://opensource.org/licenses/bsd-license\"\u003eBSD license\u003c/a\u003e) approved by the \u003ca href=\"http://opensource.org/licenses/isc-license\"\u003eOpen Source Initiative (OSI)\u003c/a\u003e and recognized as GPL-compatible by the \u003ca href=\"http://www.gnu.org/licenses/license-list.html#ISC\"\u003eGNU Project\u003c/a\u003e. The license is included in every source file, and is reproduced in its entirety here:\u003c/p\u003e\n\u003cblockquote\u003e\u003cem\u003ePermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\u003cbr/\u003e\n\u003cbr/\u003e\nThe software is provided \"as is\", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\u003c/em\u003e\u003c/blockquote\u003e\n\u003cp\u003eEarlier versions of this framework were released under a \u003ca href=\"http://www.gnu.org/copyleft/\"\u003ecopyleft license\u003c/a\u003e, which are generally unfriendly towards commercial software development.\u003c/p\u003e\n\u003cp\u003eThis README file is also considered a source file, and you must include it if you redistribute the framework in source form. If you change the framework, you should add your own README and include it with the source, describing your changes. If you contribute source code to the framework, you may keep your copyright or assign it to me, but you must agree to license the code under this license.\u003c/p\u003e\n\n\u003ch2\u003eContributing to the Framework\u003c/h2\u003e\n\u003cp\u003eAll contributions (including bug reports and fixes, optimizations, new data structures, etc.) are welcomed and encouraged. In keeping with this project's goals, new features are subject to consideration prior to approval\u0026mdash;there are no guarantees of adoption. Modifications that are deemed beneficial to the community as a whole will fit with the vision of this project and improve it. However, not all potential contributions make sense to add to the framework. For example, additions or enhancements that only apply for a specific project would be more appropriate to add as categories or subclasses in that code.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"mailto:quinntaylor@mac.com?subject=CHDataStructures.framework\"\u003e Email me\u003c/a\u003e if you're interested in contributing to the project, discussing improvements or additions you'd like to see, or even just letting me know that you're getting some use from it.\u003c/p\u003e\n\n\u003cp\u003eMajor contributors are listed below, alphabetically by last name:\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003cstrong\u003eOle Begemann\u003c/strong\u003e (\u003ca href=\"mailto:ole@oleb.net\"\u003eEmail\u003c/a\u003e, \u003ca href=\"http://oleb.net\"\u003eWebsite\u003c/a\u003e)\n    \u003cul\u003e\n      \u003cli\u003eAssistance with adapting framework to work on iOS; contribution of a unit test iOS app.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eMax Horn\u003c/strong\u003e (\u003ca href=\"mailto:max@quendi.de\"\u003eEmail\u003c/a\u003e, \u003ca href=\"http://www.quendi.de/\"\u003eWebsite\u003c/a\u003e)\n    \u003cul\u003e\n      \u003cli\u003eIdeas, example code, and impetus for conversions to C for speed.\u003c/li\u003e\n      \u003cli\u003eBugfixes and ideas for interface consistency.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003ePhillip Morelock\u003c/strong\u003e (\u003ca href=\"mailto:me@phillipmorelock.com\"\u003eEmail\u003c/a\u003e, \u003ca href=\"http://www.phillipmorelock.com/\"\u003eWebsite\u003c/a\u003e)\n    \u003cul\u003e\n      \u003cli\u003eProject inception, initial implementation, conversion of internals to straight C, maintenance.\u003c/li\u003e\n      \u003cli\u003eProtocols and implementations for stacks, queues, linked lists, and trees.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eQuinn Taylor\u003c/strong\u003e (\u003ca href=\"mailto:quinntaylor@mac.com\"\u003eEmail\u003c/a\u003e, \u003ca href=\"http://homepage.mac.com/quinntaylor/\"\u003eWebsite\u003c/a\u003e)\n    \u003cul\u003e\n      \u003cli\u003eConversion to \u003ccode\u003e.xcodeproj\u003c/code\u003e format, organization of project resources, use of Objective-C 2.0 features.\u003c/li\u003e\n\t  \u003cli\u003eRefactoring of protocols for performance, clarity, and compatibility with the Cocoa frameworks.\u003c/li\u003e\n\t  \u003cli\u003eImprovements to code comments; configured auto-generated documentation using \u003ca href=\"http://doxygen.org\"\u003eDoxygen\u003c/a\u003e.\u003c/li\u003e\n\t  \u003cli\u003eAddition of \u003ca href=\"http://www.sente.ch/software/ocunit/\"\u003eOCUnit\u003c/a\u003e unit tests, code coverage, and a simple benchmarking driver.\u003c/li\u003e\n\t  \u003cli\u003eBugfixes and new features, including abstract classes and more Cocoa-like exception handling.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eJulienne Walker\u003c/strong\u003e (\u003ca href=\"mailto:happyfrosty@hotmail.com\"\u003eEmail\u003c/a\u003e, \u003ca href=\"http://eternallyconfuzzled.com/\"\u003eWebsite\u003c/a\u003e)\n    \u003cul\u003e\n      \u003cli\u003eIndirect contributions to binary search tree code, via code and tutorials in the public domain on her website. Many thanks!\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2FCHDataStructures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfe79%2FCHDataStructures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2FCHDataStructures/lists"}