Code Monkey home page Code Monkey logo

applied-algorithms's Introduction

applied-algorithms

Generating input script

python3 generate_input_sort_comparison.py -n 5000 -s 6 -r 5000 -t {} -a 3 -o input_1_sort_comparison.txt
  1. n is the number used for input
  2. s is the number by which n is increased by n times
    For example: iteration 1: n = 5000, iteration 2: n = 5000*2 ... upto iteration s
  3. r is the range of random numbers that needs to be generated
  4. t is the input type (input type is present in the document called assignment1.pdf)
  5. a is the average number of inputs to be considered
    For example: if a=3 and s=2 then, input size 5000 would be generated 3 times and input size 10000 would be generated 3 times
  6. o is the output file name (which would eventually will be the input file for the algorithm execution program)

Executing algorithm script

python3 assignment_sort_comparison.py -i input_1_sort_comparison.txt -a 3 -s 'mqi' -o output_1_sort_comparison.json
  1. a is the number of times a given sorting algorithm should execute (depends upon the average number 'a' that is provided in the input)
  2. s is the type of sort to be executed on the input
    b - bubble sort
    s - selection sort
    i - insertion sort
    m - merge sort
    q - quick sort
  3. i is the input file which the file generated using 'generating input' instructions
  4. o is the output file for which is of type json (eventually this file would be input for the plot generation script)

Executing plot generation script

python3 plot_graph_sort_comparison.py -i output_1_sort_comparison.json -t "Input Plot 1"
  1. i is the input file from the following 'algorithm execution' instructions
  2. t is the title of the plot
  3. a is the avg_required parameter where you should mention a = true or a = false for it to consider mean or the sum while plotting

NOTE: Change the file names according to the input numbers
For example: input_1..... for 1st input, input_2... for 2nd input and so on

applied-algorithms's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.