Latest 1.0.5
Homepage https://github.com/joshpc/JTBinaryHeap
License MIT
Frameworks Foundation
Authors

A simple Objective-C wrapper for CFBinaryHeap for use in both Objective-C/Swift projects. This is effectively a min-heap.

Usage

  1. Import the data structure #import "JTBinaryHeap"
  2. Add items to it using addValue:
  3. Use minimumValue or extractMinimumValue to get the smallest value in the min-heap.
JTBinaryHeap *heap = [[JTBinaryHeap alloc] init];
[heap addValue:@"Banana"];
[heap addValue:@"Dinosaur"];
NSString *minimumValue = [heap minimumValue]; //will be @"Banana"

Swift Notes

  1. Import the data structure import JTBinaryHeap into your swift files
  2. Add items using addValue(...)
  3. Use minimumValue or extractMinimumValue to get the smallest value in the min-heap.
var heap = JTBinaryHeap()
heap.addValue("Banana")
heap.addValue("Dinosaur")
let minimumValue = head.minimumValue()

Latest podspec

{
    "name": "JTBinaryHeap",
    "version": "1.0.5",
    "summary": "A simple CFBinaryHeap wrapper in Objective-C for simple consumption in Obj-C / Swift Projects.",
    "homepage": "https://github.com/joshpc/JTBinaryHeap",
    "license": "MIT",
    "authors": {
        "Joshua Tessier": "[email protected]"
    },
    "source": {
        "git": "https://github.com/joshpc/JTBinaryHeap.git",
        "tag": "1.0.5"
    },
    "requires_arc": true,
    "source_files": "JTBinaryHeap/**/*.m",
    "frameworks": "Foundation",
    "subspecs": [
        {
            "name": "Headers",
            "source_files": "JTBinaryHeap/**/*.h"
        }
    ]
}

Pin It on Pinterest

Share This