From 407e656e97985f4b952074dd6783e2ba6342616e Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sat, 31 Oct 2020 06:41:30 +0000 Subject: [PATCH] Documentation for fb5e00f5fba9eac208777fa862d06c1197bac8ae --- d1/d9a/hopcroft__karp_8cpp.html | 12 +- d3/d78/namespacelinear__algebra.html | 113 ++++ d4/d0f/namespacegram__schmidt.html | 112 ++++ d4/d8d/jarvis__algorithm_8cpp.html | 2 +- d5/d33/gram__schmidt_8cpp.html | 595 ++++++++++++++++++ d5/d33/gram__schmidt_8cpp.js | 9 + ...6e459aff5eafffb5ad9ceb129b4d274_cgraph.map | 5 + ...6e459aff5eafffb5ad9ceb129b4d274_cgraph.md5 | 1 + ...6e459aff5eafffb5ad9ceb129b4d274_cgraph.svg | 66 ++ ...31ca28f60c880802462335eedc5d91f_cgraph.map | 6 + ...31ca28f60c880802462335eedc5d91f_cgraph.md5 | 1 + ...31ca28f60c880802462335eedc5d91f_cgraph.svg | 170 +++++ ...28f60c880802462335eedc5d91f_cgraph_org.svg | 82 +++ ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 4 + ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 1 + ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 37 ++ ...d4d308f46ca1d91e348ca260ec1d2fb_cgraph.map | 4 + ...d4d308f46ca1d91e348ca260ec1d2fb_cgraph.md5 | 1 + ...d4d308f46ca1d91e348ca260ec1d2fb_cgraph.svg | 44 ++ d5/d88/md__d_i_r_e_c_t_o_r_y.html | 23 +- d5/ddb/bogo__sort_8cpp.html | 2 +- d6/d10/cut__rod_8cpp.html | 2 +- d8/d95/vector__ops_8hpp_source.html | 6 + d8/d96/gram__schmidt_8cpp__incl.map | 7 + d8/d96/gram__schmidt_8cpp__incl.md5 | 1 + d8/d96/gram__schmidt_8cpp__incl.svg | 83 +++ db/d16/0__1__knapsack_8cpp.html | 2 +- db/dca/kadane2_8cpp.html | 2 +- ...0001_000012.html => dir_000001_000013.html | 0 dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.map | 2 +- dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.md5 | 2 +- dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.svg | 2 +- dir_8c4128baa09a573ad2b8b8c0061a04c9.html | 114 ++++ dir_8c4128baa09a573ad2b8b8c0061a04c9.js | 4 + files.html | 254 ++++---- files_dup.js | 1 + globals_func_m.html | 27 +- globals_func_s.html | 6 +- globals_func_t.html | 57 +- globals_m.html | 45 +- globals_s.html | 6 +- globals_t.html | 59 +- index.html | 8 +- namespacemembers.html | 12 +- namespacemembers_func.html | 12 +- namespaces.html | 92 +-- namespaces_dup.js | 2 + navtreedata.js | 43 +- navtreeindex0.js | 202 +++--- navtreeindex1.js | 250 ++++---- navtreeindex2.js | 226 +++---- navtreeindex3.js | 242 +++---- navtreeindex4.js | 200 +++--- navtreeindex5.js | 250 ++++---- navtreeindex6.js | 145 +++-- search/all_10.js | 138 ++-- search/all_11.js | 237 +++---- search/all_12.js | 42 +- search/all_13.js | 222 +++---- search/all_14.js | 494 +++++++-------- search/all_15.js | 220 +++---- search/all_16.js | 128 ++-- search/all_17.js | 92 +-- search/all_18.js | 170 ++--- search/all_19.js | 12 +- search/all_1a.js | 8 +- search/all_1b.js | 6 +- search/all_1c.js | 186 +++--- search/all_5.js | 39 +- search/all_6.js | 138 ++-- search/all_7.js | 254 ++++---- search/all_8.js | 154 ++--- search/all_9.js | 88 +-- search/all_a.js | 378 +++++------ search/all_b.js | 16 +- search/all_c.js | 36 +- search/all_d.js | 163 ++--- search/all_e.js | 256 ++++---- search/all_f.js | 146 ++--- search/classes_0.js | 40 +- search/classes_1.js | 78 +-- search/classes_10.js | 6 +- search/classes_11.js | 80 +-- search/classes_12.js | 96 +-- search/classes_13.js | 46 +- search/classes_14.js | 64 +- search/classes_15.js | 38 +- search/classes_16.js | 62 +- search/classes_17.js | 4 +- search/classes_18.js | 2 +- search/classes_2.js | 70 +-- search/classes_3.js | 32 +- search/classes_4.js | 34 +- search/classes_5.js | 34 +- search/classes_6.js | 12 +- search/classes_7.js | 18 +- search/classes_8.js | 196 +++--- search/classes_9.js | 2 +- search/classes_a.js | 4 +- search/classes_b.js | 36 +- search/classes_c.js | 76 +-- search/classes_d.js | 36 +- search/classes_e.js | 24 +- search/classes_f.js | 34 +- search/defines_0.js | 4 +- search/defines_1.js | 4 +- search/defines_2.js | 4 +- search/defines_3.js | 2 +- search/defines_4.js | 4 +- search/defines_5.js | 4 +- search/defines_6.js | 4 +- search/files_0.js | 2 +- search/files_1.js | 8 +- search/files_10.js | 26 +- search/files_11.js | 14 +- search/files_12.js | 8 +- search/files_13.js | 36 +- search/files_14.js | 10 +- search/files_15.js | 6 +- search/files_16.js | 4 +- search/files_17.js | 2 +- search/files_2.js | 26 +- search/files_3.js | 22 +- search/files_4.js | 18 +- search/files_5.js | 6 +- search/files_6.js | 20 +- search/files_7.js | 15 +- search/files_8.js | 16 +- search/files_9.js | 8 +- search/files_a.js | 6 +- search/files_b.js | 10 +- search/files_c.js | 26 +- search/files_d.js | 20 +- search/files_e.js | 14 +- search/files_f.js | 8 +- search/functions_0.js | 6 +- search/functions_1.js | 162 ++--- search/functions_10.js | 167 ++--- search/functions_11.js | 18 +- search/functions_12.js | 160 ++--- search/functions_13.js | 378 +++++------ search/functions_14.js | 164 ++--- search/functions_15.js | 84 +-- search/functions_16.js | 46 +- search/functions_17.js | 150 ++--- search/functions_18.js | 6 +- search/functions_19.js | 2 +- search/functions_1a.js | 4 +- search/functions_1b.js | 186 +++--- search/functions_2.js | 122 ++-- search/functions_3.js | 164 ++--- search/functions_4.js | 189 +++--- search/functions_5.js | 114 ++-- search/functions_6.js | 210 +++---- search/functions_7.js | 129 ++-- search/functions_8.js | 44 +- search/functions_9.js | 190 +++--- search/functions_a.js | 6 +- search/functions_b.js | 18 +- search/functions_c.js | 102 +-- search/functions_d.js | 176 +++--- search/functions_e.js | 102 +-- search/functions_f.js | 116 ++-- search/groups_0.js | 2 +- search/groups_1.js | 4 +- search/groups_2.js | 2 +- search/namespaces_0.js | 2 +- search/namespaces_1.js | 2 +- search/namespaces_10.js | 6 +- search/namespaces_11.js | 30 +- search/namespaces_12.js | 2 +- search/namespaces_13.js | 2 +- search/namespaces_14.js | 4 +- search/namespaces_15.js | 2 +- search/namespaces_2.js | 8 +- search/namespaces_3.js | 6 +- search/namespaces_4.js | 4 +- search/namespaces_5.js | 5 +- search/namespaces_6.js | 4 +- search/namespaces_7.js | 2 +- search/namespaces_8.js | 2 +- search/namespaces_9.js | 4 +- search/namespaces_a.js | 7 +- search/namespaces_b.js | 12 +- search/namespaces_c.js | 10 +- search/namespaces_d.js | 2 +- search/namespaces_e.js | 6 +- search/namespaces_f.js | 4 +- search/pages_0.js | 4 +- search/pages_1.js | 2 +- search/pages_2.js | 2 +- search/pages_3.js | 2 +- search/pages_4.js | 4 +- search/related_0.js | 10 +- search/typedefs_0.js | 2 +- search/typedefs_1.js | 2 +- search/typedefs_2.js | 2 +- search/variables_0.js | 4 +- search/variables_1.js | 10 +- search/variables_10.js | 20 +- search/variables_11.js | 2 +- search/variables_12.js | 4 +- search/variables_13.js | 2 +- search/variables_14.js | 2 +- search/variables_15.js | 2 +- search/variables_2.js | 2 +- search/variables_3.js | 4 +- search/variables_4.js | 4 +- search/variables_5.js | 8 +- search/variables_6.js | 16 +- search/variables_7.js | 4 +- search/variables_8.js | 2 +- search/variables_9.js | 6 +- search/variables_a.js | 12 +- search/variables_b.js | 8 +- search/variables_c.js | 16 +- search/variables_d.js | 4 +- search/variables_e.js | 2 +- search/variables_f.js | 18 +- 219 files changed, 6898 insertions(+), 5393 deletions(-) create mode 100644 d3/d78/namespacelinear__algebra.html create mode 100644 d4/d0f/namespacegram__schmidt.html create mode 100644 d5/d33/gram__schmidt_8cpp.html create mode 100644 d5/d33/gram__schmidt_8cpp.js create mode 100644 d5/d33/gram__schmidt_8cpp_a46e459aff5eafffb5ad9ceb129b4d274_cgraph.map create mode 100644 d5/d33/gram__schmidt_8cpp_a46e459aff5eafffb5ad9ceb129b4d274_cgraph.md5 create mode 100644 d5/d33/gram__schmidt_8cpp_a46e459aff5eafffb5ad9ceb129b4d274_cgraph.svg create mode 100644 d5/d33/gram__schmidt_8cpp_aa31ca28f60c880802462335eedc5d91f_cgraph.map create mode 100644 d5/d33/gram__schmidt_8cpp_aa31ca28f60c880802462335eedc5d91f_cgraph.md5 create mode 100644 d5/d33/gram__schmidt_8cpp_aa31ca28f60c880802462335eedc5d91f_cgraph.svg create mode 100644 d5/d33/gram__schmidt_8cpp_aa31ca28f60c880802462335eedc5d91f_cgraph_org.svg create mode 100644 d5/d33/gram__schmidt_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map create mode 100644 d5/d33/gram__schmidt_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 create mode 100644 d5/d33/gram__schmidt_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg create mode 100644 d5/d33/gram__schmidt_8cpp_aed4d308f46ca1d91e348ca260ec1d2fb_cgraph.map create mode 100644 d5/d33/gram__schmidt_8cpp_aed4d308f46ca1d91e348ca260ec1d2fb_cgraph.md5 create mode 100644 d5/d33/gram__schmidt_8cpp_aed4d308f46ca1d91e348ca260ec1d2fb_cgraph.svg create mode 100644 d8/d96/gram__schmidt_8cpp__incl.map create mode 100644 d8/d96/gram__schmidt_8cpp__incl.md5 create mode 100644 d8/d96/gram__schmidt_8cpp__incl.svg rename dir_000001_000012.html => dir_000001_000013.html (100%) create mode 100644 dir_8c4128baa09a573ad2b8b8c0061a04c9.html create mode 100644 dir_8c4128baa09a573ad2b8b8c0061a04c9.js diff --git a/d1/d9a/hopcroft__karp_8cpp.html b/d1/d9a/hopcroft__karp_8cpp.html index 9f00f32e0..53eb03013 100644 --- a/d1/d9a/hopcroft__karp_8cpp.html +++ b/d1/d9a/hopcroft__karp_8cpp.html @@ -138,22 +138,22 @@ Functions
Implementation of Hopcroft–Karp algorithm.
The Hopcroft–Karp algorithm is an algorithm that takes as input a bipartite graph and produces as output a maximum cardinality matching, it runs in O(E√V) time in worst case.
-A bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V such that every edge connects a vertex in U to one in V. Vertex sets U and V are usually called the parts of the graph. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.
-Given a matching M, edges that are part of matching are called Matching edges and edges that are not part of M (or connect free nodes) are called Not-Matching edges.
-Given a bipartite graphs G = ( V = ( X , Y ) , E ) whose partition has the parts X and Y, with E denoting the edges of the graph, the goal is to find a matching with as many edges as possible. Equivalently, a matching that covers as many vertices as possible.
-Given a matching M, an augmenting path is an alternating path that starts from and ends on free vertices. All single edge paths that start and end with free vertices are augmenting paths.
-A matching M is not maximum if there exists an augmenting path. It is also true other way, i.e, a matching is maximum if no augmenting path exists.
-1) Initialize the Maximal Matching M as empty. 2) While there exists an Augmenting Path P Remove matching edges of P from M and add not-matching edges of P to M (This increases size of M by 1 as P starts and ends with a free vertex i.e. a node that is not part of matching.) 3) Return M.
diff --git a/d3/d78/namespacelinear__algebra.html b/d3/d78/namespacelinear__algebra.html new file mode 100644 index 000000000..01a361423 --- /dev/null +++ b/d3/d78/namespacelinear__algebra.html @@ -0,0 +1,113 @@ + + + + + + + +|
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+ |
+
Linear Algebra algorithms. +More...
+Linear Algebra algorithms.
+for io operations for assert for fabs for std::array
+|
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+ |
+
Functions for Gram Schmidt Orthogonalisation Process +More...
+Functions for Gram Schmidt Orthogonalisation Process
+Implementation of Jarvis’s algorithm.
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of it.
-The idea of Jarvis’s Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counterclockwise direction.
The idea is to use orientation() here. Next point is selected as the point that beats all other points at counterclockwise orientation, i.e., next point is q if for any other point r, we have “orientation(p, q, r) = counterclockwise”.
diff --git a/d5/d33/gram__schmidt_8cpp.html b/d5/d33/gram__schmidt_8cpp.html new file mode 100644 index 000000000..fd2297e32 --- /dev/null +++ b/d5/d33/gram__schmidt_8cpp.html @@ -0,0 +1,595 @@ + + + + + + + +|
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+ |
+
Gram Schmidt Orthogonalisation Process +More...
+#include <iostream>#include <cassert>#include <cmath>#include <array>+Namespaces | |
| linear_algebra | |
| Linear Algebra algorithms. | |
| gram_schmidt | |
| Functions for Gram Schmidt Orthogonalisation Process | |
+Functions | |
| double | linear_algebra::gram_schmidt::dot_product (const std::array< double, 10 > &x, const std::array< double, 10 > &y, const int &c) |
| double | linear_algebra::gram_schmidt::projection (const std::array< double, 10 > &x, const std::array< double, 10 > &y, const int &c) |
| void | linear_algebra::gram_schmidt::display (const int &r, const int &c, const std::array< std::array< double, 10 >, 20 > &B) |
| void | linear_algebra::gram_schmidt::gram_schmidt (int r, const int &c, const std::array< std::array< double, 10 >, 20 > &A, std::array< std::array< double, 10 >, 20 > B) |
| static void | test () |
| int | main () |
| Main Function. More... | |
Gram Schmidt Orthogonalisation Process
+
+
Takes the input of Linearly Independent Vectors, returns vectors orthogonal to each other.
+Take the first vector of given LI vectors as first vector of Orthogonal vectors. Take projection of second input vector on the first vector of Orthogonal vector and subtract it from the 2nd LI vector. Take projection of third vector on the second vector of Othogonal vectors and subtract it from the 3rd LI vector. Keep repeating the above process until all the vectors in the given input array are exhausted.
+For Example: In R2, Input LI Vectors={(3,1),(2,2)} then Orthogonal Vectors= {(3, 1),(-0.4, 1.2)}
+Have defined maximum dimension of vectors to be 10 and number of vectors taken is 20. Please do not give linearly dependent vectors
+ +| void linear_algebra::gram_schmidt::display | +( | +const int & | +r, | +
| + | + | const int & | +c, | +
| + | + | const std::array< std::array< double, 10 >, 20 > & | +B | +
| + | ) | ++ |
Function to print the orthogonalised vector
+| r | number of vectors |
| c | dimenaion of vectors |
| B | stores orthogonalised vectors |
| double linear_algebra::gram_schmidt::dot_product | +( | +const std::array< double, 10 > & | +x, | +
| + | + | const std::array< double, 10 > & | +y, | +
| + | + | const int & | +c | +
| + | ) | ++ |
Dot product function. Takes 2 vectors along with their dimension as input and returns the dot product.
| x | vector 1 |
| y | vector 2 |
| c | dimension of the vectors |
| void linear_algebra::gram_schmidt::gram_schmidt | +( | +int | +r, | +
| + | + | const int & | +c, | +
| + | + | const std::array< std::array< double, 10 >, 20 > & | +A, | +
| + | + | std::array< std::array< double, 10 >, 20 > | +B | +
| + | ) | ++ |
Function for the process of Gram Schimdt Process
| r | number of vectors |
| c | dimension of vectors |
| A | stores input of given LI vectors |
| B | stores orthogonalised vectors |
we check whether appropriate dimensions are given or not.
+First vector is copied as it is.
+array to store projections
+First initialised to zero
+to store previous projected array
+to store the factor by which the previous array will change
+projected array created
+we take the projection with all the previous vector and add them.
+subtract total projection vector from the input vector
+| int main | +( | +void | +) | ++ |
Main Function.
+a 2-D array for storing all vectors
+a 2-D array for storing orthogonalised vectors
+storing vectors in array A
+Input of vectors is taken
+To check whether vectors are orthogonal or not
+take make the process numerically stable, upper bound for the dot product take 0.1
+| double linear_algebra::gram_schmidt::projection | +( | +const std::array< double, 10 > & | +x, | +
| + | + | const std::array< double, 10 > & | +y, | +
| + | + | const int & | +c | +
| + | ) | ++ |
Projection Function Takes input of 2 vectors along with their dimension and evaluates their projection in temp
+| x | Vector 1 |
| y | Vector 2 |
| c | dimension of each vector |
The dot product of two vectors is taken
+The norm of the second vector is taken.
+multiply that factor with every element in a 3rd vector, whose initial values are same as the 2nd vector.
+
+
|
+ +static | +
Test Function. Process has been tested for 3 Sample Inputs
Implementation of Bogosort algorithm
In computer science, bogosort (also known as permutation sort, stupid sort, slowsort, shotgun sort, random sort, monkey sort, bobosort or shuffle sort) is a highly inefficient sorting algorithm based on the generate and test paradigm. Two versions of this algorithm exist: a deterministic version that enumerates all permutations until it hits a sorted one, and a randomized version that randomly permutes its input.Randomized version is implemented here.
-Shuffle the array untill array is sorted.
diff --git a/d6/d10/cut__rod_8cpp.html b/d6/d10/cut__rod_8cpp.html index 62aa45de4..9453fbcd9 100644 --- a/d6/d10/cut__rod_8cpp.html +++ b/d6/d10/cut__rod_8cpp.html @@ -136,7 +136,7 @@ FunctionsImplementation of cutting a rod problem.
Given a rod of length n inches and an array of prices that contains prices of all pieces of size<=n. Determine the maximum profit obtainable by cutting up the rod and selling the pieces.
-The idea is to break the given rod into every smaller piece as possible and then check profit for each piece, by calculating maximum profit for smaller pieces we will build the solution for larger pieces in bottom-up manner.
The repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under MIT License. The algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and the associated documentation are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using a different algorithm strategies and optimizations.
-Online Documentation is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary. The documentation also introduces interactive source code with links to documentation for C++ STL library functions used. Click on Files menu to see the list of all the files documented with the code.
Documentation of Algorithms in C++ by The Algorithms Contributors is licensed under CC BY-SA 4.0
As a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our Contribution Guidelines.