diff --git a/d0/d04/qr__decompose_8h__incl.svg b/d0/d04/qr__decompose_8h__incl.svg index cb76acd49..9aca201ce 100644 --- a/d0/d04/qr__decompose_8h__incl.svg +++ b/d0/d04/qr__decompose_8h__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Definition at line 255 of file hopcroft_karp.cpp.

255 {
256 // Sample test case 1
-
257 int v1a = 3, v1b = 5, e1 = 2; // vertices of left side, right side and edges
+
257 int v1a = 3, v1b = 5; // vertices of left side, right side and edges
258 HKGraph g1(v1a, v1b); // execute the algorithm
259
260 g1.addEdge(0,1);
@@ -252,7 +252,7 @@ Algorithm
266 assert(res1 == expected_res1); // assert check to ensure that the algorithm executed correctly for test 1
267
268 // Sample test case 2
-
269 int v2a = 4, v2b = 4, e2 = 6; // vertices of left side, right side and edges
+
269 int v2a = 4, v2b = 4; // vertices of left side, right side and edges
270 HKGraph g2(v2a, v2b); // execute the algorithm
271
272 g2.addEdge(1,1);
@@ -268,7 +268,7 @@ Algorithm
282 assert(res2 == expected_res2); // assert check to ensure that the algorithm executed correctly for test 2
283
284 // Sample test case 3
-
285 int v3a = 6, v3b = 6, e3 = 4; // vertices of left side, right side and edges
+
285 int v3a = 6, v3b = 6; // vertices of left side, right side and edges
286 HKGraph g3(v3a, v3b); // execute the algorithm
287
288 g3.addEdge(0,1);
diff --git a/d1/d9a/hopcroft__karp_8cpp_source.html b/d1/d9a/hopcroft__karp_8cpp_source.html index 2442f7dbf..a2a2161e0 100644 --- a/d1/d9a/hopcroft__karp_8cpp_source.html +++ b/d1/d9a/hopcroft__karp_8cpp_source.html @@ -301,7 +301,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../','');
255void tests(){
256 // Sample test case 1
-
257 int v1a = 3, v1b = 5, e1 = 2; // vertices of left side, right side and edges
+
257 int v1a = 3, v1b = 5; // vertices of left side, right side and edges
258 HKGraph g1(v1a, v1b); // execute the algorithm
259
260 g1.addEdge(0,1);
@@ -313,7 +313,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../','');
266 assert(res1 == expected_res1); // assert check to ensure that the algorithm executed correctly for test 1
267
268 // Sample test case 2
-
269 int v2a = 4, v2b = 4, e2 = 6; // vertices of left side, right side and edges
+
269 int v2a = 4, v2b = 4; // vertices of left side, right side and edges
270 HKGraph g2(v2a, v2b); // execute the algorithm
271
272 g2.addEdge(1,1);
@@ -329,7 +329,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../','');
282 assert(res2 == expected_res2); // assert check to ensure that the algorithm executed correctly for test 2
283
284 // Sample test case 3
-
285 int v3a = 6, v3b = 6, e3 = 4; // vertices of left side, right side and edges
+
285 int v3a = 6, v3b = 6; // vertices of left side, right side and edges
286 HKGraph g3(v3a, v3b); // execute the algorithm
287
288 g3.addEdge(0,1);
diff --git a/d1/da1/decimal__to__hexadecimal_8cpp__incl.svg b/d1/da1/decimal__to__hexadecimal_8cpp__incl.svg index 6e8be548b..df06bbb6b 100644 --- a/d1/da1/decimal__to__hexadecimal_8cpp__incl.svg +++ b/d1/da1/decimal__to__hexadecimal_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - diff --git a/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg b/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg index a15d67906..e9675a74e 100644 --- a/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg +++ b/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - -

Definition at line 224 of file linear_probing_hash_table.cpp.

224 {
-
225 int cmd = 0, hash = 0, key = 0;
+
225 int cmd = 0, key = 0;
226 std::cout << "Enter the initial size of Hash Table. = ";
227 std::cin >> totalSize;
228 table = std::vector<Entry>(totalSize);
@@ -248,7 +248,6 @@ Variables
275 }
276 return 0;
277}
-
void * hash(const std::string &message)
Converts the string to bytestring and calls the main algorithm.
Definition md5.cpp:288
size_t hashFxn(int key)
Hash a key. Uses the STL library's std::hash() function.
int linearProbe(int key, bool searching)
diff --git a/d1/dc7/linear__probing__hash__table_8cpp_source.html b/d1/dc7/linear__probing__hash__table_8cpp_source.html index ef0c0c935..295590ad4 100644 --- a/d1/dc7/linear__probing__hash__table_8cpp_source.html +++ b/d1/dc7/linear__probing__hash__table_8cpp_source.html @@ -304,7 +304,7 @@ $(function(){initNavTree('d1/dc7/linear__probing__hash__table_8cpp_source.html',
220
224int main() {
-
225 int cmd = 0, hash = 0, key = 0;
+
225 int cmd = 0, key = 0;
226 std::cout << "Enter the initial size of Hash Table. = ";
227 std::cin >> totalSize;
228 table = std::vector<Entry>(totalSize);
diff --git a/d1/dce/classuint256__t__coll__graph.svg b/d1/dce/classuint256__t__coll__graph.svg index 8beb1b004..3b830d9f9 100644 --- a/d1/dce/classuint256__t__coll__graph.svg +++ b/d1/dce/classuint256__t__coll__graph.svg @@ -1,7 +1,7 @@ - - - - - diff --git a/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg b/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg index ce607d219..1da1b5f27 100644 --- a/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg +++ b/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - diff --git a/d2/d23/neural__network_8cpp__incl_org.svg b/d2/d23/neural__network_8cpp__incl_org.svg index ad75026af..354268623 100644 --- a/d2/d23/neural__network_8cpp__incl_org.svg +++ b/d2/d23/neural__network_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - diff --git a/d2/d4b/spirograph_8cpp__incl_org.svg b/d2/d4b/spirograph_8cpp__incl_org.svg index 4941ae7d9..f2886ef36 100644 --- a/d2/d4b/spirograph_8cpp__incl_org.svg +++ b/d2/d4b/spirograph_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg b/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg index ceda8b70e..9af611d7e 100644 --- a/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg +++ b/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - diff --git a/d3/d1a/hill__cipher_8cpp__incl_org.svg b/d3/d1a/hill__cipher_8cpp__incl_org.svg index 1cd0d45ca..9880b2f94 100644 --- a/d3/d1a/hill__cipher_8cpp__incl_org.svg +++ b/d3/d1a/hill__cipher_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - diff --git a/d3/d4c/sha1_8cpp__incl_org.svg b/d3/d4c/sha1_8cpp__incl_org.svg index b6620d4fb..5114c73d1 100644 --- a/d3/d4c/sha1_8cpp__incl_org.svg +++ b/d3/d4c/sha1_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - 29}
30
31int main() {
-
32 int n, t, i, j, k = 0;
+
32 int n, t, i;
33 scanf("%d", &n);
34 for (i = 0; i < n; i++) scanf("%d", &a[i]);
35 bucket_size = ceil(sqrt(n));
@@ -185,7 +185,6 @@ $(function(){initNavTree('d3/d53/mo_8cpp_source.html','../../',''); });
65 for (i = 0; i < t; i++) printf("%d\n", bucket[i]);
66 return 0;
67}
-
double k(double x)
Another test function.
int main()
Main function.
Definition mo.cpp:9
std::string add(const std::string &first, const std::string &second)
Adding two string.
Definition uint128_t.hpp:38
diff --git a/d3/d56/binomial__dist_8cpp__incl.svg b/d3/d56/binomial__dist_8cpp__incl.svg index 81cb08fbf..164c45cc9 100644 --- a/d3/d56/binomial__dist_8cpp__incl.svg +++ b/d3/d56/binomial__dist_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d4/d26/durand__kerner__roots_8cpp__incl_org.svg b/d4/d26/durand__kerner__roots_8cpp__incl_org.svg index 2a91de311..76a800cca 100644 --- a/d4/d26/durand__kerner__roots_8cpp__incl_org.svg +++ b/d4/d26/durand__kerner__roots_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - diff --git a/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg b/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg index c24a21aee..4e21e42d6 100644 --- a/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg +++ b/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg index 9ab29ecde..cc7354d93 100644 --- a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg +++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - diff --git a/d4/d60/kohonen__som__trace_8cpp__incl_org.svg b/d4/d60/kohonen__som__trace_8cpp__incl_org.svg index a603e1b7b..94be28ec4 100644 --- a/d4/d60/kohonen__som__trace_8cpp__incl_org.svg +++ b/d4/d60/kohonen__som__trace_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg b/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg index b18f59301..3a1c2193f 100644 --- a/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg +++ b/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - -
Returns
decrypted text
-

Definition at line 458 of file hill_cipher.cpp.

-
459 {
-
460 return codec(text, decrypt_key);
-
461 }
+

Definition at line 457 of file hill_cipher.cpp.

+
458 {
+
459 return codec(text, decrypt_key);
+
460 }
static const std::string codec(const std::string &text, const matrix< int > &key)
Convenience function to perform block cipher operations. The operations are identical for both encryp...
@@ -319,10 +319,10 @@ Static Private Member Functions
Returns
encrypted text
-

Definition at line 446 of file hill_cipher.cpp.

-
447 {
-
448 return codec(text, encrypt_key);
-
449 }
+

Definition at line 445 of file hill_cipher.cpp.

+
446 {
+
447 return codec(text, encrypt_key);
+
448 }
@@ -424,37 +424,36 @@ template<typename T>
379 int mat_determinant = det_encrypt < 0 ? det_encrypt % L : det_encrypt;
380
381 matrix<double> tmp_inverse = get_inverse(encrypt_key);
-
382 double d2 = determinant_lu(decrypt_key);
-
383
-
384 // find co-prime factor for inversion
-
385 int det_inv = -1;
-
386 for (int i = 0; i < L; i++) {
-
387 if (modulo(mat_determinant * i, L) == 1) {
-
388 det_inv = i;
-
389 break;
-
390 }
-
391 }
-
392
-
393 if (det_inv == -1) {
-
394 std::cerr << "Could not find a co-prime for inversion\n";
-
395 std::exit(EXIT_FAILURE);
-
396 }
-
397
-
398 mat_determinant = det_inv * det_encrypt;
-
399
-
400 // perform modular inverse of encryption matrix
-
401 int i;
-
402#ifdef _OPENMP
-
403#pragma parallel omp for private(i)
-
404#endif
-
405 for (i = 0; i < size; i++) {
-
406 for (int j = 0; j < size; j++) {
-
407 int temp = std::round(tmp_inverse[i][j] * mat_determinant);
-
408 decrypt_key[i][j] = modulo(temp, L);
-
409 }
-
410 }
-
411 return decrypt_key;
-
412 }
+
382
+
383 // find co-prime factor for inversion
+
384 int det_inv = -1;
+
385 for (int i = 0; i < L; i++) {
+
386 if (modulo(mat_determinant * i, L) == 1) {
+
387 det_inv = i;
+
388 break;
+
389 }
+
390 }
+
391
+
392 if (det_inv == -1) {
+
393 std::cerr << "Could not find a co-prime for inversion\n";
+
394 std::exit(EXIT_FAILURE);
+
395 }
+
396
+
397 mat_determinant = det_inv * det_encrypt;
+
398
+
399 // perform modular inverse of encryption matrix
+
400 int i;
+
401#ifdef _OPENMP
+
402#pragma parallel omp for private(i)
+
403#endif
+
404 for (i = 0; i < size; i++) {
+
405 for (int j = 0; j < size; j++) {
+
406 int temp = std::round(tmp_inverse[i][j] * mat_determinant);
+
407 decrypt_key[i][j] = modulo(temp, L);
+
408 }
+
409 }
+
410 return decrypt_key;
+
411 }
static matrix< double > get_inverse(matrix< T > const &A)
double determinant_lu(const matrix< T > &A)
std::vector< std::valarray< T > > matrix
@@ -582,18 +581,18 @@ template<typename T>
Returns
std::pair<matrix<int>, matrix<int>> encryption and decryption keys as a pair
See also
generate_encryption_key
-

Definition at line 425 of file hill_cipher.cpp.

-
427 {
-
428 matrix<int> encrypt_key = generate_encryption_key(size);
-
429 matrix<int> decrypt_key = generate_decryption_key(encrypt_key);
-
430 double det2 = determinant_lu(decrypt_key);
-
431 while (std::abs(det2) < 0.1 || std::abs(det2) > 1e3) {
-
432 encrypt_key = generate_encryption_key(size, limit1, limit2);
-
433 decrypt_key = generate_decryption_key(encrypt_key);
-
434 det2 = determinant_lu(decrypt_key);
-
435 }
-
436 return std::make_pair(encrypt_key, decrypt_key);
-
437 }
+

Definition at line 424 of file hill_cipher.cpp.

+
426 {
+
427 matrix<int> encrypt_key = generate_encryption_key(size);
+
428 matrix<int> decrypt_key = generate_decryption_key(encrypt_key);
+
429 double det2 = determinant_lu(decrypt_key);
+
430 while (std::abs(det2) < 0.1 || std::abs(det2) > 1e3) {
+
431 encrypt_key = generate_encryption_key(size, limit1, limit2);
+
432 decrypt_key = generate_decryption_key(encrypt_key);
+
433 det2 = determinant_lu(decrypt_key);
+
434 }
+
435 return std::make_pair(encrypt_key, decrypt_key);
+
436 }
static matrix< int > generate_encryption_key(size_t size, int limit1=0, int limit2=10)
Generate encryption matrix of a given size. Larger size matrices are difficult to generate but provid...
static matrix< int > generate_decryption_key(matrix< int > const &encrypt_key)
Generate decryption matrix from an encryption matrix key.
diff --git a/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg index 2b6cfbc43..78358f2b1 100644 --- a/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg +++ b/d6/d2b/structbinary__search__tree_1_1bst__node__coll__graph.svg @@ -1,7 +1,7 @@ - - - - - - - diff --git a/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg b/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg index 83a53984e..7427f90ea 100644 --- a/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg +++ b/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - -

Definition at line 250 of file double_hash_hash_table.cpp.

250 {
-
251 int cmd = 0, hash = 0, key = 0;
+
251 int cmd = 0, key = 0;
252 std::cout << "Enter the initial size of Hash Table. = ";
253 std::cin >> totalSize;
254 table = std::vector<Entry>(totalSize);
@@ -253,7 +253,6 @@ Variables
301 }
302 return 0;
303}
-
void * hash(const std::string &message)
Converts the string to bytestring and calls the main algorithm.
Definition md5.cpp:288
size_t hashFxn(int key)
Hash a key. Uses the STL library's std::hash() function.
diff --git a/d6/d80/double__hash__hash__table_8cpp_source.html b/d6/d80/double__hash__hash__table_8cpp_source.html index fd50dad1a..e2efbe73d 100644 --- a/d6/d80/double__hash__hash__table_8cpp_source.html +++ b/d6/d80/double__hash__hash__table_8cpp_source.html @@ -320,7 +320,7 @@ $(function(){initNavTree('d6/d80/double__hash__hash__table_8cpp_source.html','..
246
250int main() {
-
251 int cmd = 0, hash = 0, key = 0;
+
251 int cmd = 0, key = 0;
252 std::cout << "Enter the initial size of Hash Table. = ";
253 std::cin >> totalSize;
254 table = std::vector<Entry>(totalSize);
diff --git a/d6/d93/large__number_8h__dep__incl.svg b/d6/d93/large__number_8h__dep__incl.svg index 346e1e5a0..1bdd564e1 100644 --- a/d6/d93/large__number_8h__dep__incl.svg +++ b/d6/d93/large__number_8h__dep__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 128 cout.tie(0);
129 ll t;
130 cin >> t;
-
131 ll i, j, x;
+
131 ll i, x;
132 while (t--) {
133 cin >> mat_size;
134 for (i = 0; i < mat_size; i++) {
diff --git a/d7/d35/matrix__exponentiation_8cpp_source.html b/d7/d35/matrix__exponentiation_8cpp_source.html index 461ee99d4..2f67ff19e 100644 --- a/d7/d35/matrix__exponentiation_8cpp_source.html +++ b/d7/d35/matrix__exponentiation_8cpp_source.html @@ -206,7 +206,7 @@ $(function(){initNavTree('d7/d35/matrix__exponentiation_8cpp_source.html','../..
128 cout.tie(0);
129 ll t;
130 cin >> t;
-
131 ll i, j, x;
+
131 ll i, x;
132 while (t--) {
133 cin >> mat_size;
134 for (i = 0; i < mat_size; i++) {
diff --git a/d7/d39/lu__decomposition_8h__dep__incl.svg b/d7/d39/lu__decomposition_8h__dep__incl.svg index a9070e425..f048f4afe 100644 --- a/d7/d39/lu__decomposition_8h__dep__incl.svg +++ b/d7/d39/lu__decomposition_8h__dep__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d7/da7/adaline__learning_8cpp__incl_org.svg b/d7/da7/adaline__learning_8cpp__incl_org.svg index 53a8bf2cc..d8c7a87d6 100644 --- a/d7/da7/adaline__learning_8cpp__incl_org.svg +++ b/d7/da7/adaline__learning_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - -

Main function

-

Definition at line 533 of file hill_cipher.cpp.

-
533 {
-
534 std::srand(std::time(nullptr));
-
535 std::cout << "Key dictionary: (" << std::strlen(ciphers::STRKEY) << ")\n\t"
-
536 << ciphers::STRKEY << "\n";
-
537
-
538 std::string text = "This is a simple text with numb3r5 and exclamat!0n.";
-
539
-
540 test1(text);
-
541 test2(text);
-
542
-
543 return 0;
-
544}
+

Definition at line 532 of file hill_cipher.cpp.

+
532 {
+
533 std::srand(std::time(nullptr));
+
534 std::cout << "Key dictionary: (" << std::strlen(ciphers::STRKEY) << ")\n\t"
+
535 << ciphers::STRKEY << "\n";
+
536
+
537 std::string text = "This is a simple text with numb3r5 and exclamat!0n.";
+
538
+
539 test1(text);
+
540 test2(text);
+
541
+
542 return 0;
+
543}
static void test2()
Self-implementations, 2nd test.
static void test1()
Self-test implementations, 1st test.
static const char * STRKEY
@@ -281,39 +281,39 @@ template<typename T>
-

Definition at line 471 of file hill_cipher.cpp.

-
471 {
-
472 // std::string text = "Hello world!";
-
473 std::cout << "======Test 1 (3x3 key) ======\nOriginal text:\n\t" << text
-
474 << std::endl;
-
475
-
476 std::pair<matrix<int>, matrix<int>> p =
- -
478 matrix<int> ekey = p.first;
-
479 matrix<int> dkey = p.second;
-
480
-
481 // matrix<int> ekey = {{22, 28, 25}, {5, 26, 15}, {14, 18, 9}};
-
482 // std::cout << "Encryption key: \n" << ekey;
-
483 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
-
484 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
-
485
-
486 // matrix<int> dkey = ciphers::HillCipher::generate_decryption_key(ekey);
-
487 // std::cout << "Decryption key: \n" << dkey;
-
488 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
-
489 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
-
490
-
491 std::ofstream out_file("hill_cipher_test1.txt");
-
492 out_file << "Block size: " << ekey.size() << "\n";
-
493 out_file << "Encryption Key:\n" << ekey;
-
494 out_file << "\nDecryption Key:\n" << dkey;
-
495 out_file.close();
-
496
-
497 assert(txt_back == text);
-
498 std::cout << "Passed :)\n";
-
499}
-
static std::pair< matrix< int >, matrix< int > > generate_keys(size_t size, int limit1=0, int limit2=10)
Generate encryption and decryption key pair.
-
static const std::string decrypt_text(const std::string &text, const matrix< int > &decrypt_key)
Decrypt a given text using a given key.
-
static const std::string encrypt_text(const std::string &text, const matrix< int > &encrypt_key)
Encrypt a given text using a given key.
+

Definition at line 470 of file hill_cipher.cpp.

+
470 {
+
471 // std::string text = "Hello world!";
+
472 std::cout << "======Test 1 (3x3 key) ======\nOriginal text:\n\t" << text
+
473 << std::endl;
+
474
+
475 std::pair<matrix<int>, matrix<int>> p =
+ +
477 matrix<int> ekey = p.first;
+
478 matrix<int> dkey = p.second;
+
479
+
480 // matrix<int> ekey = {{22, 28, 25}, {5, 26, 15}, {14, 18, 9}};
+
481 // std::cout << "Encryption key: \n" << ekey;
+
482 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
+
483 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
+
484
+
485 // matrix<int> dkey = ciphers::HillCipher::generate_decryption_key(ekey);
+
486 // std::cout << "Decryption key: \n" << dkey;
+
487 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
+
488 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
+
489
+
490 std::ofstream out_file("hill_cipher_test1.txt");
+
491 out_file << "Block size: " << ekey.size() << "\n";
+
492 out_file << "Encryption Key:\n" << ekey;
+
493 out_file << "\nDecryption Key:\n" << dkey;
+
494 out_file.close();
+
495
+
496 assert(txt_back == text);
+
497 std::cout << "Passed :)\n";
+
498}
+
static std::pair< matrix< int >, matrix< int > > generate_keys(size_t size, int limit1=0, int limit2=10)
Generate encryption and decryption key pair.
+
static const std::string decrypt_text(const std::string &text, const matrix< int > &decrypt_key)
Decrypt a given text using a given key.
+
static const std::string encrypt_text(const std::string &text, const matrix< int > &encrypt_key)
Encrypt a given text using a given key.
std::vector< std::valarray< T > > matrix
@@ -341,32 +341,32 @@ template<typename T>
-

Definition at line 506 of file hill_cipher.cpp.

-
506 {
-
507 // std::string text = "Hello world!";
-
508 std::cout << "======Test 2 (8x8 key) ======\nOriginal text:\n\t" << text
-
509 << std::endl;
-
510
-
511 std::pair<matrix<int>, matrix<int>> p =
- -
513 matrix<int> ekey = p.first;
-
514 matrix<int> dkey = p.second;
-
515
-
516 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
-
517 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
-
518
-
519 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
-
520 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
-
521
-
522 std::ofstream out_file("hill_cipher_test2.txt");
-
523 out_file << "Block size: " << ekey.size() << "\n";
-
524 out_file << "Encryption Key:\n" << ekey;
-
525 out_file << "\nDecryption Key:\n" << dkey;
-
526 out_file.close();
-
527
-
528 assert(txt_back.compare(0, text.size(), text) == 0);
-
529 std::cout << "Passed :)\n";
-
530}
+

Definition at line 505 of file hill_cipher.cpp.

+
505 {
+
506 // std::string text = "Hello world!";
+
507 std::cout << "======Test 2 (8x8 key) ======\nOriginal text:\n\t" << text
+
508 << std::endl;
+
509
+
510 std::pair<matrix<int>, matrix<int>> p =
+ +
512 matrix<int> ekey = p.first;
+
513 matrix<int> dkey = p.second;
+
514
+
515 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
+
516 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
+
517
+
518 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
+
519 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
+
520
+
521 std::ofstream out_file("hill_cipher_test2.txt");
+
522 out_file << "Block size: " << ekey.size() << "\n";
+
523 out_file << "Encryption Key:\n" << ekey;
+
524 out_file << "\nDecryption Key:\n" << dkey;
+
525 out_file.close();
+
526
+
527 assert(txt_back.compare(0, text.size(), text) == 0);
+
528 std::cout << "Passed :)\n";
+
529}
diff --git a/d7/db9/hill__cipher_8cpp_source.html b/d7/db9/hill__cipher_8cpp_source.html index 12e447267..27e200601 100644 --- a/d7/db9/hill__cipher_8cpp_source.html +++ b/d7/db9/hill__cipher_8cpp_source.html @@ -383,157 +383,156 @@ $(function(){initNavTree('d7/db9/hill__cipher_8cpp_source.html','../../',''); })
379 int mat_determinant = det_encrypt < 0 ? det_encrypt % L : det_encrypt;
380
381 matrix<double> tmp_inverse = get_inverse(encrypt_key);
-
382 double d2 = determinant_lu(decrypt_key);
-
383
-
384 // find co-prime factor for inversion
-
385 int det_inv = -1;
-
386 for (int i = 0; i < L; i++) {
-
387 if (modulo(mat_determinant * i, L) == 1) {
-
388 det_inv = i;
-
389 break;
-
390 }
-
391 }
-
392
-
393 if (det_inv == -1) {
-
394 std::cerr << "Could not find a co-prime for inversion\n";
-
395 std::exit(EXIT_FAILURE);
-
396 }
-
397
-
398 mat_determinant = det_inv * det_encrypt;
-
399
-
400 // perform modular inverse of encryption matrix
-
401 int i;
-
402#ifdef _OPENMP
-
403#pragma parallel omp for private(i)
-
404#endif
-
405 for (i = 0; i < size; i++) {
-
406 for (int j = 0; j < size; j++) {
-
407 int temp = std::round(tmp_inverse[i][j] * mat_determinant);
-
408 decrypt_key[i][j] = modulo(temp, L);
-
409 }
-
410 }
-
411 return decrypt_key;
-
412 }
+
382
+
383 // find co-prime factor for inversion
+
384 int det_inv = -1;
+
385 for (int i = 0; i < L; i++) {
+
386 if (modulo(mat_determinant * i, L) == 1) {
+
387 det_inv = i;
+
388 break;
+
389 }
+
390 }
+
391
+
392 if (det_inv == -1) {
+
393 std::cerr << "Could not find a co-prime for inversion\n";
+
394 std::exit(EXIT_FAILURE);
+
395 }
+
396
+
397 mat_determinant = det_inv * det_encrypt;
+
398
+
399 // perform modular inverse of encryption matrix
+
400 int i;
+
401#ifdef _OPENMP
+
402#pragma parallel omp for private(i)
+
403#endif
+
404 for (i = 0; i < size; i++) {
+
405 for (int j = 0; j < size; j++) {
+
406 int temp = std::round(tmp_inverse[i][j] * mat_determinant);
+
407 decrypt_key[i][j] = modulo(temp, L);
+
408 }
+
409 }
+
410 return decrypt_key;
+
411 }
-
413
-
-
425 static std::pair<matrix<int>, matrix<int>> generate_keys(size_t size,
-
426 int limit1 = 0,
-
427 int limit2 = 10) {
-
428 matrix<int> encrypt_key = generate_encryption_key(size);
-
429 matrix<int> decrypt_key = generate_decryption_key(encrypt_key);
-
430 double det2 = determinant_lu(decrypt_key);
-
431 while (std::abs(det2) < 0.1 || std::abs(det2) > 1e3) {
-
432 encrypt_key = generate_encryption_key(size, limit1, limit2);
-
433 decrypt_key = generate_decryption_key(encrypt_key);
-
434 det2 = determinant_lu(decrypt_key);
-
435 }
-
436 return std::make_pair(encrypt_key, decrypt_key);
-
437 }
+
412
+
+
424 static std::pair<matrix<int>, matrix<int>> generate_keys(size_t size,
+
425 int limit1 = 0,
+
426 int limit2 = 10) {
+
427 matrix<int> encrypt_key = generate_encryption_key(size);
+
428 matrix<int> decrypt_key = generate_decryption_key(encrypt_key);
+
429 double det2 = determinant_lu(decrypt_key);
+
430 while (std::abs(det2) < 0.1 || std::abs(det2) > 1e3) {
+
431 encrypt_key = generate_encryption_key(size, limit1, limit2);
+
432 decrypt_key = generate_decryption_key(encrypt_key);
+
433 det2 = determinant_lu(decrypt_key);
+
434 }
+
435 return std::make_pair(encrypt_key, decrypt_key);
+
436 }
-
438
-
-
446 static const std::string encrypt_text(const std::string &text,
-
447 const matrix<int> &encrypt_key) {
-
448 return codec(text, encrypt_key);
-
449 }
+
437
+
+
445 static const std::string encrypt_text(const std::string &text,
+
446 const matrix<int> &encrypt_key) {
+
447 return codec(text, encrypt_key);
+
448 }
-
450
-
-
458 static const std::string decrypt_text(const std::string &text,
-
459 const matrix<int> &decrypt_key) {
-
460 return codec(text, decrypt_key);
-
461 }
+
449
+
+
457 static const std::string decrypt_text(const std::string &text,
+
458 const matrix<int> &decrypt_key) {
+
459 return codec(text, decrypt_key);
+
460 }
-
462};
+
461};
-
463
-
464} // namespace ciphers
-
465
-
-
471void test1(const std::string &text) {
-
472 // std::string text = "Hello world!";
-
473 std::cout << "======Test 1 (3x3 key) ======\nOriginal text:\n\t" << text
-
474 << std::endl;
-
475
-
476 std::pair<matrix<int>, matrix<int>> p =
- -
478 matrix<int> ekey = p.first;
-
479 matrix<int> dkey = p.second;
-
480
-
481 // matrix<int> ekey = {{22, 28, 25}, {5, 26, 15}, {14, 18, 9}};
-
482 // std::cout << "Encryption key: \n" << ekey;
-
483 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
-
484 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
-
485
-
486 // matrix<int> dkey = ciphers::HillCipher::generate_decryption_key(ekey);
-
487 // std::cout << "Decryption key: \n" << dkey;
-
488 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
-
489 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
-
490
-
491 std::ofstream out_file("hill_cipher_test1.txt");
-
492 out_file << "Block size: " << ekey.size() << "\n";
-
493 out_file << "Encryption Key:\n" << ekey;
-
494 out_file << "\nDecryption Key:\n" << dkey;
-
495 out_file.close();
-
496
-
497 assert(txt_back == text);
-
498 std::cout << "Passed :)\n";
-
499}
+
462
+
463} // namespace ciphers
+
464
+
+
470void test1(const std::string &text) {
+
471 // std::string text = "Hello world!";
+
472 std::cout << "======Test 1 (3x3 key) ======\nOriginal text:\n\t" << text
+
473 << std::endl;
+
474
+
475 std::pair<matrix<int>, matrix<int>> p =
+ +
477 matrix<int> ekey = p.first;
+
478 matrix<int> dkey = p.second;
+
479
+
480 // matrix<int> ekey = {{22, 28, 25}, {5, 26, 15}, {14, 18, 9}};
+
481 // std::cout << "Encryption key: \n" << ekey;
+
482 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
+
483 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
+
484
+
485 // matrix<int> dkey = ciphers::HillCipher::generate_decryption_key(ekey);
+
486 // std::cout << "Decryption key: \n" << dkey;
+
487 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
+
488 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
+
489
+
490 std::ofstream out_file("hill_cipher_test1.txt");
+
491 out_file << "Block size: " << ekey.size() << "\n";
+
492 out_file << "Encryption Key:\n" << ekey;
+
493 out_file << "\nDecryption Key:\n" << dkey;
+
494 out_file.close();
+
495
+
496 assert(txt_back == text);
+
497 std::cout << "Passed :)\n";
+
498}
-
500
-
-
506void test2(const std::string &text) {
-
507 // std::string text = "Hello world!";
-
508 std::cout << "======Test 2 (8x8 key) ======\nOriginal text:\n\t" << text
-
509 << std::endl;
-
510
-
511 std::pair<matrix<int>, matrix<int>> p =
- -
513 matrix<int> ekey = p.first;
-
514 matrix<int> dkey = p.second;
-
515
-
516 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
-
517 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
-
518
-
519 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
-
520 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
-
521
-
522 std::ofstream out_file("hill_cipher_test2.txt");
-
523 out_file << "Block size: " << ekey.size() << "\n";
-
524 out_file << "Encryption Key:\n" << ekey;
-
525 out_file << "\nDecryption Key:\n" << dkey;
-
526 out_file.close();
-
527
-
528 assert(txt_back.compare(0, text.size(), text) == 0);
-
529 std::cout << "Passed :)\n";
-
530}
+
499
+
+
505void test2(const std::string &text) {
+
506 // std::string text = "Hello world!";
+
507 std::cout << "======Test 2 (8x8 key) ======\nOriginal text:\n\t" << text
+
508 << std::endl;
+
509
+
510 std::pair<matrix<int>, matrix<int>> p =
+ +
512 matrix<int> ekey = p.first;
+
513 matrix<int> dkey = p.second;
+
514
+
515 std::string gibberish = ciphers::HillCipher::encrypt_text(text, ekey);
+
516 std::cout << "Encrypted text:\n\t" << gibberish << std::endl;
+
517
+
518 std::string txt_back = ciphers::HillCipher::decrypt_text(gibberish, dkey);
+
519 std::cout << "Reconstruct text:\n\t" << txt_back << std::endl;
+
520
+
521 std::ofstream out_file("hill_cipher_test2.txt");
+
522 out_file << "Block size: " << ekey.size() << "\n";
+
523 out_file << "Encryption Key:\n" << ekey;
+
524 out_file << "\nDecryption Key:\n" << dkey;
+
525 out_file.close();
+
526
+
527 assert(txt_back.compare(0, text.size(), text) == 0);
+
528 std::cout << "Passed :)\n";
+
529}
-
531
-
-
533int main() {
-
534 std::srand(std::time(nullptr));
-
535 std::cout << "Key dictionary: (" << std::strlen(ciphers::STRKEY) << ")\n\t"
-
536 << ciphers::STRKEY << "\n";
-
537
-
538 std::string text = "This is a simple text with numb3r5 and exclamat!0n.";
-
539
-
540 test1(text);
-
541 test2(text);
-
542
-
543 return 0;
-
544}
+
530
+
+
532int main() {
+
533 std::srand(std::time(nullptr));
+
534 std::cout << "Key dictionary: (" << std::strlen(ciphers::STRKEY) << ")\n\t"
+
535 << ciphers::STRKEY << "\n";
+
536
+
537 std::string text = "This is a simple text with numb3r5 and exclamat!0n.";
+
538
+
539 test1(text);
+
540 test2(text);
+
541
+
542 return 0;
+
543}
Implementation of Hill Cipher algorithm.
static char get_idx_char(const uint8_t idx)
Get the character at a given index in the STRKEY.
static matrix< double > get_inverse(matrix< T > const &A)
-
static std::pair< matrix< int >, matrix< int > > generate_keys(size_t size, int limit1=0, int limit2=10)
Generate encryption and decryption key pair.
-
static const std::string decrypt_text(const std::string &text, const matrix< int > &decrypt_key)
Decrypt a given text using a given key.
+
static std::pair< matrix< int >, matrix< int > > generate_keys(size_t size, int limit1=0, int limit2=10)
Generate encryption and decryption key pair.
+
static const std::string decrypt_text(const std::string &text, const matrix< int > &decrypt_key)
Decrypt a given text using a given key.
static const T2 rand_range(T1 a, T1 b)
Function to generate a random integer in a given interval.
static matrix< int > generate_encryption_key(size_t size, int limit1=0, int limit2=10)
Generate encryption matrix of a given size. Larger size matrices are difficult to generate but provid...
static double rand_range(matrix< T2 > *M, T1 a, T1 b)
Function overload to fill a matrix with random integers in a given interval.
static const T gcd(T a, T b)
Compute GCD of two integers using Euler's algorithm.
-
static const std::string encrypt_text(const std::string &text, const matrix< int > &encrypt_key)
Encrypt a given text using a given key.
+
static const std::string encrypt_text(const std::string &text, const matrix< int > &encrypt_key)
Encrypt a given text using a given key.
static matrix< int > generate_decryption_key(matrix< int > const &encrypt_key)
Generate decryption matrix from an encryption matrix key.
static const std::valarray< uint8_t > mat_mul(const std::valarray< uint8_t > &vector, const matrix< int > &key)
helper function to perform vector multiplication with encryption or decryption matrix
static const std::string codec(const std::string &text, const matrix< int > &key)
Convenience function to perform block cipher operations. The operations are identical for both encryp...
@@ -542,7 +541,7 @@ $(function(){initNavTree('d7/db9/hill__cipher_8cpp_source.html','../../',''); })
static void test2()
Self-implementations, 2nd test.
static void test1()
Self-test implementations, 1st test.
static std::ostream & operator<<(std::ostream &out, matrix< T > const &v)
-
int main()
+
int main()
Functions associated with LU Decomposition of a square matrix.
double determinant_lu(const matrix< T > &A)
std::vector< std::valarray< T > > matrix
diff --git a/d7/dc1/classgraph_1_1_graph__inherit__graph.svg b/d7/dc1/classgraph_1_1_graph__inherit__graph.svg index d8f2af75a..dc8bbcd67 100644 --- a/d7/dc1/classgraph_1_1_graph__inherit__graph.svg +++ b/d7/dc1/classgraph_1_1_graph__inherit__graph.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - -

Definition at line 34 of file rb_tree.cpp.

35{
-
36 int z, i = 0;
+
36 int z;
37 cout << "\nEnter key of the node to be inserted: ";
38 cin >> z;
39 node *p, *q;
diff --git a/d8/d77/namespacemachine__learning.html b/d8/d77/namespacemachine__learning.html index fd5f37509..4d7e91798 100644 --- a/d8/d77/namespacemachine__learning.html +++ b/d8/d77/namespacemachine__learning.html @@ -1534,7 +1534,7 @@ template<typename T>

Definition at line 103 of file kohonen_som_trace.cpp.

105 {
-
106 int j = 0, k = 0;
+
106 int j = 0;
107 int num_out = W->size(); // number of SOM output nodes
108 // int num_features = x.size(); // number of data features
109
diff --git a/d8/d96/gram__schmidt_8cpp__incl.svg b/d8/d96/gram__schmidt_8cpp__incl.svg index dc7327a1d..7571f0583 100644 --- a/d8/d96/gram__schmidt_8cpp__incl.svg +++ b/d8/d96/gram__schmidt_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - diff --git a/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg b/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg index f53dac040..217f54e29 100644 --- a/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg +++ b/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - 103void update_weights(const std::valarray<double> &x,
104 std::vector<std::valarray<double>> *W,
105 std::valarray<double> *D, double alpha, int R) {
-
106 int j = 0, k = 0;
+
106 int j = 0;
107 int num_out = W->size(); // number of SOM output nodes
108 // int num_features = x.size(); // number of data features
109
diff --git a/d9/d4e/gnome__sort_8cpp__incl.svg b/d9/d4e/gnome__sort_8cpp__incl.svg index f0308fecb..2152d0d45 100644 --- a/d9/d4e/gnome__sort_8cpp__incl.svg +++ b/d9/d4e/gnome__sort_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - -
34void RBtree::insert()
35{
-
36 int z, i = 0;
+
36 int z;
37 cout << "\nEnter key of the node to be inserted: ";
38 cin >> z;
39 node *p, *q;
diff --git a/d9/dae/struct_queue__coll__graph.svg b/d9/dae/struct_queue__coll__graph.svg index 7444928ff..9299fc5b9 100644 --- a/d9/dae/struct_queue__coll__graph.svg +++ b/d9/dae/struct_queue__coll__graph.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg b/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg index 91ddb3c70..0d98a5851 100644 --- a/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg +++ b/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Definition at line 246 of file quadratic_probing_hash_table.cpp.

246 {
-
247 int cmd = 0, hash = 0, key = 0;
+
247 int cmd = 0, key = 0;
248 std::cout << "Enter the initial size of Hash Table. = ";
249 std::cin >> totalSize;
250 table = std::vector<Entry>(totalSize);
@@ -251,7 +251,6 @@ Variables
299 }
300 return 0;
301}
-
void * hash(const std::string &message)
Converts the string to bytestring and calls the main algorithm.
Definition md5.cpp:288
diff --git a/db/d71/quadratic__probing__hash__table_8cpp_source.html b/db/d71/quadratic__probing__hash__table_8cpp_source.html index aa02891a7..bc00a60dd 100644 --- a/db/d71/quadratic__probing__hash__table_8cpp_source.html +++ b/db/d71/quadratic__probing__hash__table_8cpp_source.html @@ -321,7 +321,7 @@ $(function(){initNavTree('db/d71/quadratic__probing__hash__table_8cpp_source.htm
242
246int main() {
-
247 int cmd = 0, hash = 0, key = 0;
+
247 int cmd = 0, key = 0;
248 std::cout << "Enter the initial size of Hash Table. = ";
249 std::cin >> totalSize;
250 table = std::vector<Entry>(totalSize);
diff --git a/db/d7e/structstd_1_1is__arithmetic_3_01uint128__t_01_4__inherit__graph.svg b/db/d7e/structstd_1_1is__arithmetic_3_01uint128__t_01_4__inherit__graph.svg index 1d60ad28d..5cd5e64ec 100644 --- a/db/d7e/structstd_1_1is__arithmetic_3_01uint128__t_01_4__inherit__graph.svg +++ b/db/d7e/structstd_1_1is__arithmetic_3_01uint128__t_01_4__inherit__graph.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Returns
0 on exit
-

Definition at line 87 of file maximum_circular_subarray.cpp.

-
87 {
-
88 test(); // run self-test implementations
-
89 return 0;
-
90}
+

Definition at line 86 of file maximum_circular_subarray.cpp.

+
86 {
+
87 test(); // run self-test implementations
+
88 return 0;
+
89}
static void test()
Self-test implementation.
@@ -221,15 +221,14 @@ Functions
67 // Output: 22
68 // Explanation: Subarray 12, 8, -8, 9, -9, 10 gives the maximum sum, that is 22.
69
-
70 int n = 7; // size of the array
-
71 std::vector<int> arr = {8, -8, 9, -9, 10, -11, 12};
-
72 assert(dynamic_programming::maxCircularSum(arr) == 22); // this ensures that the algorithm works as expected
-
73
-
74 arr = {8, -8, 10, -9, 10, -11, 12};
-
75 assert(dynamic_programming::maxCircularSum(arr) == 23);
-
76
-
77 std::cout << "All tests have successfully passed!\n";
-
78}
+
70 std::vector<int> arr = {8, -8, 9, -9, 10, -11, 12};
+
71 assert(dynamic_programming::maxCircularSum(arr) == 22); // this ensures that the algorithm works as expected
+
72
+
73 arr = {8, -8, 10, -9, 10, -11, 12};
+
74 assert(dynamic_programming::maxCircularSum(arr) == 23);
+
75
+
76 std::cout << "All tests have successfully passed!\n";
+
77}
int maxCircularSum(std::vector< int > &arr)
returns the maximum contiguous circular sum of an array
diff --git a/db/dfb/maximum__circular__subarray_8cpp_source.html b/db/dfb/maximum__circular__subarray_8cpp_source.html index bc7d7d886..98a4a4a84 100644 --- a/db/dfb/maximum__circular__subarray_8cpp_source.html +++ b/db/dfb/maximum__circular__subarray_8cpp_source.html @@ -167,23 +167,22 @@ $(function(){initNavTree('db/dfb/maximum__circular__subarray_8cpp_source.html','
67 // Output: 22
68 // Explanation: Subarray 12, 8, -8, 9, -9, 10 gives the maximum sum, that is 22.
69
-
70 int n = 7; // size of the array
-
71 std::vector<int> arr = {8, -8, 9, -9, 10, -11, 12};
-
72 assert(dynamic_programming::maxCircularSum(arr) == 22); // this ensures that the algorithm works as expected
-
73
-
74 arr = {8, -8, 10, -9, 10, -11, 12};
-
75 assert(dynamic_programming::maxCircularSum(arr) == 23);
-
76
-
77 std::cout << "All tests have successfully passed!\n";
-
78}
+
70 std::vector<int> arr = {8, -8, 9, -9, 10, -11, 12};
+
71 assert(dynamic_programming::maxCircularSum(arr) == 22); // this ensures that the algorithm works as expected
+
72
+
73 arr = {8, -8, 10, -9, 10, -11, 12};
+
74 assert(dynamic_programming::maxCircularSum(arr) == 23);
+
75
+
76 std::cout << "All tests have successfully passed!\n";
+
77}
-
79
-
80
-
-
87int main(int argc, char *argv[]) {
-
88 test(); // run self-test implementations
-
89 return 0;
-
90}
+
78
+
79
+
+
86int main(int argc, char *argv[]) {
+
87 test(); // run self-test implementations
+
88 return 0;
+
89}
int main()
Main function.
static void test()
Self-test implementation.
diff --git a/dc/d14/structoperations__on__datastructures_1_1circular__linked__list_1_1_node__coll__graph.svg b/dc/d14/structoperations__on__datastructures_1_1circular__linked__list_1_1_node__coll__graph.svg index c0ee81246..df962a3bd 100644 --- a/dc/d14/structoperations__on__datastructures_1_1circular__linked__list_1_1_node__coll__graph.svg +++ b/dc/d14/structoperations__on__datastructures_1_1circular__linked__list_1_1_node__coll__graph.svg @@ -1,7 +1,7 @@ - - - - - -

main function

-

Definition at line 423 of file ordinary_least_squares_regressor.cpp.

-
423 {
-
424 ols_test();
+

Definition at line 421 of file ordinary_least_squares_regressor.cpp.

+
421 {
+
422 ols_test();
+
423
+
424 size_t N = 0, F = 0;
425
-
426 size_t N = 0, F = 0;
-
427
-
428 std::cout << "Enter number of features: ";
-
429 // number of features = columns
-
430 std::cin >> F;
-
431 std::cout << "Enter number of samples: ";
-
432 // number of samples = rows
-
433 std::cin >> N;
-
434
-
435 std::vector<std::vector<float>> data(N);
-
436 std::vector<float> Y(N);
-
437
-
438 std::cout
-
439 << "Enter training data. Per sample, provide features and one output."
-
440 << std::endl;
-
441
-
442 for (size_t rows = 0; rows < N; rows++) {
-
443 std::vector<float> v(F);
-
444 std::cout << "Sample# " << rows + 1 << ": ";
-
445 for (size_t cols = 0; cols < F; cols++) {
-
446 // get the F features
-
447 std::cin >> v[cols];
-
448 }
-
449 data[rows] = v;
-
450 // get the corresponding output
-
451 std::cin >> Y[rows];
-
452 }
-
453
-
454 std::vector<float> beta = fit_OLS_regressor(data, Y);
-
455 std::cout << std::endl << std::endl << "beta:" << beta << std::endl;
-
456
-
457 size_t T = 0;
-
458 std::cout << "Enter number of test samples: ";
-
459 // number of test sample inputs
-
460 std::cin >> T;
-
461 std::vector<std::vector<float>> data2(T);
-
462 // vector<float> Y2(T);
-
463
-
464 for (size_t rows = 0; rows < T; rows++) {
-
465 std::cout << "Sample# " << rows + 1 << ": ";
-
466 std::vector<float> v(F);
-
467 for (size_t cols = 0; cols < F; cols++) std::cin >> v[cols];
-
468 data2[rows] = v;
-
469 }
-
470
-
471 std::vector<float> out = predict_OLS_regressor(data2, beta);
-
472 for (size_t rows = 0; rows < T; rows++) std::cout << out[rows] << std::endl;
-
473
-
474 return 0;
-
475}
+
426 std::cout << "Enter number of features: ";
+
427 // number of features = columns
+
428 std::cin >> F;
+
429 std::cout << "Enter number of samples: ";
+
430 // number of samples = rows
+
431 std::cin >> N;
+
432
+
433 std::vector<std::vector<float>> data(N);
+
434 std::vector<float> Y(N);
+
435
+
436 std::cout
+
437 << "Enter training data. Per sample, provide features and one output."
+
438 << std::endl;
+
439
+
440 for (size_t rows = 0; rows < N; rows++) {
+
441 std::vector<float> v(F);
+
442 std::cout << "Sample# " << rows + 1 << ": ";
+
443 for (size_t cols = 0; cols < F; cols++) {
+
444 // get the F features
+
445 std::cin >> v[cols];
+
446 }
+
447 data[rows] = v;
+
448 // get the corresponding output
+
449 std::cin >> Y[rows];
+
450 }
+
451
+
452 std::vector<float> beta = fit_OLS_regressor(data, Y);
+
453 std::cout << std::endl << std::endl << "beta:" << beta << std::endl;
+
454
+
455 size_t T = 0;
+
456 std::cout << "Enter number of test samples: ";
+
457 // number of test sample inputs
+
458 std::cin >> T;
+
459 std::vector<std::vector<float>> data2(T);
+
460 // vector<float> Y2(T);
+
461
+
462 for (size_t rows = 0; rows < T; rows++) {
+
463 std::cout << "Sample# " << rows + 1 << ": ";
+
464 std::vector<float> v(F);
+
465 for (size_t cols = 0; cols < F; cols++) std::cin >> v[cols];
+
466 data2[rows] = v;
+
467 }
+
468
+
469 std::vector<float> out = predict_OLS_regressor(data2, beta);
+
470 for (size_t rows = 0; rows < T; rows++) std::cout << out[rows] << std::endl;
+
471
+
472 return 0;
+
473}
int data[MAX]
test data
std::vector< float > fit_OLS_regressor(std::vector< std::vector< T > > const &X, std::vector< T > const &Y)
@@ -488,55 +488,53 @@ template<typename T>

Definition at line 369 of file ordinary_least_squares_regressor.cpp.

369 {
-
370 int F = 3, N = 5;
-
371
-
372 /* test function = x^2 -5 */
-
373 std::cout << "Test 1 (quadratic function)....";
-
374 // create training data set with features = x, x^2, x^3
-
375 std::vector<std::vector<float>> data1(
-
376 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
-
377 // create corresponding outputs
-
378 std::vector<float> Y1({20, -4, -5, -4, 31});
-
379 // perform regression modelling
-
380 std::vector<float> beta1 = fit_OLS_regressor(data1, Y1);
-
381 // create test data set with same features = x, x^2, x^3
-
382 std::vector<std::vector<float>> test_data1(
-
383 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
-
384 // expected regression outputs
-
385 std::vector<float> expected1({-1, -1, 95, 95});
-
386 // predicted regression outputs
-
387 std::vector<float> out1 = predict_OLS_regressor(test_data1, beta1);
-
388 // compare predicted results are within +-0.01 limit of expected
-
389 for (size_t rows = 0; rows < out1.size(); rows++) {
-
390 assert(std::abs(out1[rows] - expected1[rows]) < 0.01);
-
391 }
-
392 std::cout << "passed\n";
-
393
-
394 /* test function = x^3 + x^2 - 100 */
-
395 std::cout << "Test 2 (cubic function)....";
-
396 // create training data set with features = x, x^2, x^3
-
397 std::vector<std::vector<float>> data2(
-
398 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
-
399 // create corresponding outputs
-
400 std::vector<float> Y2({-200, -100, -100, 98, 152});
-
401 // perform regression modelling
-
402 std::vector<float> beta2 = fit_OLS_regressor(data2, Y2);
-
403 // create test data set with same features = x, x^2, x^3
-
404 std::vector<std::vector<float>> test_data2(
-
405 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
-
406 // expected regression outputs
-
407 std::vector<float> expected2({-104, -88, -1000, 1000});
-
408 // predicted regression outputs
-
409 std::vector<float> out2 = predict_OLS_regressor(test_data2, beta2);
-
410 // compare predicted results are within +-0.01 limit of expected
-
411 for (size_t rows = 0; rows < out2.size(); rows++) {
-
412 assert(std::abs(out2[rows] - expected2[rows]) < 0.01);
-
413 }
-
414 std::cout << "passed\n";
-
415
-
416 std::cout << std::endl; // ensure test results are displayed on screen
-
417 // (flush stdout)
-
418}
+
370 /* test function = x^2 -5 */
+
371 std::cout << "Test 1 (quadratic function)....";
+
372 // create training data set with features = x, x^2, x^3
+
373 std::vector<std::vector<float>> data1(
+
374 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
+
375 // create corresponding outputs
+
376 std::vector<float> Y1({20, -4, -5, -4, 31});
+
377 // perform regression modelling
+
378 std::vector<float> beta1 = fit_OLS_regressor(data1, Y1);
+
379 // create test data set with same features = x, x^2, x^3
+
380 std::vector<std::vector<float>> test_data1(
+
381 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
+
382 // expected regression outputs
+
383 std::vector<float> expected1({-1, -1, 95, 95});
+
384 // predicted regression outputs
+
385 std::vector<float> out1 = predict_OLS_regressor(test_data1, beta1);
+
386 // compare predicted results are within +-0.01 limit of expected
+
387 for (size_t rows = 0; rows < out1.size(); rows++) {
+
388 assert(std::abs(out1[rows] - expected1[rows]) < 0.01);
+
389 }
+
390 std::cout << "passed\n";
+
391
+
392 /* test function = x^3 + x^2 - 100 */
+
393 std::cout << "Test 2 (cubic function)....";
+
394 // create training data set with features = x, x^2, x^3
+
395 std::vector<std::vector<float>> data2(
+
396 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
+
397 // create corresponding outputs
+
398 std::vector<float> Y2({-200, -100, -100, 98, 152});
+
399 // perform regression modelling
+
400 std::vector<float> beta2 = fit_OLS_regressor(data2, Y2);
+
401 // create test data set with same features = x, x^2, x^3
+
402 std::vector<std::vector<float>> test_data2(
+
403 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
+
404 // expected regression outputs
+
405 std::vector<float> expected2({-104, -88, -1000, 1000});
+
406 // predicted regression outputs
+
407 std::vector<float> out2 = predict_OLS_regressor(test_data2, beta2);
+
408 // compare predicted results are within +-0.01 limit of expected
+
409 for (size_t rows = 0; rows < out2.size(); rows++) {
+
410 assert(std::abs(out2[rows] - expected2[rows]) < 0.01);
+
411 }
+
412 std::cout << "passed\n";
+
413
+
414 std::cout << std::endl; // ensure test results are displayed on screen
+
415 // (flush stdout)
+
416}
diff --git a/dc/d38/ordinary__least__squares__regressor_8cpp_source.html b/dc/d38/ordinary__least__squares__regressor_8cpp_source.html index ab289410b..baf9a6de2 100644 --- a/dc/d38/ordinary__least__squares__regressor_8cpp_source.html +++ b/dc/d38/ordinary__least__squares__regressor_8cpp_source.html @@ -437,111 +437,109 @@ $(function(){initNavTree('dc/d38/ordinary__least__squares__regressor_8cpp_source
367
369void ols_test() {
-
370 int F = 3, N = 5;
-
371
-
372 /* test function = x^2 -5 */
-
373 std::cout << "Test 1 (quadratic function)....";
-
374 // create training data set with features = x, x^2, x^3
-
375 std::vector<std::vector<float>> data1(
-
376 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
-
377 // create corresponding outputs
-
378 std::vector<float> Y1({20, -4, -5, -4, 31});
-
379 // perform regression modelling
-
380 std::vector<float> beta1 = fit_OLS_regressor(data1, Y1);
-
381 // create test data set with same features = x, x^2, x^3
-
382 std::vector<std::vector<float>> test_data1(
-
383 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
-
384 // expected regression outputs
-
385 std::vector<float> expected1({-1, -1, 95, 95});
-
386 // predicted regression outputs
-
387 std::vector<float> out1 = predict_OLS_regressor(test_data1, beta1);
-
388 // compare predicted results are within +-0.01 limit of expected
-
389 for (size_t rows = 0; rows < out1.size(); rows++) {
-
390 assert(std::abs(out1[rows] - expected1[rows]) < 0.01);
-
391 }
-
392 std::cout << "passed\n";
-
393
-
394 /* test function = x^3 + x^2 - 100 */
-
395 std::cout << "Test 2 (cubic function)....";
-
396 // create training data set with features = x, x^2, x^3
-
397 std::vector<std::vector<float>> data2(
-
398 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
-
399 // create corresponding outputs
-
400 std::vector<float> Y2({-200, -100, -100, 98, 152});
-
401 // perform regression modelling
-
402 std::vector<float> beta2 = fit_OLS_regressor(data2, Y2);
-
403 // create test data set with same features = x, x^2, x^3
-
404 std::vector<std::vector<float>> test_data2(
-
405 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
-
406 // expected regression outputs
-
407 std::vector<float> expected2({-104, -88, -1000, 1000});
-
408 // predicted regression outputs
-
409 std::vector<float> out2 = predict_OLS_regressor(test_data2, beta2);
-
410 // compare predicted results are within +-0.01 limit of expected
-
411 for (size_t rows = 0; rows < out2.size(); rows++) {
-
412 assert(std::abs(out2[rows] - expected2[rows]) < 0.01);
-
413 }
-
414 std::cout << "passed\n";
-
415
-
416 std::cout << std::endl; // ensure test results are displayed on screen
-
417 // (flush stdout)
-
418}
+
370 /* test function = x^2 -5 */
+
371 std::cout << "Test 1 (quadratic function)....";
+
372 // create training data set with features = x, x^2, x^3
+
373 std::vector<std::vector<float>> data1(
+
374 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
+
375 // create corresponding outputs
+
376 std::vector<float> Y1({20, -4, -5, -4, 31});
+
377 // perform regression modelling
+
378 std::vector<float> beta1 = fit_OLS_regressor(data1, Y1);
+
379 // create test data set with same features = x, x^2, x^3
+
380 std::vector<std::vector<float>> test_data1(
+
381 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
+
382 // expected regression outputs
+
383 std::vector<float> expected1({-1, -1, 95, 95});
+
384 // predicted regression outputs
+
385 std::vector<float> out1 = predict_OLS_regressor(test_data1, beta1);
+
386 // compare predicted results are within +-0.01 limit of expected
+
387 for (size_t rows = 0; rows < out1.size(); rows++) {
+
388 assert(std::abs(out1[rows] - expected1[rows]) < 0.01);
+
389 }
+
390 std::cout << "passed\n";
+
391
+
392 /* test function = x^3 + x^2 - 100 */
+
393 std::cout << "Test 2 (cubic function)....";
+
394 // create training data set with features = x, x^2, x^3
+
395 std::vector<std::vector<float>> data2(
+
396 {{-5, 25, -125}, {-1, 1, -1}, {0, 0, 0}, {1, 1, 1}, {6, 36, 216}});
+
397 // create corresponding outputs
+
398 std::vector<float> Y2({-200, -100, -100, 98, 152});
+
399 // perform regression modelling
+
400 std::vector<float> beta2 = fit_OLS_regressor(data2, Y2);
+
401 // create test data set with same features = x, x^2, x^3
+
402 std::vector<std::vector<float>> test_data2(
+
403 {{-2, 4, -8}, {2, 4, 8}, {-10, 100, -1000}, {10, 100, 1000}});
+
404 // expected regression outputs
+
405 std::vector<float> expected2({-104, -88, -1000, 1000});
+
406 // predicted regression outputs
+
407 std::vector<float> out2 = predict_OLS_regressor(test_data2, beta2);
+
408 // compare predicted results are within +-0.01 limit of expected
+
409 for (size_t rows = 0; rows < out2.size(); rows++) {
+
410 assert(std::abs(out2[rows] - expected2[rows]) < 0.01);
+
411 }
+
412 std::cout << "passed\n";
+
413
+
414 std::cout << std::endl; // ensure test results are displayed on screen
+
415 // (flush stdout)
+
416}
-
419
-
-
423int main() {
-
424 ols_test();
+
417
+
+
421int main() {
+
422 ols_test();
+
423
+
424 size_t N = 0, F = 0;
425
-
426 size_t N = 0, F = 0;
-
427
-
428 std::cout << "Enter number of features: ";
-
429 // number of features = columns
-
430 std::cin >> F;
-
431 std::cout << "Enter number of samples: ";
-
432 // number of samples = rows
-
433 std::cin >> N;
-
434
-
435 std::vector<std::vector<float>> data(N);
-
436 std::vector<float> Y(N);
-
437
-
438 std::cout
-
439 << "Enter training data. Per sample, provide features and one output."
-
440 << std::endl;
-
441
-
442 for (size_t rows = 0; rows < N; rows++) {
-
443 std::vector<float> v(F);
-
444 std::cout << "Sample# " << rows + 1 << ": ";
-
445 for (size_t cols = 0; cols < F; cols++) {
-
446 // get the F features
-
447 std::cin >> v[cols];
-
448 }
-
449 data[rows] = v;
-
450 // get the corresponding output
-
451 std::cin >> Y[rows];
-
452 }
-
453
-
454 std::vector<float> beta = fit_OLS_regressor(data, Y);
-
455 std::cout << std::endl << std::endl << "beta:" << beta << std::endl;
-
456
-
457 size_t T = 0;
-
458 std::cout << "Enter number of test samples: ";
-
459 // number of test sample inputs
-
460 std::cin >> T;
-
461 std::vector<std::vector<float>> data2(T);
-
462 // vector<float> Y2(T);
-
463
-
464 for (size_t rows = 0; rows < T; rows++) {
-
465 std::cout << "Sample# " << rows + 1 << ": ";
-
466 std::vector<float> v(F);
-
467 for (size_t cols = 0; cols < F; cols++) std::cin >> v[cols];
-
468 data2[rows] = v;
-
469 }
-
470
-
471 std::vector<float> out = predict_OLS_regressor(data2, beta);
-
472 for (size_t rows = 0; rows < T; rows++) std::cout << out[rows] << std::endl;
-
473
-
474 return 0;
-
475}
+
426 std::cout << "Enter number of features: ";
+
427 // number of features = columns
+
428 std::cin >> F;
+
429 std::cout << "Enter number of samples: ";
+
430 // number of samples = rows
+
431 std::cin >> N;
+
432
+
433 std::vector<std::vector<float>> data(N);
+
434 std::vector<float> Y(N);
+
435
+
436 std::cout
+
437 << "Enter training data. Per sample, provide features and one output."
+
438 << std::endl;
+
439
+
440 for (size_t rows = 0; rows < N; rows++) {
+
441 std::vector<float> v(F);
+
442 std::cout << "Sample# " << rows + 1 << ": ";
+
443 for (size_t cols = 0; cols < F; cols++) {
+
444 // get the F features
+
445 std::cin >> v[cols];
+
446 }
+
447 data[rows] = v;
+
448 // get the corresponding output
+
449 std::cin >> Y[rows];
+
450 }
+
451
+
452 std::vector<float> beta = fit_OLS_regressor(data, Y);
+
453 std::cout << std::endl << std::endl << "beta:" << beta << std::endl;
+
454
+
455 size_t T = 0;
+
456 std::cout << "Enter number of test samples: ";
+
457 // number of test sample inputs
+
458 std::cin >> T;
+
459 std::vector<std::vector<float>> data2(T);
+
460 // vector<float> Y2(T);
+
461
+
462 for (size_t rows = 0; rows < T; rows++) {
+
463 std::cout << "Sample# " << rows + 1 << ": ";
+
464 std::vector<float> v(F);
+
465 for (size_t cols = 0; cols < F; cols++) std::cin >> v[cols];
+
466 data2[rows] = v;
+
467 }
+
468
+
469 std::vector<float> out = predict_OLS_regressor(data2, beta);
+
470 for (size_t rows = 0; rows < T; rows++) std::cout << out[rows] << std::endl;
+
471
+
472 return 0;
+
473}
int data[MAX]
test data
std::vector< T > operator+(std::vector< T > const &A, std::vector< T > const &B)
@@ -554,7 +552,7 @@ $(function(){initNavTree('dc/d38/ordinary__least__squares__regressor_8cpp_source
std::vector< float > fit_OLS_regressor(std::vector< std::vector< T > > const &X, std::vector< T > const &Y)
std::vector< float > predict_OLS_regressor(std::vector< std::vector< T > > const &X, std::vector< float > const &beta)
std::vector< std::vector< T > > operator*(std::vector< std::vector< T > > const &A, std::vector< std::vector< T > > const &B)
- +
std::vector< std::vector< float > > get_inverse(std::vector< std::vector< T > > const &A)
diff --git a/dc/d40/fast__integer__input_8cpp__incl.svg b/dc/d40/fast__integer__input_8cpp__incl.svg index 19bcb0556..584a52488 100644 --- a/dc/d40/fast__integer__input_8cpp__incl.svg +++ b/dc/d40/fast__integer__input_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dc/dd2/sha256_8cpp__incl_org.svg b/dc/dd2/sha256_8cpp__incl_org.svg index 877840ba4..c5b222ef7 100644 --- a/dc/dd2/sha256_8cpp__incl_org.svg +++ b/dc/dd2/sha256_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - diff --git a/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg b/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg index 6d42b3575..b8c24439c 100644 --- a/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg +++ b/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - diff --git a/dd/d0f/md5_8cpp__incl_org.svg b/dd/d0f/md5_8cpp__incl_org.svg index 502874592..06972a895 100644 --- a/dd/d0f/md5_8cpp__incl_org.svg +++ b/dd/d0f/md5_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Definition at line 20 of file successive_approximation.cpp.

20 {
-
21 float y, x1, x2, x3, sum, s, a, f1, f2, gd;
+
21 float y, x1, x2, sum;
22 int i, n;
23
24 for (i = 0; i < 10; i++) {
diff --git a/df/dc8/successive__approximation_8cpp_source.html b/df/dc8/successive__approximation_8cpp_source.html index 405dcecd8..49de54111 100644 --- a/df/dc8/successive__approximation_8cpp_source.html +++ b/df/dc8/successive__approximation_8cpp_source.html @@ -126,7 +126,7 @@ $(function(){initNavTree('df/dc8/successive__approximation_8cpp_source.html','..
18
20int main() {
-
21 float y, x1, x2, x3, sum, s, a, f1, f2, gd;
+
21 float y, x1, x2, sum;
22 int i, n;
23
24 for (i = 0; i < 10; i++) {
diff --git a/df/dce/classgreedy__algorithms_1_1dijkstra_1_1_graph__coll__graph.svg b/df/dce/classgreedy__algorithms_1_1dijkstra_1_1_graph__coll__graph.svg index 5b711a8e1..1e36ec9a9 100644 --- a/df/dce/classgreedy__algorithms_1_1dijkstra_1_1_graph__coll__graph.svg +++ b/df/dce/classgreedy__algorithms_1_1dijkstra_1_1_graph__coll__graph.svg @@ -1,7 +1,7 @@ - - - - - - - diff --git a/df/dd6/a1z26__cipher_8cpp__incl_org.svg b/df/dd6/a1z26__cipher_8cpp__incl_org.svg index 6e7d94b0b..ed3cc73ea 100644 --- a/df/dd6/a1z26__cipher_8cpp__incl_org.svg +++ b/df/dd6/a1z26__cipher_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -