Skip to content

SpAlgo is a python library with special algorithms which will helps you a lot.

License

Notifications You must be signed in to change notification settings

Amir-Shamsi/SpAlgo

Repository files navigation

SpAlgo

spalgo

Python version BSD Licence Project Initiator Repo Size Downloads PyPI version shields.io GitHub Workflow Status

ForTheBadge built-with-love

SpAlgo is a python library with special algorithms which can help you in your education or any other purpose.

Overview

SpAlgo is a python library with special algorithms which can help you in your education or any other purpose. By now, this library contains some algorithms for the following items and other algorithms will be added soon.

  • Sequence
  • Array
  • Matrix
  • Knapsack
  • Closest Pair
  • F32bit
  • F64bit
  • Newton's Method
  • Secant Method

life is so short so you don't need to spend your time implementing these algorithms so we recommend you use SpAlgo if you want to have a faster experience.

Usage

In the following paragraphs, I am going to describe how you can get and use SpAlgo for your own projects.

Getting it

To download SpAlgo, either fork this github repo or simply use Pypi via pip.

$ pip install SpAlgo

Using it

SpAlgo was programmed with ease-of-use in mind. First, import Matrix, Array and Subsequence from SpAlgo

for more exact usage documents you can see the example files here

from SpAlgo import Matrix, Array, MaxSubseq, Knapsack, ClosestPair, Point

then you can them bassed on what you need.

  1. Array the current available methods are:
findPeak()
findAllPeak()
findFisrtPeak()
findMaxPeak()
findMaxPeak()
  1. Matrix the current available methods are:
findPeak()
findAllPeak()
  1. Sequence the current available methods are:
maximmum_sum()
subsequence()
  1. Knapsack the current available methods are:
getPack()
getTotalValue()
getUsedWeight()
getWastedWeight()
getCrumbledItem()
  1. ClosestPair the current available methods are:
get_min_distance()
get_closest_pair()
  1. F32bit and F64bit the current available methods are:
get_exponent()
get_significand()
get_floating_point()
  1. Newton and Secant the current available methods are:
solve()

Support

Supported versions of python for this library are as follow:

License

This project is under MIT license read it here:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.