Skip to main content

An algorithm visualization pip package for Python

Project description


Logo

An algorithm visualization pip package for Python
Explore the docs »

Table of Contents
  1. Getting Started
  2. Algorithms
  3. Notebooks
  4. TODO
  5. Acknowledgments

Getting Started

Installation

Stable release

To install artific, run this command in your terminal

pip install artific

This is the preferred method to install artific, as it will always install the most recent stable release.

If you don't have pip installed, this Python installation guide can guide you through the process.

Algorithms

Sorting

Bubblesort

from artific import BubbleSort

arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = BubbleSort(arr)

arr.visualize()
print(arr)

Output

[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]

The code above will generate the following GIF

Insertionsort

from artific import InsertionSort

arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = InsertionSort(arr)

arr.visualize()
print(arr)

Output

[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]

The code above will generate the following GIF

Heapsort

from artific import HeapSort

arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
arr = HeapSort(arr)

arr.visualize()
print(arr)

Output

[0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]

The code above will generate the following GIF

Searching

Linear search

from artific import LinearSearch

arr = [90,6,2,55,67,2,0,12,92,5,76,2,9,3]
obj = LinearSearch(arr,1)

obj.visualize()
print(obj)

Output

3

The code above will generate the following GIF

Linear search

from artific import BinarySearch

arr = [0, 2, 2, 2, 3, 5, 6, 9, 12, 55, 67, 76, 90, 92]
obj = LinearSearch(arr,55)

obj.visualize()
print(obj)

Output

9

The code above will generate the following GIF

TODO

  • Searching
  • Graph Algorithms
  • Trees

Acknowledgments

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artific-0.0.13.tar.gz (2.8 MB view hashes)

Uploaded Source

Built Distribution

artific-0.0.13-py2.py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page