All Projects → GrayJack → algos

GrayJack / algos

Licence: BSD-3-Clause license
A collection of algorithms in rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to algos

ultra-sort
DSL for SIMD Sorting on AVX2 & AVX512
Stars: ✭ 29 (+81.25%)
Mutual labels:  sorting, sort
Sortingalgorithm.hayateshiki
Hayate-Shiki is an improved merge sort algorithm with the goal of "faster than quick sort".
Stars: ✭ 84 (+425%)
Mutual labels:  sorting, sort
Table Dragger
Turn your old table to drag-and-drop table with columns and rows sorting like magic!
Stars: ✭ 704 (+4300%)
Mutual labels:  sorting, sort
spring-boot-jpa-rest-demo-filter-paging-sorting
Spring Boot Data JPA with Filter, Pagination and Sorting
Stars: ✭ 70 (+337.5%)
Mutual labels:  sorting, sort
Cpp Timsort
A C++ implementation of timsort
Stars: ✭ 211 (+1218.75%)
Mutual labels:  sorting, sort
Sorty
Fast Concurrent / Parallel Sorting in Go
Stars: ✭ 74 (+362.5%)
Mutual labels:  sorting, sort
Queryql
Easily add filtering, sorting, and pagination to your Node.js REST API through your old friend: the query string!
Stars: ✭ 76 (+375%)
Mutual labels:  sorting, sort
Quadsort
Quadsort is a stable adaptive merge sort which is faster than quicksort.
Stars: ✭ 1,385 (+8556.25%)
Mutual labels:  sorting, sort
Rummage ecto
Search, Sort and Pagination for ecto queries
Stars: ✭ 190 (+1087.5%)
Mutual labels:  sorting, sort
Rummage phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix.
Stars: ✭ 144 (+800%)
Mutual labels:  sorting, sort
PixelGlitch
Image glitch visualization using various Pixel Sorting methods for Processing
Stars: ✭ 25 (+56.25%)
Mutual labels:  sorting, sort
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+2800%)
Mutual labels:  sorting, sort
NaturalSort.Extension
🔀 Extension method for StringComparison that adds support for natural sorting (e.g. "abc1", "abc2", "abc10" instead of "abc1", "abc10", "abc2").
Stars: ✭ 94 (+487.5%)
Mutual labels:  sorting, sort
webbrowser-rs
Rust library to open URLs in the web browsers available on a platform
Stars: ✭ 150 (+837.5%)
Mutual labels:  rust-crate
twang
Library for pure Rust advanced audio synthesis.
Stars: ✭ 83 (+418.75%)
Mutual labels:  rust-crate
SortVis
https://airtucha.github.io/SortVis
Stars: ✭ 23 (+43.75%)
Mutual labels:  sort
simplematch
Minimal, super readable string pattern matching for python.
Stars: ✭ 147 (+818.75%)
Mutual labels:  string-matching
gson
Algorithms on data formats - JSON, CBOR, Collation.
Stars: ✭ 17 (+6.25%)
Mutual labels:  sort
sortr.py
sort files using python
Stars: ✭ 15 (-6.25%)
Mutual labels:  sort
pjs
An awk-like command-line tool for processing text, CSV, JSON, HTML, and XML.
Stars: ✭ 21 (+31.25%)
Mutual labels:  sort

Algos

Crates.io Documentation Build Status dependency status GitHub license

A Rust library with a collection of algorithms. Mostly intended as learning exercises for Rust.

Only sort, search and pattern matching algorithms for now. It is planned to add graph algorithms as well.

Usage

Add this to your Cargo.toml:

[dependencies]
algos = "0.3"

and this to your crate root if on 2015 edition:

extern crate algos;

Sorts Algorithms

Add this to your crate root:

use algos::sort;

and create an array and use like this:

fn fn main() {
    let mut v = [2, 3, 1, 9, 8, 4];
    // Crescent sorting
    sort::heap(&mut v, &|a,b| a<b);
    // For decreasing sorting, change the signal in &|a,b| a>b.
}

It can also work in an array of Strings, sorting by the length of the string:

fn main() {
    let mut v = ["bc", "a", "def", "klmno", "ghij", "pqrstu"];
    // Crescent sorting
    sort::merge(&mut v, &|a,b| a.len()<b.len())
}

Search Algorithms

Add this to your crate root:

use algos::search;

and create an array and use like this:

fn fn main() {
    // Remember that your array must be crescent sorted.
    let mut v = [1, 2, 3, 4, 5, 7, 9];

    let find = search::binary(&v, &5);
}

Pattern Matching algorithms

Add this to your crate root:

use algos::pattern;

and use like this:

fn fn main() {
    let p = "ATCGGATTTCAGAAGCT".as_bytes();
    let find = karp_rabin(&p, &"TTT".as_bytes()); // Type Return<usize, usize>
}

Implemented

Sorts

  • Selection Sort
  • Bubble Sort
  • Cocktail Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort

Searches

  • Linear Search
  • Binary Search
  • Exponential Search
  • Fibonacci Search

String Matching

  • Bruteforce
  • Karp-Rabin
  • Boyer-Moore
  • Horspool
  • Quick
  • Two-Way
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].