Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

Commit da35017

Browse files
committed
Add documentation to project, fixes #98
- Add base requirements file and doc requirements - Drastically clean up README and index on docs - Add Sorting docs - Add Shuffling docs - Add random docs - Add searching docs - Add math docs - Add factorization docs - Add dynamic programming docs - Add data structures docs
1 parent 6d059e4 commit da35017

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1705
-453
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ build/
88
/dist/
99
/*.egg-info
1010
*.ropeproject/
11+
docs/_build

README.rst

+20-83
Original file line numberDiff line numberDiff line change
@@ -7,94 +7,42 @@ Algorithms
77
.. image:: http://codecov.io/github/nryoung/algorithms/coverage.svg?branch=master
88
:target: http://codecov.io/github/nryoung/algorithms?branch=master
99

10-
This is an attempt to build a cohesive module of algorithms in Python.
10+
Algorithms is a library of algorithms and data structures implemented in Python.
1111

12-
The purpose of this repo is to be a learning tool for myself and others.
12+
The main purpose of this library is to be an educational tool. You probably
13+
shouldn't use these in production, instead, opting for the optimized versions of
14+
these algorithms that can be found else where.
1315

14-
I used psuedo code from various sources and I have listed them as references in the source code of each algorithm.
16+
You should totally check out the docs for implementation details, complexities
17+
and further info.
1518

16-
Algorithms implemented so far:
17-
------------------------------
18-
19-
**Data Structures:**
20-
21-
- Queue
22-
- Stack
23-
- Disjoint Set
24-
- Single Linked List
25-
- Undirected Graph
26-
- Digraph
27-
28-
**Sorting:**
29-
30-
- Bogo Sort
31-
- Bubble Sort
32-
- Cocktail Sort
33-
- Comb Sort
34-
- Heap Sort
35-
- Insertion Sort
36-
- Merge Sort
37-
- Quick Sort
38-
- In Place Quick Sort
39-
- Selection Sort
40-
- Shell Sort
41-
- Gnome Sort
42-
- Strand Sort
43-
44-
**Searching:**
45-
46-
- Binary Search
47-
- Boyer-Moore-Horspool
48-
- Knuth-Morris-Pratt
49-
- Rabin-Karp
50-
- Depth First Search (Recursive)
51-
- Breadth First Search (Iterative)
52-
53-
**Shuffling:**
54-
55-
- Knuth/Fisher-Yates Shuffle
56-
57-
**Math:**
19+
Usage
20+
-----
5821

59-
- Extended GCD
60-
- Standard Normal Probability Density Function
61-
- Cumulative Density Function (Approximation; 16 digit precision for 300 iter.)
62-
- Sieve of Eratosthenes
22+
If you want to use the algorithms in your code it is as simple as:
6323

64-
**Dynamic Programming:**
24+
::
6525

66-
- Longest Common Subsequence
26+
from algorithms.sorting import bubble_sort
6727

68-
**Random:**
28+
my_list = bubble_sort.sort(my_list)
6929

70-
- Mersenne Twister
30+
Features
31+
--------
7132

33+
- Pseudo code, algorithm complexities and futher info with each algorithm.
34+
- Test coverage for each algorithm and data structure.
35+
- Super sweet documentation.
7236

7337
Installation:
7438
-------------
7539

76-
If you want to use the algorithms directly, simply
40+
Installation is as easy as:
7741

7842
::
7943

8044
$ pip install algorithms
8145

82-
If you want to examine the algorithms source, then you should clone this repo.
83-
84-
Usage:
85-
------
86-
87-
Once installed you can simply do the following in your program:
88-
89-
::
90-
91-
from algorithms.sorting import bubble_sort
92-
93-
my_list = bubble_sort.sort(my_list)
94-
95-
96-
All prequisites for the algorithms are listed in the source code for each algorithm.
97-
9846

9947
Tests:
10048
------
@@ -109,16 +57,5 @@ Pytest is used as the main test runner and all Unit Tests can be run with:
10957
Contributing:
11058
-------------
11159

112-
If there is an algorithm or data structure that you do not see, but would like to add please feel free to do a pull request. I only ask two things:
113-
114-
1. For each algorithm and data structure you implement please have corresponding unit tests to prove correctness.
115-
2. Please make sure that your module follows similar style guidelines that are laid out in the other modules.
116-
117-
I want to personally thank everybody that has contributed so far and your names will be added to `AUTHORS.rst`.
118-
119-
120-
TODO:
121-
-----
122-
See `TODO.rst`_.
123-
124-
.. _`TODO.rst`: TODO.rst
60+
Contributions are always welcome. Check out the contributing guidelines to get
61+
started.

0 commit comments

Comments
 (0)