diff --git a/annotated.html b/annotated.html index 97f17220d..133de6dbd 100644 --- a/annotated.html +++ b/annotated.html @@ -149,9 +149,10 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
-|
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+ |
+
Implementation to calculate an estimate of the number π (Pi). +More...
+#include <iostream>#include <vector>#include <cstdlib>+Classes | |
| struct | math::Point |
+Namespaces | |
| namespace | math |
| for std::rand | |
+Functions | |
| double | math::approximate_pi (const std::vector< Point > &pts) |
| static void | test () |
| Self-test implementations. More... | |
| int | main (int argc, char *argv[]) |
| Main function. More... | |
Implementation to calculate an estimate of the number π (Pi).
+We take a random point P with coordinates (x, y) such that 0 ≤ x ≤ 1 and 0 ≤ y ≤ 1. If x² + y² ≤ 1, then the point is inside the quarter disk of radius 1, otherwise the point is outside. We know that the probability of the point being inside the quarter disk is equal to π/4 double approx(vector<Point> &pts) which will use the points pts (drawn at random) to return an estimate of the number π
| int main | +( | +int | +argc, | +
| + | + | char * | +argv[] | +
| + | ) | ++ |
Main function.
+| argc | commandline argument count (ignored) |
| argv | commandline array of arguments (ignored) |
+
|
+ +static | +
Self-test implementations.
+
diff --git a/d1/dbb/n__choose__r_8cpp.html b/d1/dbb/n__choose__r_8cpp.html
index 834011c20..75b6f7fa3 100644
--- a/d1/dbb/n__choose__r_8cpp.html
+++ b/d1/dbb/n__choose__r_8cpp.html
@@ -111,7 +111,7 @@ Include dependency graph for n_choose_r.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d1/de9/integral__approximation_8cpp.html b/d1/de9/integral__approximation_8cpp.html
index 773fb46dc..3a92a6d04 100644
--- a/d1/de9/integral__approximation_8cpp.html
+++ b/d1/de9/integral__approximation_8cpp.html
@@ -113,7 +113,7 @@ Include dependency graph for integral_approximation.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d2/d27/approximate__pi_8cpp__incl.map b/d2/d27/approximate__pi_8cpp__incl.map
new file mode 100644
index 000000000..73571caf9
--- /dev/null
+++ b/d2/d27/approximate__pi_8cpp__incl.map
@@ -0,0 +1,6 @@
+
diff --git a/d2/d27/approximate__pi_8cpp__incl.md5 b/d2/d27/approximate__pi_8cpp__incl.md5
new file mode 100644
index 000000000..07d104f7e
--- /dev/null
+++ b/d2/d27/approximate__pi_8cpp__incl.md5
@@ -0,0 +1 @@
+fb66de3f656eaa5d91ce6ae87847c2a0
\ No newline at end of file
diff --git a/d2/d27/approximate__pi_8cpp__incl.svg b/d2/d27/approximate__pi_8cpp__incl.svg
new file mode 100644
index 000000000..a016d60e3
--- /dev/null
+++ b/d2/d27/approximate__pi_8cpp__incl.svg
@@ -0,0 +1,67 @@
+
+
+
+
+
diff --git a/d4/d38/power__of__two_8cpp.html b/d4/d38/power__of__two_8cpp.html
index d38683be6..ff2b58d95 100644
--- a/d4/d38/power__of__two_8cpp.html
+++ b/d4/d38/power__of__two_8cpp.html
@@ -110,7 +110,7 @@ Include dependency graph for power_of_two.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d4/d9d/sum__of__binomial__coefficient_8cpp.html b/d4/d9d/sum__of__binomial__coefficient_8cpp.html
index 01b0d6130..cf411d076 100644
--- a/d4/d9d/sum__of__binomial__coefficient_8cpp.html
+++ b/d4/d9d/sum__of__binomial__coefficient_8cpp.html
@@ -111,7 +111,7 @@ Include dependency graph for sum_of_binomial_coefficient.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d5/d7a/largest__power_8cpp.html b/d5/d7a/largest__power_8cpp.html
index b034cd90f..2f2910bbe 100644
--- a/d5/d7a/largest__power_8cpp.html
+++ b/d5/d7a/largest__power_8cpp.html
@@ -111,7 +111,7 @@ Include dependency graph for largest_power.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d5/d83/lcm__sum_8cpp.html b/d5/d83/lcm__sum_8cpp.html
index fc0021b0f..f78f4d481 100644
--- a/d5/d83/lcm__sum_8cpp.html
+++ b/d5/d83/lcm__sum_8cpp.html
@@ -112,7 +112,7 @@ Include dependency graph for lcm_sum.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/d8/db1/binomial__calculate_8cpp.html b/d8/db1/binomial__calculate_8cpp.html
index c4d6d35ff..5bd603215 100644
--- a/d8/db1/binomial__calculate_8cpp.html
+++ b/d8/db1/binomial__calculate_8cpp.html
@@ -113,7 +113,7 @@ Include dependency graph for binomial_calculate.cpp:
Namespaces | for std::rand | | namespace | binomial | Namespaces | for std::rand | | | |||||||||||||||||
diff --git a/da/d39/volume_8cpp.html b/da/d39/volume_8cpp.html
index c7f1b00eb..4cc523e3f 100644
--- a/da/d39/volume_8cpp.html
+++ b/da/d39/volume_8cpp.html
@@ -113,7 +113,7 @@ Include dependency graph for volume.cpp:
Namespaces | for std::rand | | | ||||||||
diff --git a/db/d27/n__bonacci_8cpp.html b/db/d27/n__bonacci_8cpp.html
index 558f46303..7d9f667ce 100644
--- a/db/d27/n__bonacci_8cpp.html
+++ b/db/d27/n__bonacci_8cpp.html
@@ -113,7 +113,7 @@ Include dependency graph for n_bonacci.cpp:
Namespaces | for std::rand | | namespace | n_bonacci | Namespaces | for std::rand | | namespace | monte_carlo | Namespaces | for std::rand | | | ||||||||||||||||||||||||||