Swiftpack.co - Package - dn-m/Structure

Structure

Swift Build Status

The Structure package defines algebraic and data structures in Swift 4.2, along with algorithms to be performed over them.

Modules

The contents of this Swift package are split amongst four modules.

Destructure

Deconstruct Sequence types for functional-style recursive algorithms.

Algebra

Protocols and structures for defining types like Semigroup, Monoid, and Group.

DataStructures

  • Linear data structures (Stack, Queue, LinkedList, Matrix, SortedArray, and more)
  • Hash-based structures (OrderedDictionary, SortedDictionary)
  • Tree structures (Tree, BinarySearchTree, AVLTree)
  • Graph structures (Graph, WeightedGraph, DirectedGraph, WeightedDirectedGraph)

Algorithms

Algorithms for restructuring elements in Sequence and Collection types, like subsets and combinations.

Getting Started

Requirements

Installation

To include the Structure package in your own project, add it to the dependencies section of your Package.swift file:

let package = Package(
    name: ...,
    products: [ ... ],
    dependencies: [
        ...,
        .package(url: "https://github.com/dn-m/Structure", from: "0.19.0")
    ],
    targets: [ ... ]
)

To use a given module in your own project, import the desired module:

import Algebra
import Destructure
import DataStructures
import Algorithms

Development

To contribute to the Structure package, clone the git repository:

git clone https://github.com/dn-m/Structure && cd Structure

Build the package:

swift build

Run the tests:

swift test

If you use the Xcode IDE, use Swift Package Manager to generate an .xcodeproj file:

swift package generate-xcodeproj

Github

link
Stars: 3
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.19.4 - Nov 12, 2018

0.19.3 - Oct 23, 2018

0.19.2 - Oct 20, 2018

0.19.1 - Oct 11, 2018

0.19.0 - Sep 29, 2018