Skip to content

Kam1goroshi/SortingFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

General Info

This project contains a library that uses dynamic creation of sorting functions that belong in the comparison model according to needs. The use of callbacks avoids a lot of branches, which in turn offers a balanced tradeoff between flexibility and performance when handling big arrays and need several algorithms or sorting orders.

Purpose

  • Creating a useful library
  • Learning lambdas and callbacks in java
  • Homework of neapolis algorithms class

Usage example

With src/sorting_machine in your project:

import sorting_machine.SortingMachine;
import sorting_machine.SortingOrderChoices;
import sorting_machine.SortingAlgorithmChoices;

public class Example{
  SortingMachine<YOUR_TYPE> sortingMachine = new SortingMachine<>(SortingAlgorithmsChoices.BUBBLE_SORT, SortingOrderChoices.ASCENDING);
  long steps = sortingMachine.sort(YOUR_ARRAY_OF_TYPE);
}

Documentation

https://kam1goroshi.github.io/SortingFactory/

About

A generator of sorting functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages