OKAMutableDirectedGraph
Mutable Directed Graph in Objective C
Install / Use
/learn @ollieatkinson/OKAMutableDirectedGraphREADME
OKAMutableDirectedGraph

OKAMutableDirectedGraph is an implementation of a directed graph in Objective-C.
OKAMutableDirectedGraph was developed originally for managing dependencies - but it can be used for path finding, sorting, garbage collection and much more.
Example Usage
NSString *a = @"a";
NSString *b = @"b";
NSString *c = @"c";
OKAMutableDirectedGraph *graph = [[OKAMutableDirectedGraph alloc] init];
for (NSString *job in @[ a, b, c ]) {
[graph addNode:job];
}
[graph addEdgeFrom:c to:b];
[graph addEdgeFrom:b to:a];
NSMutableArray *sorted = [NSMutableArray array];
do {
NSArray *heads = graph.heads;
for (NSString *job in heads) {
[graph removeNode:job];
[sorted addObject:job];
}
} while (graph.heads.count != 0);
(lldb) sorted => @[ c, b, a ]
Documentation & Research
Princeton University - Directed Graphs
Contact
Oliver Atkinson
Licence
OKAMutableDirectedGraph is available under the MIT license. See the LICENSE file for more info.
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
