-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
157 lines (127 loc) · 4.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>dn-m | Structure</title>
<link rel="stylesheet" type="text/css" href="../../../assets/css/jazzy.css">
<link rel="stylesheet" type="text/css" href="../../../assets/css/highlight.css">
<meta charset="utf-8">
<script src="../../../assets/js/jquery.min.js" defer></script>
<script src="../../../assets/js/jazzy.js" defer></script>
</head>
<body>
<a title="dn-m | Structure"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
dn-m Docs
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/dn-m/">
<img class="header-icon" src="../../../assets/img/gh.png">
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="https://dn-m.github.io">dn-m Reference</a>
<img class="carat" src="../../../assets/img/carat.png">
Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name" id="Modules">
<span class="nav-group-name-link">Modules</span>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/Destructure/index.html">Destructure</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/Algebra/index.html">Algebra</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/DataStructures/index.html">DataStructures</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/Algorithms/index.html">Algorithms</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content">
<h1>Structure</h1>
<p><img src="https://img.shields.io/badge/Swift-5.0-brightgreen.svg" alt="Swift">
<a href="https://travis-ci.org/dn-m/Structure"><img src="https://travis-ci.org/dn-m/Structure.svg?branch=master" alt="Build Status"></a></p>
<p>The <code>Structure</code> package defines algebraic and data structures in Swift 4.2, along with algorithms to be performed over them.</p>
<h2>Modules</h2>
<p>The contents of this Swift package are split amongst four modules. </p>
<h4><a href="https://github.com/dn-m/Structure/tree/master/Sources/Destructure"><code>Destructure</code></a></h4>
<p>Deconstruct <code>Sequence</code> types for functional-style recursive algorithms.</p>
<h4><a href="https://github.com/dn-m/Structure/tree/master/Sources/Algebra"><code>Algebra</code></a></h4>
<p>Protocols and structures for defining types like <code>Semigroup</code>, <code>Monoid</code>, and <code>Group</code>.</p>
<h4><a href="https://github.com/dn-m/Structure/tree/master/Sources/DataStructures"><code>DataStructures</code></a></h4>
<ul>
<li>Linear data structures (<code>Stack</code>, <code>Queue</code>, <code>LinkedList</code>, <code>Matrix</code>, <code>SortedArray</code>, and more)</li>
<li>Hash-based structures (<code>OrderedDictionary</code>, <code>SortedDictionary</code>)</li>
<li>Tree structures (<code>Tree</code>, <code>BinarySearchTree</code>, <code>AVLTree</code>)</li>
<li>Graph structures (<code>Graph</code>, <code>WeightedGraph</code>, <code>DirectedGraph</code>, <code>WeightedDirectedGraph</code>)</li>
</ul>
<h4><a href="https://github.com/dn-m/Structure/tree/master/Sources/Algorithms"><code>Algorithms</code></a></h4>
<p>Algorithms for restructuring elements in <code>Sequence</code> and <code>Collection</code> types, like <code>subsets</code> and <code>combinations</code>.</p>
<h2>Getting Started</h2>
<h3>Requirements</h3>
<ul>
<li>Swift 4.2 (default in Xcode 10)</li>
<li><a href="https://swift.org/package-manager/">Swift Package Manager</a></li>
</ul>
<h3>Installation</h3>
<p>To include the <code>Structure</code> package in your own project, add it to the <code>dependencies</code> section of your <code>Package.swift</code> file:</p>
<p><code>Swift
let package = Package(
name: ...,
products: [ ... ],
dependencies: [
...,
.package(url: "https://github.com/dn-m/Structure", from: "0.19.0")
],
targets: [ ... ]
)
</code></p>
<p>To use a given module in your own project, import the desired module:</p>
<p><code>Swift
import Algebra
import Destructure
import DataStructures
import Algorithms
</code></p>
<h3>Development</h3>
<p>To contribute to the <code>Structure</code> package, clone the <code>git</code> repository:</p>
<p><code>
git clone https://github.com/dn-m/Structure && cd Structure
</code></p>
<p>Build the package:</p>
<p><code>
swift build
</code></p>
<p>Run the tests:</p>
<p><code>
swift test
</code></p>
<p>If you use the Xcode IDE, use Swift Package Manager to generate an <code>.xcodeproj</code> file:</p>
<p><code>
swift package generate-xcodeproj
</code></p>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2019<a class="link" href="https://github.com/dn-m" target="_blank" rel="external">dn-m</a>. All rights reserved.</p>
</section>
</body>
</html>