Commit Graph

68 Commits

Author SHA1 Message Date
Deep Raval
ef1bf8849e
Fixed an issue related to doc (doxygen) (#960) 2020-07-19 14:42:01 -04:00
Krishna Vedala
67ec2aa982
[feature] Gnome sort (#956)
* implement gnome sort algorithm

* change name as in contribute.md

* remove std and fixed style  on clang-format

* Delete GnomeSort.cpp

* style changes

* add documentation

* T template

* style changes

* style changes

* repeated error fix

* cout fixed

* fix gnome_sort

* add assertions'

* added random values test

* updating DIRECTORY.md

* clang-tidy fixes for 97161cf894

* fix initial index value

* add braces to one line for-loops

* fix function documentation

Co-authored-by: beqakd <bgoga16@freeuni.edu.ge>
Co-authored-by: beqakd <39763019+beqakd@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-18 17:16:45 -04:00
Deep Raval
cac5fbe4aa
feat: add Bogo Sort (#952)
* Added Bogo Sort

* Changed code according to guidelines

* Added Comments and example

* Improved code quality

* Added range based loop and included cassert

* Changed Vectors to Array

* Added const to vector arg and now returning sorted array

* Changed vector to array and changed description format

* Added namespace sorting, Function description and tests

* Update sorting/Bogo_Sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Replaced Shuffle with std::random_shuffle

* Renamed filename to smallercase, Added shuffle for ref and updated bracket styling

* Added missing ')'

* updating DIRECTORY.md

* Added spaces in single line comments

* Added Spaces

* Update sorting/bogo_sort.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2020-07-17 18:27:40 -04:00
Krishna Vedala
390ee8428e
fix to upper case 2020-07-01 13:08:41 -04:00
Krishna Vedala
4045bcddf3
verb correction 2020-07-01 13:05:52 -04:00
Krishna Vedala
84fd1cb0d0
small case 'e'
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2020-07-01 13:04:54 -04:00
Krishna Vedala
fed7dd1c13
improved self-tests 2020-07-01 12:37:54 -04:00
Krishna Vedala
69b5c8395a
better rendering of example steps 2020-07-01 10:36:08 -04:00
Krishna Vedala
9b799c93cb
added documentation for new function 2020-07-01 10:19:18 -04:00
Krishna Vedala
957b57cf60
fix issues from #929 2020-07-01 10:10:51 -04:00
github-actions
e4c62d28fe formatting source-code for 7af31e32a2 2020-07-01 10:10:51 +00:00
Ayaan Khan
7af31e32a2 Fix for loop formatiing 2020-07-01 15:39:53 +05:30
Ayaan Khan
dd0a07f18a loop formating fix 2020-07-01 15:38:55 +05:30
github-actions
3e1edca024 formatting source-code for efcccd0148 2020-06-30 22:35:45 +00:00
Ayaan Khan
efcccd0148 resolved merge conflict 2020-07-01 04:04:49 +05:30
Ayaan Khan
8179fbfdec test cases added 2020-07-01 04:03:13 +05:30
github-actions
d64f17f94c formatting source-code for 9217b4d8a8 2020-06-30 22:26:08 +00:00
Ayaan Khan
9217b4d8a8 Merge branch 'master' of https://github.com/ayaankhan98/C-Plus-Plus 2020-07-01 03:54:33 +05:30
Ayaan Khan
d3324aaf34 Fix: code quality and Docs 2020-07-01 03:54:01 +05:30
Ayaan Khan
3fc85322c1
Merge pull request #899 from ayaankhan98/master
fix: minor docs issue
2020-06-25 04:13:29 +05:30
Ayaan Khan
f1ab19bb33 fix: minor docs issue 2020-06-25 03:39:12 +05:30
Krishna Vedala
d958eec03b
Merge pull request #888 from ayaankhan98/master
fix: LGTM code quality and Added docs
2020-06-23 17:02:57 -04:00
Panquesito7
0767af4a0d
fix: Revert comb_sort changes 2020-06-23 15:26:55 -05:00
github-actions
48a163e51a formatting source-code for 3a7a266ada 2020-06-23 20:22:30 +00:00
Ayaan Khan
92d2bf012a Added tests for comb_sort.cpp 2020-06-24 01:49:33 +05:30
Panquesito7
0356a9cdf3
fix: Various LGTM fixes 2020-06-23 15:13:28 -05:00
Ayaan Khan
2d0325699f fixed code quality and added docs 2020-06-24 01:30:14 +05:30
Ayaan Khan
7f40775055 fix docs 2020-06-24 00:36:56 +05:30
Ayaan Khan
f0ab9a0d38 fixed line spacing in tests 2020-06-24 00:36:56 +05:30
github-actions
a56e54ca15 formatting source-code for 7c8617fa46 2020-06-24 00:36:56 +05:30
Ayaan Khan
555f4fb98f fixed docs 2020-06-24 00:36:56 +05:30
github-actions
6d88c992ed formatting source-code for ced5dcd6c4 2020-06-24 00:36:56 +05:30
Ayaan Khan
2a41d916b0 Added template and test cases 2020-06-24 00:36:56 +05:30
Ayaan Khan
86bd671c66 switched to normal functions from lambda 2020-06-24 00:36:56 +05:30
github-actions
11728ee231 formatting source-code for e464ddac36 2020-06-24 00:36:22 +05:30
Ayaan Khan
38db7fdec0 Bug Fix heap sort [Fresh Implementation] 2020-06-24 00:35:41 +05:30
github-actions
549daeebfd formatting source-code for 8233eda889 2020-06-24 00:35:41 +05:30
Ayaan Khan
5c77f1ebe0 Bug Fix heap sort [Fresh Implementation] 2020-06-24 00:35:41 +05:30
Ayaan Khan
4afe371ba5 closed the paranthesis of line 3 2020-06-24 00:34:47 +05:30
Ayaan Khan
99ca279ff6 fixed documentation 2020-06-24 00:34:33 +05:30
Ayaan Khan
0a09c1e382 fixed line spacing 2020-06-24 00:34:33 +05:30
github-actions
b1d2ad1dfc formatting source-code for b06bbf4dc6 2020-06-24 00:34:33 +05:30
Ayaan Khan
5e63bede6f fixed line spacing 2020-06-24 00:34:33 +05:30
Ayaan Khan
46e07288ba Fixed Bug [munmap_chunck() core dumped] 2020-06-24 00:34:33 +05:30
Ayaan Khan
de70c5d864
[Bug Fix] of sorting/heapsort.cpp (#873)
* formatting source-code for 72c365dcd3

* Fixed Bug [munmap_chunck() core dumped]

* formatting source-code for b06bbf4dc6

* fixed line spacing

* fixed line spacing

* fixed documentation

* closed the paranthesis of line 3

* formatting source-code for 8233eda889

* Bug Fix heap sort [Fresh Implementation]

* formatting source-code for e464ddac36

* Bug Fix heap sort [Fresh Implementation]

* formatting source-code for 803981c831

* switched to normal functions from lambda

* formatting source-code for ced5dcd6c4

* Added template and test cases

* formatting source-code for 7c8617fa46

* fixed docs

* fixed line spacing in tests

* fix docs

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-21 21:28:00 +05:30
Ayaan Khan
edc17ec9e8
Fixed Bug in sorting/merge_sort.cpp (#872)
* formatting source-code for 72c365dcd3

* Fixed Bug [munmap_chunck() core dumped]

* formatting source-code for b06bbf4dc6

* fixed line spacing

* fixed line spacing

* fixed documentation

* closed the paranthesis of line 3

* formatting source-code for 8233eda889

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-20 23:04:56 +05:30
github-actions
0224363803 formatting source-code for f541be9724 2020-06-19 16:10:22 +00:00
Ayaan Khan
f541be9724
Merge branch 'master' into master 2020-06-19 21:39:02 +05:30
Krishna Vedala
aaa08b0150
Major rework to improve code quality and add automation checks (#805)
* delete secant method - it is identical to regula falsi

* document + improvize root finding algorithms

* attempt to document gaussian elimination

* added file brief

* commented doxygen-mainpage, added files-list link

* corrected files list link path

* files-list link correction - this time works :)

* document successive approximations

* cleaner equation

* updating DIRECTORY.md

* documented kmp string search

* document brute force string search

* document rabin-karp string search

* fixed mainpage readme

* doxygen v1.8.18 will suppress out the #minipage in the markdown

* cpplint correction for header guard style

* github action to auto format source code per cpplint standard

* updated setting to add 1 space before `private` and `public` keywords

* auto rename files and auto format code

* added missing "run" for step

* corrected asignmemt operation

* fixed trim and assign syntax

* added git move for renaming bad filenames

* added missing pipe for trim

* added missing space

* use old and new fnames

* store old fname using echo

* move files only if there is a change in filename

* put old filenames in quotes

* use double quote for old filename

* escape double quotes

* remove old_fname

* try escape characters and echo"

* add file-type to find

* cleanup echo

* ensure all trim variables are also in quotes

* try escape -quote again

* remove second escpe quote

* use single quote for first check

* use carets instead of quotes

* put variables in brackets

* remove -e from echo

* add debug echos

* try print0 flag

* find command with while instead of for-loop

* find command using IFS instead

* 🎉 IFS fix worked - escaped quotes for git mv

* protetc each word in git mv ..

* filename exists in lower cases - renamed

* 🎉 git push enabled

* updating DIRECTORY.md

* git pull & then push

* formatting filenames d7af6fdc8c

* formatting source-code for d7af6fdc8c

* remove allman break before braces

* updating DIRECTORY.md

* added missing comma lost in previous commit

* orchestrate all workflows

* fix yml indentation

* force push format changes, add title to DIRECTORY.md

* pull before proceeding

* reorganize pull commands

* use master branches for actions

* rename .cc files to .cpp

* added class destructor to clean up dynamic memory allocation

* rename to awesome workflow

* commented whole repo cpplint - added modified files lint check

* removed need for cpplint

* attempt to use actions/checkout@master

* temporary: no dependency on cpplint

* formatting filenames 153fb7b8a5

* formatting source-code for 153fb7b8a5

* updating DIRECTORY.md

* fix diff filename

* added comments to the code

* added test case

* formatting source-code for a850308fba

* updating DIRECTORY.md

* added machine learning folder

* added adaline algorithm

* updating DIRECTORY.md

* fixed issue [LWG2192](https://cplusplus.github.io/LWG/issue2192) for std::abs on MacOS

* add cmath for same bug: [LWG2192](https://cplusplus.github.io/LWG/issue2192) for std::abs on MacOS

* formatting source-code for f8925e4822

* use STL's inner_product

* formatting source-code for f94a330594

* added range comments

* define activation function

* use equal initial weights

* change test2 function to predict

* activation function not friend

* previous commit correction

* added option for predict function to return value before applying activation function as optional argument

* added test case to classify points lying within a sphere

* improve documentation for adaline

* formatting source-code for 15ec4c3aba

* added cmake to geometry folder

* added algorithm include for std::max

* add namespace - machine_learning

* add namespace - statistics

* add namespace - sorting

* added sorting algos to namespace sorting

* added namespace string_search

* formatting source-code for fd69530515

* added documentation to string_search namespace

* feat: Add BFS and DFS algorithms to check for cycle in a directed graph

* Remove const references for input of simple types

Reason: overhead on access

* fix bad code

sorry for force push

* Use pointer instead of the non-const reference

because apparently google says so.

* Remove a useless and possibly bad Graph constuctor overload

* Explicitely specify type of vector during graph instantiation

* updating DIRECTORY.md

* find openMP before adding subdirectories

* added kohonen self organizing map

* updating DIRECTORY.md

* remove older files and folders from gh-pages before adding new files

* remove chronos library due to inacceptability by cpplint

* use c++ specific static_cast instead

* initialize radom number generator

* updated image links with those from CPP repository

* rename computer.... folder to numerical methods

* added durand kerner method for root computation for arbitrarily large polynomials

* fixed additional comma

* fix cpplint errors

* updating DIRECTORY.md

* convert to function module

* update documentation

* move openmp to main loop

* added two test cases

* use INT16_MAX

* remove return statement from omp-for loop and use "break"

* run tests when no input is provided and skip tests when input polynomial is provided

* while loop cannot have break - replaced with continue and check is present in the main while condition

* (1) break while loop (2) skip runs on break_loop instead of hard-break

* add documentation images

* use long double for errors and tolerance checks

* make iterator variable i local to threads

* add critical secions to omp threads

* bugfix: move file writing outside of the parallel loop
othersie, there is no gurantee of the order of roots written to file

* rename folder to data_structures

* updating DIRECTORY.md

* fix ambiguous symbol `size`

* add data_structures to cmake

* docs: enable tree view, add timestamp in footer, try clang assistaed parsing

* doxygen - open links in external window

* remove invalid parameter from function docs

* use HTML5 img tag to resize images

* move file to proper folder

* fix documentations and cpplint

* formatting source-code for aacaf9828c

* updating DIRECTORY.md

* cpplint: add braces for multiple statement if

* add explicit link to badges

* remove  duplicate line

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* remove namespace indentation

* remove file associations in settings

* add author name

* enable cmake in subfolders of data_structures

* create and link object file

* cpp lint fixes and instantiate template classes

* cpp lint fixes and instantiate template classes

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* cpplint - ignore `build/include`

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* disable redundant gcc compilation in cpplint workflow

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* template header files contain function codes as well and removed redundant subfolders

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* updating DIRECTORY.md

* remove semicolons after functions in a class

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* cpplint header guard style

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* remove semilon

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* added LU decomposition algorithm

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* added QR decomposition algorithm

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* use QR decomposition to find eigen values

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* updating DIRECTORY.md

* use std::rand for thread safety

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* move srand to main()

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* cpplint braces correction

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* updated eigen value documentation

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* fix matrix shift doc

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* rename CONTRIBUTION.md to CONTRIBUTING.md #836

* remove 'sort alphabetical order' check

* added documentation check

* remove extra paranthesis

* added gitpod

* added gitpod link from README

* attempt to add vscode gitpod extensions

* update gitpod extensions

* add gitpod extensions cmake-tools and git-graph

* remove gitpod init and add commands

* use init to one time install doxygen, graphviz, cpplint

* use gitpod dockerfile

* add ninja build system to docker

* remove configure task

* add github prebuild specs to gitpod

* disable gitpod addcommit

* update documentation for kohonen_som

* added ode solve using forward euler method

* added mid-point euler ode solver

* fixed itegration step equation

* added semi-implicit euler ODE solver

* updating DIRECTORY.md

* fix cpplint issues - lines 117 and 124

* added documentation to ode group

* corrected semi-implicit euler function

* updated docs and test cases better structure

* replace `free` with `delete` operator

* formatting source-code for f55ab50cf2

* updating DIRECTORY.md

* main function must return

* added machine learning group

* added kohonen som topology algorithm

* fix graph image path

* updating DIRECTORY.md

* fix braces

* use snprintf instead of sprintf

* use static_cast

* hardcode character buffer size

* fix machine learning groups in documentation

* fix missing namespace function

* replace kvedala fork references to TheAlgorithms

* fix bug in counting_sort

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Anmol3299 <mittalanmol22@gmail.com>
2020-06-19 21:34:56 +05:30
Ayaan Khan
326b3037b4 free dynamically allocated memory 2020-05-27 22:39:19 +05:30