diff --git a/annotated.html b/annotated.html index 4ae138a8d..94d2a55f9 100644 --- a/annotated.html +++ b/annotated.html @@ -158,7 +158,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
-
diff --git a/d0/d6d/modular__exponentiation_8cpp.html b/d0/d6d/modular__exponentiation_8cpp.html
index 9534e9c3a..831349b9e 100644
--- a/d0/d6d/modular__exponentiation_8cpp.html
+++ b/d0/d6d/modular__exponentiation_8cpp.html
@@ -118,7 +118,7 @@ Include dependency graph for modular_exponentiation.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d1/dbb/n__choose__r_8cpp.html b/d1/dbb/n__choose__r_8cpp.html
index 481a8cc23..854caf930 100644
--- a/d1/dbb/n__choose__r_8cpp.html
+++ b/d1/dbb/n__choose__r_8cpp.html
@@ -118,7 +118,7 @@ Include dependency graph for n_choose_r.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d1/de9/integral__approximation_8cpp.html b/d1/de9/integral__approximation_8cpp.html
index 608ede337..9d389eb38 100644
--- a/d1/de9/integral__approximation_8cpp.html
+++ b/d1/de9/integral__approximation_8cpp.html
@@ -120,7 +120,7 @@ Include dependency graph for integral_approximation.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d3/dfe/perimeter_8cpp.html b/d3/dfe/perimeter_8cpp.html
index 66d596b8a..fe8689659 100644
--- a/d3/dfe/perimeter_8cpp.html
+++ b/d3/dfe/perimeter_8cpp.html
@@ -121,7 +121,7 @@ Include dependency graph for perimeter.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d4/d38/power__of__two_8cpp.html b/d4/d38/power__of__two_8cpp.html
index 122ef8cd5..88ea0ecfb 100644
--- a/d4/d38/power__of__two_8cpp.html
+++ b/d4/d38/power__of__two_8cpp.html
@@ -118,7 +118,7 @@ Include dependency graph for power_of_two.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d4/d9d/sum__of__binomial__coefficient_8cpp.html b/d4/d9d/sum__of__binomial__coefficient_8cpp.html
index c7e86019d..eaecd3e75 100644
--- a/d4/d9d/sum__of__binomial__coefficient_8cpp.html
+++ b/d4/d9d/sum__of__binomial__coefficient_8cpp.html
@@ -118,7 +118,7 @@ Include dependency graph for sum_of_binomial_coefficient.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d5/d7a/largest__power_8cpp.html b/d5/d7a/largest__power_8cpp.html
index a6d208b10..a15ec5c14 100644
--- a/d5/d7a/largest__power_8cpp.html
+++ b/d5/d7a/largest__power_8cpp.html
@@ -118,7 +118,7 @@ Include dependency graph for largest_power.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d5/d83/lcm__sum_8cpp.html b/d5/d83/lcm__sum_8cpp.html
index 29eb1eaf7..b6c727d66 100644
--- a/d5/d83/lcm__sum_8cpp.html
+++ b/d5/d83/lcm__sum_8cpp.html
@@ -120,7 +120,7 @@ Include dependency graph for lcm_sum.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/d8/db1/binomial__calculate_8cpp.html b/d8/db1/binomial__calculate_8cpp.html
index 59a06ca06..738a769d4 100644
--- a/d8/db1/binomial__calculate_8cpp.html
+++ b/d8/db1/binomial__calculate_8cpp.html
@@ -120,7 +120,7 @@ Include dependency graph for binomial_calculate.cpp:
Namespaces | for IO operations | | namespace | binomial | Namespaces | for IO operations | | | |||||||||||||||||
diff --git a/da/d39/volume_8cpp.html b/da/d39/volume_8cpp.html
index 9fa9206ed..2eb9518f1 100644
--- a/da/d39/volume_8cpp.html
+++ b/da/d39/volume_8cpp.html
@@ -120,7 +120,7 @@ Include dependency graph for volume.cpp:
Namespaces | for IO operations | | | ||||||||
diff --git a/db/d27/n__bonacci_8cpp.html b/db/d27/n__bonacci_8cpp.html
index 022b0e24e..16b4c017e 100644
--- a/db/d27/n__bonacci_8cpp.html
+++ b/db/d27/n__bonacci_8cpp.html
@@ -120,7 +120,7 @@ Include dependency graph for n_bonacci.cpp:
Namespaces | for IO operations | | namespace | n_bonacci | Namespaces | for IO operations | | namespace | monte_carlo | Namespaces | for IO operations | | | ||||||||||||||||||||||||||
diff --git a/dd/d47/namespacemath.html b/dd/d47/namespacemath.html
index ea1c359b6..d87e66372 100644
--- a/dd/d47/namespacemath.html
+++ b/dd/d47/namespacemath.html
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('dd/d47/namespacemath.html','../../');
for std::rand + for IO operations More...
Detailed Description-for std::rand +for IO operations for io operations Evaluate recurrence relation using matrix exponentiation. for assert Math algorithms. for std::vector -for IO operations for M_PI definition and pow() +for std::rand +for assert +Mathematical algorithms for IO operations for std::vector Mathematical algorithms for assert for uint16_t datatype for IO operations @@ -263,8 +267,6 @@ AlgorithmThis problem can be solved using matrix exponentiation method.
Mathematical algorithms -for assert -Mathematical algorithms for std::is_equal, std::swap for assert for IO operations Mathematical algorithms for assert for io operations @@ -276,6 +278,46 @@ Algorithmfor assert for std::pow for std::uint32_t Mathematical algorithms Function Documentation+ +◆ aliquot_sum()+ +
+
+
+
+Function to return the aliquot sum of a number
26 {
+ 27 if (num == 0 || num == 1) {
+ 28 return 0; // The aliquot sum for 0 and 1 is 0
+ 29 }
+ 30
+ 31 uint64_t sum = 0;
+ 32
+ 33 for (uint64_t i = 1; i <= num / 2; i++) {
+ 34 if (num % i == 0) {
+ 35 sum += i;
+ 36 }
+ 37 }
+ 38
+
+ 40}
+T sum(const std::vector< std::valarray< T > > &A) Definition: vector_ops.hpp:232 ◆ approximate_pi()diff --git a/dd/d47/namespacemath.js b/dd/d47/namespacemath.js index 818c4a47b..4e1cb5bab 100644 --- a/dd/d47/namespacemath.js +++ b/dd/d47/namespacemath.js @@ -1,6 +1,7 @@ var namespacemath = [ [ "Point", "de/d4f/structmath_1_1_point.html", null ], + [ "aliquot_sum", "dd/d47/namespacemath.html#ab37f3a7302a84179aae682c79d8390bf", null ], [ "approximate_pi", "dd/d47/namespacemath.html#abf7f2a6d91f1ca6c89698792aea3f188", null ], [ "binomialCoeffSum", "dd/d47/namespacemath.html#ae1ca505751f5a6d3977b86372cfe75ea", null ], [ "circle_area", "dd/d47/namespacemath.html#a40e36c67da78d2131408c57ee091ad75", null ], diff --git a/de/d99/aliquot__sum_8cpp.html b/de/d99/aliquot__sum_8cpp.html new file mode 100644 index 000000000..20aefeb8a --- /dev/null +++ b/de/d99/aliquot__sum_8cpp.html @@ -0,0 +1,231 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/de/d99/aliquot__sum_8cpp.js b/de/d99/aliquot__sum_8cpp.js
new file mode 100644
index 000000000..7afbab398
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp.js
@@ -0,0 +1,6 @@
+var aliquot__sum_8cpp =
+[
+ [ "aliquot_sum", "de/d99/aliquot__sum_8cpp.html#ab37f3a7302a84179aae682c79d8390bf", null ],
+ [ "main", "de/d99/aliquot__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "test", "de/d99/aliquot__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
+];
\ No newline at end of file
diff --git a/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
new file mode 100644
index 000000000..3f023c061
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
@@ -0,0 +1,4 @@
+
diff --git a/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5 b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
new file mode 100644
index 000000000..772082458
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
@@ -0,0 +1 @@
+cd7f06e1a3a183a6a266a69596982a8e
\ No newline at end of file
diff --git a/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
new file mode 100644
index 000000000..90283a8c2
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
@@ -0,0 +1,36 @@
+
+
+
+
+
diff --git a/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..2f5dbf3b9
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,5 @@
+
diff --git a/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..8cb80d70e
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+d6eb87ed98ed35ec031681a9347d42b0
\ No newline at end of file
diff --git a/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..f1bb56cca
--- /dev/null
+++ b/de/d99/aliquot__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,51 @@
+
+
+
+
+
diff --git a/de/dab/ncr__modulo__p_8cpp.html b/de/dab/ncr__modulo__p_8cpp.html
index 642d837e0..f7d596e0c 100644
--- a/de/dab/ncr__modulo__p_8cpp.html
+++ b/de/dab/ncr__modulo__p_8cpp.html
@@ -126,7 +126,7 @@ Classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+Loading...
+Searching...
+No Matches
+
+
+
+Namespaces |
+Functions
+ aliquot_sum.cpp File Reference
+
+
+Program to return the Aliquot Sum of a number. +More... +#include <cassert>+ #include <iostream>+
+Include dependency graph for aliquot_sum.cpp:
+
+
+
+
+
Detailed Description+Program to return the Aliquot Sum of a number. +The Aliquot sum s(n) of a non-negative integer n is the sum of all proper divisors of n, that is, all the divisors of n, other than itself. For example, the Aliquot sum of 18 = 1 + 2 + 3 + 6 + 9 = 21 + +Function Documentation+ +◆ main()+ +
+
+
+
+
+
◆ test()+ +
+
+
+
+
+
+Self-test implementations. +
47 {
+ 48 // Aliquot sum of 10 is 1 + 2 + 5 = 8
+ 49 assert(math::aliquot_sum(10) == 8);
+ 50 // Aliquot sum of 15 is 1 + 3 + 5 = 9
+ 51 assert(math::aliquot_sum(15) == 9);
+ 52 // Aliquot sum of 1 is 0
+ 53 assert(math::aliquot_sum(1) == 0);
+ 54 // Aliquot sum of 97 is 1 (the aliquot sum of a prime number is 1)
+ 55 assert(math::aliquot_sum(97) == 1);
+ 56
+
+ 58}
+
+
+
+Here is the call graph for this function:
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Namespaces | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | math | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for std::rand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for IO operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | ncr_modulo_p | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions for nCr modulo p implementation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Namespaces | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | math | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for std::rand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for IO operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | fibonacci_sum | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions for the sum of the Fibonacci Sequence: \(\mathrm{F}(n) + diff --git a/df/d66/vector__cross__product_8cpp.html b/df/d66/vector__cross__product_8cpp.html index d1afef9d1..227f2aab9 100644 --- a/df/d66/vector__cross__product_8cpp.html +++ b/df/d66/vector__cross__product_8cpp.html @@ -120,7 +120,7 @@ Include dependency graph for vector_cross_product.cpp: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Namespaces | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | math | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for std::rand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for IO operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | vector_cross | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions for Vector Cross Product algorithms. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Namespaces | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | math | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for std::rand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for IO operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace | modular_division | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions for Modular Division implementation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Files | |
| file | aliquot_sum.cpp |
| Program to return the Aliquot Sum of a number. | |
| file | approximate_pi.cpp |
| Implementation to calculate an estimate of the number π (Pi). | |
| ► math | |
| ► numerical_methods | |
| Nmagic_sequence | Functions for the Magic sequence implementation |
| Nmanacher | Functions for Manacher's Algorithm implementation |
| ►Nmath | For std::rand |
| ►Nmath | For IO operations |
| NMD5 | Functions for the MD5 algorithm implementation |
| Nmedian_search | Functions for Median search algorithm |