# Introduction to `openAnalysis`¶

In our daily life, we encounter many algorithms. Knowingly or Unknowingly, algorithms make our life easier. Analysis of algorithms is a special field of interest in Computer Science. Analysis evaluates the algorithm, and leads to invention of faster algorithms. Visualization leads to the better understanding of how algorithms work. The package `openAnalysis` is inteded as a tool for analyzing and visualizing algorithms.

## Types of supported algorithms¶

The following types of algorithms are currently supported. We plan to support more kind of algorithms in the future.

• Comparison based Sorting Algorithms ( Analysis + Visualization )
• Comparison based Searching Algorithms ( Analysis )
• Comparison based Pattern Matching Algorithms ( Analysis )
• Data Structures and Related algorithms ( Visualization )
• Graph Algorithms based on Tree Growth technique ( Visualizaiton )
• Graph Algorithms utilizing Matrix and Dynamic Programming ( Visualization )

## Setting up `OpenAnalysis`¶

`openAnalysis` is only supported on Python versions which are greater than 3.5. Once you have suitable version of Python installed, you can simply obtain `openAnalysis` via `pip` (or `pip3`, if you have multiple versions of Python installed)

```sudo pip install openAnalysis
```

If all things go well, you have working installation of `OpenAnalysis`.

## Inside the package¶

`OpenAnalysis` has following package structure.

```openAnalysis/
├── base_data_structures.py            - Provides PriorityQueue and UnionFind data  structures
├── datastructures.py                  - Provides classes for Data Structure Visualization
├── matrix_animator.py                 - Provides classes for DP based Graph algorithms
├── searching.py                       - Provides classes for Sorting algorithms
├── sorting.py                         - Provides classes for Searching algorithms
├── string_matching.py                 - Provides classes for String Matching algorithms
└── tree_growth.py                     - Provides classes for Tree growth based Graph Algorithms
```

## `import`ing the modules¶

Since `openAnalysis` root does not have any executable as is, we will import methods from its modules. In further chapters, we shall see the purpose of every modules and shall use it.

## key factor for analysis¶

In Computer Science, running time of algorithms is greately considered. Every alorithm solves the given instance of problem by performing some basic operation. The time taken by the algorithm is directly proportional to number of basic operations it has performed.

In normal working environment, time taken by the algorithm to solve a problem is affected by task scheduling performed by OS. We have to fit the obtained running time data in order to analyse the algorithm. Instead of using running time as a key for analysis, we will use number of basic operations as a key in `openAnalysis`.

This change in key factor implies, we have to adhere to a standard for implementing algorithms. In fact. `OpenAnalysis` provides such standards, either in the form of rules, or in the form of Base Classes. We shall see those rules in upcomming chapter. In future builds, we plan to include Time-based analysis also.
{"ft_lang_label":"__label__en","ft_lang_prob":0.86512595,"math_prob":0.84001935,"size":3054,"snap":"2023-14-2023-23","text_gpt3_token_len":617,"char_repetition_ratio":0.16459017,"word_repetition_ratio":0.008695652,"special_character_ratio":0.1794368,"punctuation_ratio":0.09650924,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95595235,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-24T11:46:56Z\",\"WARC-Record-ID\":\"<urn:uuid:9a36f500-890c-4911-98cc-91d5228c0d3a>\",\"Content-Length\":\"19995\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2e79af84-0340-41cc-bfd3-ad3e6ca3afa9>\",\"WARC-Concurrent-To\":\"<urn:uuid:a5dbf796-6767-4233-b8d6-004bf387c1d9>\",\"WARC-IP-Address\":\"104.17.32.82\",\"WARC-Target-URI\":\"https://openanalysis.readthedocs.io/en/stable/OpenAnalysis/01%20-%20Introduction%20to%20OpenAnalysis.html\",\"WARC-Payload-Digest\":\"sha1:TBEW5WC2USPDHSRMAEG5E4MMXNYMSYJ4\",\"WARC-Block-Digest\":\"sha1:SRCESU74TUZ4W7KFASYDPM6ZYRMYRBOM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296945282.33_warc_CC-MAIN-20230324113500-20230324143500-00190.warc.gz\"}"}