diff --git a/d0/d01/smallest__circle_8cpp.html b/d0/d01/smallest__circle_8cpp.html
index 5238f5e29..b84af5d4b 100644
--- a/d0/d01/smallest__circle_8cpp.html
+++ b/d0/d01/smallest__circle_8cpp.html
@@ -172,28 +172,28 @@ The function returns the radius of the circle and prints the coordinated of the
97 for (
size_t j = i + 1; j < P.
size (); j++)
- 99 for (
size_t k = j + 1; k < P.
size (); k++) {
+ 99 for (
size_t k = j + 1;
k < P.
size ();
k ++) {
103 C.x = -0.5 * ((P[i].y * (P[j].x * P[j].x + P[j].y * P[j].y -
- 104 P[k].x * P[k].x - P[k].y * P[k].y) +
+ 104 P[
k ].x * P[
k ].x - P[
k ].y * P[
k ].y) +
105 P[j].y * (P[k].x * P[k].x + P[k].y * P[k].y -
106 P[i].x * P[i].x - P[i].y * P[i].y) +
- 107 P[k].y * (P[i].x * P[i].x + P[i].y * P[i].y -
+ 107 P[
k ].y * (P[i].x * P[i].x + P[i].y * P[i].y -
108 P[j].x * P[j].x - P[j].y * P[j].y)) /
- 109 (P[i].x * (P[j].y - P[k].y) +
+ 109 (P[i].x * (P[j].y - P[
k ].y) +
110 P[j].x * (P[k].y - P[i].y) +
- 111 P[k].x * (P[i].y - P[j].y)));
+ 111 P[
k ].x * (P[i].y - P[j].y)));
112 C.
y = 0.5 * ((P[i].x * (P[j].x * P[j].x + P[j].y * P[j].y -
- 113 P[k].x * P[k].x - P[k].y * P[k].y) +
+ 113 P[
k ].x * P[
k ].x - P[
k ].y * P[
k ].y) +
114 P[j].x * (P[k].x * P[k].x + P[k].y * P[k].y -
115 P[i].x * P[i].x - P[i].y * P[i].y) +
- 116 P[k].x * (P[i].x * P[i].x + P[i].y * P[i].y -
+ 116 P[
k ].x * (P[i].x * P[i].x + P[i].y * P[i].y -
117 P[j].x * P[j].x - P[j].y * P[j].y)) /
- 118 (P[i].x * (P[j].y - P[k].y) +
+ 118 (P[i].x * (P[j].y - P[
k ].y) +
119 P[j].x * (P[k].y - P[i].y) +
- 120 P[k].x * (P[i].y - P[j].y)));
+ 120 P[
k ].x * (P[i].y - P[j].y)));
@@ -227,6 +227,7 @@ The function returns the radius of the circle and prints the coordinated of the
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
double LenghtLine(const Point &A, const Point &B)
Definition: smallest_circle.cpp:37
double TriangleArea(const Point &A, const Point &B, const Point &C)
Definition: smallest_circle.cpp:54
diff --git a/d0/d5a/skip__list_8cpp.html b/d0/d5a/skip__list_8cpp.html
index 37206c2f7..ddec41486 100644
--- a/d0/d5a/skip__list_8cpp.html
+++ b/d0/d5a/skip__list_8cpp.html
@@ -172,7 +172,7 @@ constexpr float data_struc
-
+
@@ -183,6 +183,7 @@ constexpr float data_struc
Definition: skip_list.cpp:55
void insertElement(int key, void *value)
Definition: skip_list.cpp:90
void displayList()
Definition: skip_list.cpp:191
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
constexpr int MAX_LEVEL
Maximum level of skip list.
Definition: skip_list.cpp:27
diff --git a/d1/d2a/knight__tour_8cpp.html b/d1/d2a/knight__tour_8cpp.html
index 94504d298..bf2c4e91f 100644
--- a/d1/d2a/knight__tour_8cpp.html
+++ b/d1/d2a/knight__tour_8cpp.html
@@ -322,15 +322,15 @@ template<size_t V>
false if solution does not exist
-
59 int k = 0, xnext = 0, ynext = 0;
+
59 int k = 0, xnext = 0, ynext = 0;
-
65 for (k = 0; k < V; k++) {
-
-
+
65 for (k = 0;
k < V;
k ++) {
+
+
69 if (issafe<V>(xnext, ynext, sol)) {
70 sol[xnext][ynext] =
mov ;
@@ -344,6 +344,7 @@ template<size_t V>
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
void mov(tower *From, tower *To)
Definition: tower_of_hanoi.cpp:39
diff --git a/d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html b/d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html
index e9a065578..8c14bb6f7 100644
--- a/d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html
+++ b/d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html
@@ -394,9 +394,9 @@ template<typename X >
-
+
122 if (
t_par [u][k - 1] != -1) {
-
+
@@ -407,6 +407,7 @@ template<typename X >
void dfs_lca(int u, int p=-1)
Utility function to populate the t_par vector.
Definition: heavy_light_decomposition.cpp:116
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
@@ -636,10 +637,10 @@ template<typename X >
- 240 for (
int k =
t_maxlift - 1; k >= 0; k--) {
+
-
-
+
+
@@ -699,12 +700,12 @@ template<typename X >
Returns void
-
+
-
+
diff --git a/d1/d9a/hopcroft__karp_8cpp.html b/d1/d9a/hopcroft__karp_8cpp.html
index e693bb6e4..0b49e8400 100644
--- a/d1/d9a/hopcroft__karp_8cpp.html
+++ b/d1/d9a/hopcroft__karp_8cpp.html
@@ -180,15 +180,15 @@ Algorithm
310 int v1 = 0, v2 = 0, e = 0;
-
+
314 for (
int i = 0; i < e; ++i)
-
+
-
320 int res = g.hopcroftKarpAlgorithm();
+
320 int res =
g .hopcroftKarpAlgorithm();
321 std::cout <<
"Maximum matching is " << res <<
"\n" ;
@@ -198,10 +198,11 @@ Algorithm
Represents Bipartite graph for Hopcroft Karp implementation.
Definition: hopcroft_karp.cpp:67
void tests()
Definition: hopcroft_karp.cpp:255
+
double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
-
diff --git a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index 7734b1ff4..102449f77 100644
--- a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,8 +1,8 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index b64f3d36c..508e0c48e 100644
--- a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-3cd89b90428da094b5ee440de29552e9
\ No newline at end of file
+19b475d234b3dd9cae5b1d90d5b1089f
\ No newline at end of file
diff --git a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index 5d1810a40..a0327d4a6 100644
--- a/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/d1/d9a/hopcroft__karp_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,11 +4,11 @@
-
-
+
+
main
-
+
Node1
@@ -21,96 +21,84 @@
Node2
-
-
-graph::HKGraph::addEdge
+
+
+tests
Node1->Node2
-
-
+
+
Node3
-
+
+
+graph::HKGraph::addEdge
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node4
+
graph::HKGraph::hopcroft
KarpAlgorithm
-
-
-Node1->Node3
-
-
+
+
+Node2->Node4
+
+
-
-
-Node6
-
-
-tests
-
-
-
-
-
-Node1->Node6
-
-
-
-
-
-Node4
-
+
+
+Node5
+
graph::HKGraph::bfs
-
-
-Node3->Node4
+
+
+Node4->Node5
-
-
-Node5
-
+
+
+Node6
+
graph::HKGraph::dfs
-
-
-Node3->Node5
+
+
+Node4->Node6
-
-
-Node5->Node5
+
+
+Node6->Node6
-
-
-Node6->Node2
-
-
-
-
-
-Node6->Node3
-
-
-
diff --git a/d1/da6/rungekutta_8cpp.html b/d1/da6/rungekutta_8cpp.html
index 7ad7420c2..1e2d248ae 100644
--- a/d1/da6/rungekutta_8cpp.html
+++ b/d1/da6/rungekutta_8cpp.html
@@ -283,7 +283,7 @@ Here is the call graph for this function:
67 auto n =
static_cast< uint64_t
> ((x - init_x) /
h );
-
+
@@ -291,10 +291,10 @@ Here is the call graph for this function:
74 for (
int i = 1; i <= n; ++i) {
-
- 78 k[1] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[0]);
- 79 k[2] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[1]);
- 80 k[3] =
h *
change (init_x +
h , y + k[2]);
+
+ 78 k [1] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[0]);
+ 79 k [2] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[1]);
+
@@ -308,6 +308,7 @@ Here is the call graph for this function:
int h(int key)
Definition: hash_search.cpp:45
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
static double change(double x, double y)
for using the vector container
Definition: rungekutta.cpp:33
-
32 return (l->freq > r->freq);
+
32 return (
l ->freq > r->freq);
+
double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/d1/de0/namespacenumerical__methods.html b/d1/de0/namespacenumerical__methods.html
index 8b6f82311..39a6de3d2 100644
--- a/d1/de0/namespacenumerical__methods.html
+++ b/d1/de0/namespacenumerical__methods.html
@@ -99,8 +99,11 @@ $(document).ready(function(){initNavTree('d1/de0/namespacenumerical__methods.htm
for io operations
Numerical Methods.
+
for std::map container
for math operations
-
Numerical methods
+
Numerical methods
+
for assert for math functions for integer allocation for std::atof for std::function for IO operations
+
Numerical algorithms/methods
diff --git a/d2/d05/class_min_heap.html b/d2/d05/class_min_heap.html
index 42340aa75..0eb53aa47 100644
--- a/d2/d05/class_min_heap.html
+++ b/d2/d05/class_min_heap.html
@@ -369,7 +369,7 @@ Here is the call graph for this function:
-
+
67 while (i != 0 &&
harr [parent(i)] >
harr [i]) {
@@ -378,6 +378,7 @@ Here is the call graph for this function:
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
@@ -433,11 +434,11 @@ Here is the call graph for this function:
to heapify a subtree with the root at given index
A recursive method to heapify a subtree with the root at given index This method assumes that the subtrees are already heapified
-
+
-
+
@@ -447,6 +448,7 @@ Here is the call graph for this function:
int left(int i)
Definition: binaryheap.cpp:31
int right(int i)
Definition: binaryheap.cpp:34
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/d2/d26/count__inversions_8cpp.html b/d2/d26/count__inversions_8cpp.html
index db51edf0d..5acbf87e5 100644
--- a/d2/d26/count__inversions_8cpp.html
+++ b/d2/d26/count__inversions_8cpp.html
@@ -316,14 +316,14 @@ template<typename T >
-
+
89 uint32_t inv_count = 0;
91 while ((i <= mid) && (j <= right)) {
92 if (arr[i] <= arr[j]) {
-
+
-
+
@@ -331,18 +331,19 @@ template<typename T >
- 103 temp[k++] = arr[i++];
+ 103 temp[
k ++] = arr[i++];
- 106 temp[k++] = arr[j++];
+ 106 temp[
k ++] = arr[j++];
- 109 for (k = left; k <=
right ; k++) {
-
+ 109 for (k = left;
k <=
right ;
k ++) {
+
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/d2/d3b/namespaceqr__algorithm.html b/d2/d3b/namespaceqr__algorithm.html
index 2d849a274..bc4c191b0 100644
--- a/d2/d3b/namespaceqr__algorithm.html
+++ b/d2/d3b/namespaceqr__algorithm.html
@@ -458,14 +458,15 @@ template<typename T >
- 200 for (
int k = i; k < COLUMNS; k++) {
+ 200 for (
int k = i;
k < COLUMNS;
k ++) {
201 for (
int kk = 0; kk < ROWS; kk++) {
- 202 col_vector2[kk] = A[kk][k];
+ 202 col_vector2[kk] = A[kk][
k ];
- 204 R[0][i][k] = (col_vector * col_vector2).
sum ();
+ 204 R[0][i][
k ] = (col_vector * col_vector2).
sum ();
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
T sum(const std::vector< std::valarray< T > > &A)
Definition: vector_ops.hpp:232
std::valarray< T > vector_proj(const std::valarray< T > &a, const std::valarray< T > &b)
Definition: qr_decompose.h:104
double vector_mag(const std::valarray< T > &a)
Definition: qr_decompose.h:92
diff --git a/d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html b/d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html
index 685a5f071..b1b312c09 100644
--- a/d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html
+++ b/d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html
@@ -300,10 +300,10 @@ template<typename X >
-
+
-
+
@@ -318,6 +318,7 @@ template<typename X >
X sret_init
inital query return value
Definition: heavy_light_decomposition.cpp:264
std::vector< int > t_depth
a vector to store the depth of a node,
Definition: heavy_light_decomposition.cpp:88
std::vector< std::vector< int > > t_par
a matrix to store every node's 2^kth parent
Definition: heavy_light_decomposition.cpp:87
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/d3/d40/graph__coloring_8cpp.html b/d3/d40/graph__coloring_8cpp.html
index 0f92004f0..bc42f9180 100644
--- a/d3/d40/graph__coloring_8cpp.html
+++ b/d3/d40/graph__coloring_8cpp.html
@@ -326,7 +326,7 @@ Here is the call graph for this function:
Main function.
Returns 0 on exit
Driver Code
-Examples /Users/runner/work/C-Plus-Plus/C-Plus-Plus/numerical_methods/rungekutta.cpp , and /Users/runner/work/C-Plus-Plus/C-Plus-Plus/sorting/wiggle_sort.cpp .
+Examples /Users/runner/work/C-Plus-Plus/C-Plus-Plus/numerical_methods/rungekutta.cpp , and /Users/runner/work/C-Plus-Plus/C-Plus-Plus/sorting/wiggle_sort.cpp .
diff --git a/d3/dfe/horspool_8cpp.html b/d3/dfe/horspool_8cpp.html
index 648a0c482..de39bcda5 100644
--- a/d3/dfe/horspool_8cpp.html
+++ b/d3/dfe/horspool_8cpp.html
@@ -240,13 +240,13 @@ false if text string does not contain prototype string
66 while (i < text.
size ()) {
-
+
70 for (
int z =
static_cast< int > (prototype.
size () - 1); z >= 0 && flag;
72 if (text[j] == prototype[z]) {
-
+
@@ -267,6 +267,7 @@ false if text string does not contain prototype string
std::unordered_map< char, int > findShiftTable(const std::string &prototype)
Definition: horspool.cpp:26
+
double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/d4/def/kohonen__som__topology_8cpp.html b/d4/def/kohonen__som__topology_8cpp.html
index d5b95cac5..72f06feb2 100644
--- a/d4/def/kohonen__som__topology_8cpp.html
+++ b/d4/def/kohonen__som__topology_8cpp.html
@@ -317,14 +317,14 @@ Here is the call graph for this function:
- 382 for (
int k = 0; k < num_out; k++) {
-
+ 382 for (
int k = 0;
k < num_out;
k ++) {
+
387 for (j = 0; j < features; j++) {
-
+
@@ -341,6 +341,7 @@ Here is the call graph for this function:
double _random(double a, double b)
Definition: kohonen_som_topology.cpp:53
void test_2d_classes(std::vector< std::valarray< double > > *data)
Definition: kohonen_som_topology.cpp:330
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
int save_u_matrix(const char *fname, const std::vector< std::vector< std::valarray< double > > > &W)
Definition: kohonen_som_topology.cpp:142
void kohonen_som(const std::vector< std::valarray< double > > &X, std::vector< std::vector< std::valarray< double > > > *W, double alpha_min)
Definition: kohonen_som_topology.cpp:269
@@ -386,14 +387,14 @@ Here is the call graph for this function:
- 464 for (
int k = 0; k < num_out; k++) {
-
+ 464 for (
int k = 0;
k < num_out;
k ++) {
+
469 for (j = 0; j < features; j++) {
-
+
@@ -447,14 +448,14 @@ Here is the call graph for this function:
- 550 for (
int k = 0; k < num_out; k++) {
-
+ 550 for (
int k = 0;
k < num_out;
k ++) {
+
555 for (j = 0; j < features; j++) {
-
+
diff --git a/d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html b/d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html
index 12fc68cae..36babd947 100644
--- a/d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html
+++ b/d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html
@@ -446,13 +446,14 @@ Here is the call graph for this function:
293 for (
const auto &l :
layers ) {
- 294 current_pass =
multiply (current_pass, l.kernel);
- 295 current_pass =
apply_function (current_pass, l.activation_function);
+ 294 current_pass =
multiply (current_pass,
l .kernel);
+
T emplace_back(T... args)
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
std::vector< std::valarray< T > > multiply(const std::vector< std::valarray< T > > &A, const std::vector< std::valarray< T > > &B)
Definition: vector_ops.hpp:460
std::vector< std::valarray< T > > apply_function(const std::vector< std::valarray< T > > &A, T(*func)(const T &))
Definition: vector_ops.hpp:329
diff --git a/d5/d33/gram__schmidt_8cpp.html b/d5/d33/gram__schmidt_8cpp.html
index 27caa6c33..41779abf9 100644
--- a/d5/d33/gram__schmidt_8cpp.html
+++ b/d5/d33/gram__schmidt_8cpp.html
@@ -321,7 +321,7 @@ Here is the call graph for this function:
-
+
@@ -336,7 +336,7 @@ Here is the call graph for this function:
143 all_projection[i] = 0;
-
+
@@ -344,7 +344,7 @@ Here is the call graph for this function:
153 for (
int i = 0; i < c; ++i) {
- 154 temp[i] = B[l - 1][i] * factor;
+ 154 temp[i] = B[
l - 1][i] * factor;
156 for (
int j = 0; j < c; ++j) {
@@ -352,21 +352,23 @@ Here is the call graph for this function:
-
+
164 for (
int i = 0; i < c; ++i) {
-
-
+
+
-
+
double projection(const std::array< double, 10 > &x, const std::array< double, 10 > &y, const int &c)
Definition: gram_schmidt.cpp:79
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/d5/d4c/group__sorting.html b/d5/d4c/group__sorting.html
index 1c725a45f..f38c7502e 100644
--- a/d5/d4c/group__sorting.html
+++ b/d5/d4c/group__sorting.html
@@ -415,12 +415,13 @@ template<typename T >
-
+
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/d5/d88/md__d_i_r_e_c_t_o_r_y.html b/d5/d88/md__d_i_r_e_c_t_o_r_y.html
index ca3c8f45a..6972e721a 100644
--- a/d5/d88/md__d_i_r_e_c_t_o_r_y.html
+++ b/d5/d88/md__d_i_r_e_c_t_o_r_y.html
@@ -355,6 +355,7 @@ Numerical Methods
Golden Search Extrema
Lu Decompose
Lu Decomposition
+Midpoint Integral Method
Newton Raphson Method
Ode Forward Euler
Ode Midpoint Euler
diff --git a/d5/d96/md5_8cpp.html b/d5/d96/md5_8cpp.html
index 4c37940ad..d0745bf06 100644
--- a/d5/d96/md5_8cpp.html
+++ b/d5/d96/md5_8cpp.html
@@ -348,19 +348,19 @@ Here is the call graph for this function:
237 for (uint8_t i = 0; i < 64; i++) {
- 238 uint32_t F = 0, g = 0;
+ 238 uint32_t F = 0,
g = 0;
240 F = (B & C) | ((~B) & D);
-
+
243 F = (D & B) | ((~D) & C);
- 244 g = (5 * i + 1) % 16;
+ 244 g = (5 * i + 1) % 16;
- 247 g = (3 * i + 5) % 16;
+ 247 g = (3 * i + 5) % 16;
-
+
@@ -397,6 +397,7 @@ Here is the call graph for this function:
uint32_t toLittleEndian32(uint32_t n)
Sets 32-bit integer to little-endian if needed.
Definition: md5.cpp:89
uint64_t toLittleEndian64(uint64_t n)
Sets 64-bit integer to little-endian if needed.
Definition: md5.cpp:102
uint32_t leftRotate32bits(uint32_t n, std::size_t rotate)
Rotates the bits of a 32-bit unsigned integer.
Definition: md5.cpp:66
+double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
diff --git a/d5/def/stairs__pattern_8cpp.html b/d5/def/stairs__pattern_8cpp.html
index 428569d87..7e431b9b5 100644
--- a/d5/def/stairs__pattern_8cpp.html
+++ b/d5/def/stairs__pattern_8cpp.html
@@ -140,7 +140,7 @@ Functions
main function
-
18 int l, st = 2, x, r, z, n, sp;
+
18 int l , st = 2, x, r, z, n, sp;
@@ -150,7 +150,7 @@ Functions
25 for (sp = 1; sp <= z; sp++) {
-
28 for (l = 1; l <= st; l++) {
+
28 for (l = 1;
l <= st;
l ++) {
@@ -161,6 +161,7 @@ Functions
+
double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/d6/d7a/golden__search__extrema_8cpp.html b/d6/d7a/golden__search__extrema_8cpp.html
index d1d029c26..8cabbb498 100644
--- a/d6/d7a/golden__search__extrema_8cpp.html
+++ b/d6/d7a/golden__search__extrema_8cpp.html
@@ -215,7 +215,7 @@ Functions
-
+
@@ -235,6 +235,7 @@ Functions
#define EPSILON
solution accuracy limit
Definition: golden_search_extrema.cpp:17
+
double f(double x)
A function f(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:90
@params[in] the numbers 'a' and 'm' from above equation
Returns the modular inverse of a
-
+
@@ -292,6 +292,7 @@ Here is the call graph for this function:
+
double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
diff --git a/d8/d72/class_r_btree.html b/d8/d72/class_r_btree.html
index 5159572be..6fde7d549 100644
--- a/d8/d72/class_r_btree.html
+++ b/d8/d72/class_r_btree.html
@@ -521,18 +521,18 @@ Private Attributes
78 while (t->parent != NULL && t->parent->color ==
'r' )
-
80 node *g = t->parent->parent;
-
81 if (g->left == t->parent)
+
80 node *
g = t->parent->parent;
+
81 if (
g ->left == t->parent)
-
+
-
+
88 t->parent->color =
'b' ;
-
-
+
+
@@ -543,21 +543,21 @@ Private Attributes
101 t->parent->color =
'b' ;
-
+
-
+
-
+
113 t->parent->color =
'b' ;
-
-
+
+
@@ -568,13 +568,14 @@ Private Attributes
126 t->parent->color =
'b' ;
-
+
+
double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
diff --git a/d8/d7a/sha1_8cpp.html b/d8/d7a/sha1_8cpp.html
index 9639a6151..005b9e710 100644
--- a/d8/d7a/sha1_8cpp.html
+++ b/d8/d7a/sha1_8cpp.html
@@ -304,23 +304,23 @@ Here is the call graph for this function:
158 for (uint8_t i = 0; i < 80; i++) {
- 159 uint32_t F = 0, g = 0;
+ 159 uint32_t F = 0,
g = 0;
161 F = (b & c) | ((~b) & d);
-
+
-
+
167 F = (b & c) | (b & d) | (c & d);
-
+
-
+
-
+
@@ -352,6 +352,7 @@ Here is the call graph for this function:
uint32_t leftRotate32bits(uint32_t n, std::size_t rotate)
Rotates the bits of a 32-bit unsigned integer.
Definition: md5.cpp:66
+double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
diff --git a/d8/db1/binomial__calculate_8cpp.html b/d8/db1/binomial__calculate_8cpp.html
index 7e73f91a2..a6c52eb16 100644
--- a/d8/db1/binomial__calculate_8cpp.html
+++ b/d8/db1/binomial__calculate_8cpp.html
@@ -173,21 +173,22 @@ Functions
-
+
-
42 for (int32_t i = 1; i <= k; ++i) {
-
+
42 for (int32_t i = 1; i <=
k ; ++i) {
+
uint64_t result(uint64_t n)
Definition: fibonacci_sum.cpp:76
+
double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
@@ -241,7 +242,7 @@ Here is the call graph for this function:
87 int32_t n =
atoi (argv[1]);
- 88 int32_t k =
atoi (argv[2]);
+ 88 int32_t
k =
atoi (argv[2]);
diff --git a/d9/d69/median__search_8cpp.html b/d9/d69/median__search_8cpp.html
index b244320a0..40d425e32 100644
--- a/d9/d69/median__search_8cpp.html
+++ b/d9/d69/median__search_8cpp.html
@@ -255,7 +255,7 @@ Here is the call graph for this function:
- 90 int k = int(low.
size ());
+ 90 int k = int(low.
size ());
@@ -268,6 +268,7 @@ Here is the call graph for this function:
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
@@ -308,7 +309,7 @@ Here is the call graph for this function:
-
+
120 assert(C[3] == search::median_search::median_of_medians(C, k));
diff --git a/d9/daa/namespacemidpoint__rule.html b/d9/daa/namespacemidpoint__rule.html
new file mode 100644
index 000000000..d7a94e1cc
--- /dev/null
+++ b/d9/daa/namespacemidpoint__rule.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: midpoint_rule Namespace Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Functions for the Midpoint Integral method implementation.
+More...
+
+
Functions for the Midpoint Integral method implementation.
+
+
+
+
+
+
diff --git a/da/d24/sqrt__double_8cpp.html b/da/d24/sqrt__double_8cpp.html
index c7ddb858c..a7069cae1 100644
--- a/da/d24/sqrt__double_8cpp.html
+++ b/da/d24/sqrt__double_8cpp.html
@@ -175,7 +175,7 @@ Here is the call graph for this function:
18 return 1 /
Sqrt (1 / a);
-
+
@@ -183,18 +183,19 @@ Here is the call graph for this function:
26 double epsilon = 1e-12;
- 28 double mid = (l + r) / 2;
+ 28 double mid = (
l + r) / 2;
32 if (a - mid * mid < epsilon) {
-
+
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html b/da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html
index 178c89c81..b4631c67b 100644
--- a/da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html
+++ b/da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html
@@ -171,16 +171,18 @@ size_t
n = 0
< represents minimum value over the range [g, r - pow(2,g) + 1]
< represents minimum value over the whole range [l,r]
-
110 int64_t g =
LOG [r - l + 1];
-
111 int64_t x =
ST [g][l];
+
110 int64_t
g =
LOG [r -
l + 1];
+
111 int64_t x =
ST [
g ][
l ];
-
114 ST [g][r - (1 << g) + 1];
+
114 ST [
g ][r - (1 <<
g ) + 1];
117 return (
A [x] <=
A [y] ? x : y);
+
double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
+
double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
std::array< int64_t, N > LOG
where floor(log2(i)) are precomputed.
Definition: sparse_table.cpp:59
std::array< int64_t, N > A
input array to perform RMQ.
Definition: sparse_table.cpp:56
std::array< std::array< int64_t, N >, M > ST
the sparse table storing min() values for given interval.
Definition: sparse_table.cpp:58
diff --git a/da/d7b/primality__test_8cpp.html b/da/d7b/primality__test_8cpp.html
index 70b2731fa..af02f1201 100644
--- a/da/d7b/primality__test_8cpp.html
+++ b/da/d7b/primality__test_8cpp.html
@@ -147,12 +147,13 @@ Functions
20 (number % 3 == 0 && number != 3))
-
23 for (
int k = 1; 36 * k * k - 12 * k < number; ++k) {
+
23 for (
int k = 1; 36 *
k *
k - 12 *
k < number; ++
k ) {
24 if ((number % (6 * k + 1) == 0) || (number % (6 * k - 1) == 0))
+
double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/da/dc3/linked__list_8cpp.html b/da/dc3/linked__list_8cpp.html
index f585e3036..c13391bf8 100644
--- a/da/dc3/linked__list_8cpp.html
+++ b/da/dc3/linked__list_8cpp.html
@@ -201,7 +201,7 @@ Here is the call graph for this function:
Main function: Allows the user add and delete values from the list. Also allows user to search for and display values in the list.
Returns 0 on exit
-
+
@@ -220,7 +220,7 @@ Here is the call graph for this function:
240 if (data_structures::linked_list::isDigit(s)) {
-
+
@@ -230,7 +230,7 @@ Here is the call graph for this function:
250 if (data_structures::linked_list::isDigit(s)) {
-
+
@@ -241,13 +241,13 @@ Here is the call graph for this function:
260 if (data_structures::linked_list::isDigit(s)) {
-
+
-
+
@@ -261,17 +261,14 @@ Here is the call graph for this function:
Definition: linked_list.cpp:81
-std::shared_ptr< link > search(int find_elem)
Definition: linked_list.cpp:197
-void erase(int old_elem)
Definition: linked_list.cpp:152
-void display()
Definition: linked_list.cpp:181
-void push_back(int new_elem)
Definition: linked_list.cpp:123
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
-
diff --git a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index eafdc9dc1..20bc2d61e 100644
--- a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,11 +1,5 @@
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index 5305d0a4a..883202f77 100644
--- a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-6b212deec9f04ec65076ade9ca5faded
\ No newline at end of file
+6332525467792455913e957281290568
\ No newline at end of file
diff --git a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index 117debeb4..a943ca74a 100644
--- a/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/da/dc3/linked__list_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,162 +4,49 @@
-
-
+
+
main
-
+
Node1
-
-main
+
+main
Node2
-
-
-data_structures::linked
-_list::list::display
+
+
+std::endl
Node1->Node2
-
-
-
-
-
-Node4
-
-
-std::endl
-
-
-
-
-
-Node1->Node4
-
-
-
-
-
-Node5
-
-
-data_structures::linked
-_list::list::erase
-
-
-
-
-
-Node1->Node5
-
-
-
-
-
-Node7
-
-
-data_structures::linked
-_list::list::push_back
-
-
-
-
-
-Node1->Node7
-
-
-
-
-
-Node8
-
-
-data_structures::linked
-_list::list::search
-
-
-
-
-
-Node1->Node8
-
-
-
-
-
-Node9
-
-
-std::stoi
-
-
-
-
-
-Node1->Node9
-
-
+
+
Node3
-
-
-data_structures::linked
-_list::list::isEmpty
+
+
+std::stoi
-
+
-Node2->Node3
-
-
-
-
-
-Node5->Node3
-
-
-
-
-
-Node6
-
-
-std::shared_ptr::reset
-
-
-
-
-
-Node5->Node6
-
-
-
-
-
-Node7->Node3
-
-
-
-
-
-Node8->Node3
-
-
+Node1->Node3
+
+
diff --git a/da/dc9/fibonacci__matrix__exponentiation_8cpp.html b/da/dc9/fibonacci__matrix__exponentiation_8cpp.html
index c3ed31605..fbd64942b 100644
--- a/da/dc9/fibonacci__matrix__exponentiation_8cpp.html
+++ b/da/dc9/fibonacci__matrix__exponentiation_8cpp.html
@@ -178,9 +178,9 @@ Functions
-
+
- 47 res[i][j]=(res[i][j]%mod+((Identity[i][k]%mod*transition[k][j]%mod))%mod)%mod;
+ 47 res[i][j]=(res[i][j]%mod+((Identity[i][
k ]%mod*transition[
k ][j]%mod))%mod)%mod;
@@ -199,9 +199,9 @@ Functions
-
+
- 68 res1[i][j]=(res1[i][j]%mod+((transition[i][k]%mod*transition[k][j]%mod))%mod)%mod;
+ 68 res1[i][j]=(res1[i][j]%mod+((transition[i][
k ]%mod*transition[
k ][j]%mod))%mod)%mod;
@@ -218,6 +218,7 @@ Functions
82 return ((result[0]%mod*Identity[0][0]%mod)%mod+(
result [1]%mod*Identity[1][0]%mod)%mod)%mod;
uint64_t result(uint64_t n)
Definition: fibonacci_sum.cpp:76
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/db/d01/brent__method__extrema_8cpp.html b/db/d01/brent__method__extrema_8cpp.html
index dd00fe72d..e671c569d 100644
--- a/db/d01/brent__method__extrema_8cpp.html
+++ b/db/d01/brent__method__extrema_8cpp.html
@@ -227,7 +227,7 @@ Functions
49 double v = lim_a + M_GOLDEN_RATIO * (lim_b - lim_a);
50 double u, w = v, x = v;
-
+
52 double fw = fv, fx = fv;
54 double mid_point = (lim_a + lim_b) / 2.f;
@@ -275,7 +275,7 @@ Functions
-
+
@@ -314,6 +314,7 @@ Functions
#define EPSILON
system accuracy limit
Definition: brent_method_extrema.cpp:23
+double f(double x)
A function f(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:90
diff --git a/db/d40/integral__approximation2_8cpp.html b/db/d40/integral__approximation2_8cpp.html
index ae9809254..ac7b70da3 100644
--- a/db/d40/integral__approximation2_8cpp.html
+++ b/db/d40/integral__approximation2_8cpp.html
@@ -384,13 +384,13 @@ Here is the call graph for this function:
-
+
- 148 f = [&](
double & x) {
return -x * x + 4.0; };
+ 148 f = [&](
double & x) {
return -x * x + 4.0; };
@@ -414,7 +414,7 @@ Here is the call graph for this function:
- 172 f = [&](
double & x) {
return std::exp (x); };
+ 172 f = [&](
double & x) {
return std::exp (x); };
@@ -441,7 +441,7 @@ Here is the call graph for this function:
- 199 f = [&](
double & x) {
return std::sin (M_PI * x) / (M_PI * x); };
+ 199 f = [&](
double & x) {
return std::sin (M_PI * x) / (M_PI * x); };
201 pdf = [&](
double & x) {
@@ -458,6 +458,7 @@ Here is the call graph for this function:
double integral_monte_carlo(const double &start_point, const Function &function, const Function &pdf, const uint32_t &num_samples=1000000)
Compute an approximation of an integral using Monte Carlo integration.
Definition: integral_approximation2.cpp:112
+double f(double x)
A function f(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:90
diff --git a/db/d9a/classuint128__t.html b/db/d9a/classuint128__t.html
index 8fb8e74f5..637549e32 100644
--- a/db/d9a/classuint128__t.html
+++ b/db/d9a/classuint128__t.html
@@ -697,13 +697,14 @@ Here is the call graph for this function:
147 _BitScanForward64(&r, f);
-
+
150 _BitScanForward64(&l, s);
-
+
+double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
@@ -742,9 +743,9 @@ Here is the call graph for this function:
170 _BitScanReverse64(&r, s);
-
+
173 _BitScanReverse64(&l, f);
-
+
diff --git a/dc/d5a/rat__maze_8cpp.html b/dc/d5a/rat__maze_8cpp.html
index aa594887e..748970837 100644
--- a/dc/d5a/rat__maze_8cpp.html
+++ b/dc/d5a/rat__maze_8cpp.html
@@ -300,7 +300,7 @@ Here is the call graph for this function:
Self-test implementations.
Returns void
-Examples /Users/runner/work/C-Plus-Plus/C-Plus-Plus/numerical_methods/rungekutta.cpp , and /Users/runner/work/C-Plus-Plus/C-Plus-Plus/sorting/wiggle_sort.cpp .
+Examples /Users/runner/work/C-Plus-Plus/C-Plus-Plus/numerical_methods/rungekutta.cpp , and /Users/runner/work/C-Plus-Plus/C-Plus-Plus/sorting/wiggle_sort.cpp .
diff --git a/dc/dc4/_2_users_2runner_2work_2_c-_plus-_plus_2_c-_plus-_plus_2numerical_methods_2rungekutta_8cpp-example.html b/dc/dc4/_2_users_2runner_2work_2_c-_plus-_plus_2_c-_plus-_plus_2numerical_methods_2rungekutta_8cpp-example.html
index e3340c1a1..48cfdc9f2 100644
--- a/dc/dc4/_2_users_2runner_2work_2_c-_plus-_plus_2_c-_plus-_plus_2numerical_methods_2rungekutta_8cpp-example.html
+++ b/dc/dc4/_2_users_2runner_2work_2_c-_plus-_plus_2_c-_plus-_plus_2numerical_methods_2rungekutta_8cpp-example.html
@@ -162,7 +162,7 @@ $(document).ready(function(){initNavTree('dc/dc4/_2_users_2runner_2work_2_c-_plu
auto n =
static_cast< uint64_t
> ((x - init_x) /
h );
-
+
@@ -170,10 +170,10 @@ $(document).ready(function(){initNavTree('dc/dc4/_2_users_2runner_2work_2_c-_plu
for (int i = 1; i <= n; ++i) {
-
-
k[1] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[0]);
-
k[2] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[1]);
-
k[3] =
h *
change (init_x +
h , y + k[2]);
+
+
k [1] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[0]);
+
k [2] =
h *
change (init_x + 0.5 *
h , y + 0.5 * k[1]);
+
@@ -193,8 +193,8 @@ $(document).ready(function(){initNavTree('dc/dc4/_2_users_2runner_2work_2_c-_plu
-
-
std::cout <<
"The Runge Kutta function will be tested on the basis of "
+
+
std::cout <<
"The Runge Kutta function will be tested on the basis of "
"precomputed values\n" ;
@@ -223,13 +223,14 @@ $(document).ready(function(){initNavTree('dc/dc4/_2_users_2runner_2work_2_c-_plu
-
+
return 0;
}
int main()
Main function.
Definition: graph_coloring.cpp:112
int h(int key)
Definition: hash_search.cpp:45
+
double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
Functions for Runge Kutta fourth order method.
static void test()
Self-test implementations.
Definition: rat_maze.cpp:86
diff --git a/de/d1c/midpoint__integral__method_8cpp__incl.map b/de/d1c/midpoint__integral__method_8cpp__incl.map
new file mode 100644
index 000000000..91af16246
--- /dev/null
+++ b/de/d1c/midpoint__integral__method_8cpp__incl.map
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/de/d1c/midpoint__integral__method_8cpp__incl.md5 b/de/d1c/midpoint__integral__method_8cpp__incl.md5
new file mode 100644
index 000000000..05d608719
--- /dev/null
+++ b/de/d1c/midpoint__integral__method_8cpp__incl.md5
@@ -0,0 +1 @@
+cb4d842974681cf60eb688b551f3de3f
\ No newline at end of file
diff --git a/de/d1c/midpoint__integral__method_8cpp__incl.svg b/de/d1c/midpoint__integral__method_8cpp__incl.svg
new file mode 100644
index 000000000..062915a04
--- /dev/null
+++ b/de/d1c/midpoint__integral__method_8cpp__incl.svg
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+numerical_methods/midpoint_integral_method.cpp
+
+
+
+Node1
+
+
+numerical_methods/midpoint
+_integral_method.cpp
+
+
+
+
+
+Node2
+
+
+cassert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+cmath
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+cstdint
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+cstdlib
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+functional
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
+Node7
+
+
+iostream
+
+
+
+
+
+Node1->Node7
+
+
+
+
+
+Node8
+
+
+map
+
+
+
+
+
+Node1->Node8
+
+
+
+
+
diff --git a/de/d75/qr__eigen__values_8cpp.html b/de/d75/qr__eigen__values_8cpp.html
index 2edda51db..d304daea6 100644
--- a/de/d75/qr__eigen__values_8cpp.html
+++ b/de/d75/qr__eigen__values_8cpp.html
@@ -355,12 +355,13 @@ Here is the call graph for this function:
66 for (
int i = 0; i < R1; i++) {
67 for (
int j = 0; j < C2; j++) {
- 69 for (
int k = 0; k < C1; k++) {
- 70 OUT[0][i][j] += A[i][k] * B[k][j];
+ 69 for (
int k = 0;
k < C1;
k ++) {
+ 70 OUT[0][i][j] += A[i][
k ] * B[
k ][j];
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/de/d9b/prime__numbers_8cpp.html b/de/d9b/prime__numbers_8cpp.html
index 5bd45086c..89a8828ed 100644
--- a/de/d9b/prime__numbers_8cpp.html
+++ b/de/d9b/prime__numbers_8cpp.html
@@ -181,11 +181,11 @@ Here is the call graph for this function:
-
+
- 24 is_not_prime[k] =
true ;
+ 24 is_not_prime[
k ] =
true ;
@@ -195,6 +195,7 @@ Here is the call graph for this function:
T emplace_back(T... args)
+double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
diff --git a/df/d11/midpoint__integral__method_8cpp.html b/df/d11/midpoint__integral__method_8cpp.html
new file mode 100644
index 000000000..67be9de90
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp.html
@@ -0,0 +1,601 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: numerical_methods/midpoint_integral_method.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A numerical method for easy approximation of integrals
+More...
+
#include <cassert>
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
+#include <functional>
+#include <iostream>
+#include <map>
+
+
+
A numerical method for easy approximation of integrals
+
The idea is to split the interval into N of intervals and use as interpolation points the xi for which it applies that xi = x0 + i*h, where h is a step defined as h = (b-a)/N where a and b are the first and last points of the interval of the integration [a, b].
+
We create a table of the xi and their corresponding f(xi) values and we evaluate the integral by the formula: I = h * {f(x0+h/2) + f(x1+h/2) + ... + f(xN-1+h/2)}
+
Arguments can be passed as parameters from the command line argv[1] = N, argv[2] = a, argv[3] = b. In this case if the default values N=16, a=1, b=3 are changed then the tests/assert are disabled.
+
Author ggkogkou
+
+
+
◆ f()
+
+
+
+
+
+ double numerical_methods::midpoint_rule::f
+ (
+ double
+ x )
+
+
+
+
+
+
A function f(x) that will be used to test the method.
+
Parameters
+
+ x The independent variable xi
+
+
+
+
Returns the value of the dependent variable yi = f(xi) = sqrt(xi) + ln(xi)
+
+
+
+
+
+
+
◆ g()
+
+
+
+
+
+ double numerical_methods::midpoint_rule::g
+ (
+ double
+ x )
+
+
+
+
+
+
A function g(x) that will be used to test the method.
+
Parameters
+
+ x The independent variable xi
+
+
+
+
Returns the value of the dependent variable yi = g(xi) = e^(-xi) * (4 - xi^2)
+
+
+
+
+
+
+
◆ k()
+
+
+
+
+
+ double numerical_methods::midpoint_rule::k
+ (
+ double
+ x )
+
+
+
+
+
+
+
◆ l()
+
+
+
+
+
+ double numerical_methods::midpoint_rule::l
+ (
+ double
+ x )
+
+
+
+
+
+
A function l(x) that will be used to test the method.
+
Parameters
+
+ x The independent variable xi
+
+
+
+
Returns the value of the dependent variable yi = l(xi) = xi + ln(2*xi + 1)
+
+
+
+
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ int
+ argc ,
+
+
+
+
+ char **
+ argv
+
+
+
+ )
+
+
+
+
+
+
Main function.
+
Parameters
+
+ argc commandline argument count (ignored)
+ argv commandline array of arguments (ignored)
+
+
+
+
Returns 0 on exit
+
Number of intervals to divide the integration interval.
+
MUST BE EVEN
+
Starting and ending point of the integration in
+
the real axis
+
Step, calculated by a, b and N
+
+
+
+
+
+
+
+
+
170 bool used_argv_parameters =
+
+
+
+
+
+
+
+
+
+
+
181 assert(a < b &&
"a has to be less than b" );
+
182 assert(N > 0 &&
"N has to be > 0" );
+
183 if (N < 4 || a != 1 || b != 3) {
+
184 used_argv_parameters =
true ;
+
+
186 std::cout <<
"You selected N=" <<
N <<
", a=" << a <<
", b=" << b
+
+
+
189 std::cout <<
"Default N=" <<
N <<
", a=" << a <<
", b=" << b
+
+
+
+
+
+
+
196 test (N,
h , a, b, used_argv_parameters);
+
+
+
+
+
+
+
constexpr uint32_t N
A struct to represent sparse table for min() as their invariant function, for the given array A....
Definition: sparse_table.cpp:47
+
+
int h(int key)
Definition: hash_search.cpp:45
+
+
static void test(std::int32_t N, double h, double a, double b, bool used_argv_parameters)
Self-test implementations.
Definition: midpoint_integral_method.cpp:123
+
+
+
+
+
+
+
◆ midpoint()
+
+
+
+
+
+ double numerical_methods::midpoint_rule::midpoint
+ (
+ const std::int32_t
+ N ,
+
+
+
+
+ const double
+ h ,
+
+
+
+
+ const double
+ a ,
+
+
+
+
+ const std::function < double(double)> &
+ func
+
+
+
+ )
+
+
+
+
+
+
Main function for implementing the Midpoint Integral Method implementation.
+
Parameters
+
+ N is the number of intervals
+ h is the step
+ a is x0
+ func is the function that will be integrated
+
+
+
+
Returns the result of the integration
+
+
+
+
+
+
+
+
+
+
62 temp = func(xi +
h / 2);
+
+
+
+
+
+
+
+
70 double evaluate_integral = 0;
+
71 for (
std::int32_t i = 0; i <
N ; i++) evaluate_integral += data_table.
at (i);
+
+
+
74 evaluate_integral *=
h ;
+
+
+
+
+
79 "The definite integral can't be evaluated. Check the validity of "
+
+
+
82 return evaluate_integral;
+
+
+
+
+
+
+
+
+
+
+
+
+
◆ test()
+
+
+
+
+
+
+
+
+ static void test
+ (
+ std::int32_t
+ N ,
+
+
+
+
+ double
+ h ,
+
+
+
+
+ double
+ a ,
+
+
+
+
+ double
+ b ,
+
+
+
+
+ bool
+ used_argv_parameters
+
+
+
+ )
+
+
+
+
+
+static
+
+
+
+
+
Self-test implementations.
+
Parameters
+
+ N is the number of intervals
+ h is the step
+ a is x0
+ b is the end of the interval
+ used_argv_parameters is 'true' if argv parameters are given and 'false' if not
+
+
+
+
+
+
+
+
128 N,
h , a, numerical_methods::midpoint_rule::f);
+
129 assert((used_argv_parameters || (result_f >= 4.09 && result_f <= 4.10)) &&
+
130 "The result of f(x) is wrong" );
+
131 std::cout <<
"The result of integral f(x) on interval [" << a <<
", " << b
+
132 <<
"] is equal to: " << result_f <<
std::endl ;
+
+
+
135 N,
h , a, numerical_methods::midpoint_rule::g);
+
136 assert((used_argv_parameters || (result_g >= 0.27 && result_g <= 0.28)) &&
+
137 "The result of g(x) is wrong" );
+
138 std::cout <<
"The result of integral g(x) on interval [" << a <<
", " << b
+
139 <<
"] is equal to: " << result_g <<
std::endl ;
+
+
+
142 N,
h , a, numerical_methods::midpoint_rule::k);
+
143 assert((used_argv_parameters || (result_k >= 9.06 && result_k <= 9.07)) &&
+
144 "The result of k(x) is wrong" );
+
145 std::cout <<
"The result of integral k(x) on interval [" << a <<
", " << b
+
146 <<
"] is equal to: " << result_k <<
std::endl ;
+
+
+
149 N,
h , a, numerical_methods::midpoint_rule::l);
+
150 assert((used_argv_parameters || (result_l >= 7.16 && result_l <= 7.17)) &&
+
151 "The result of l(x) is wrong" );
+
152 std::cout <<
"The result of integral l(x) on interval [" << a <<
", " << b
+
153 <<
"] is equal to: " << result_l <<
std::endl ;
+
+
double midpoint(const std::int32_t N, const double h, const double a, const std::function< double(double)> &func)
Main function for implementing the Midpoint Integral Method implementation.
Definition: midpoint_integral_method.cpp:52
+
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp.js b/df/d11/midpoint__integral__method_8cpp.js
new file mode 100644
index 000000000..c11a0662b
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp.js
@@ -0,0 +1,10 @@
+var midpoint__integral__method_8cpp =
+[
+ [ "f", "df/d11/midpoint__integral__method_8cpp.html#a7ee8e824ef3e138a9a21883b26d97226", null ],
+ [ "g", "df/d11/midpoint__integral__method_8cpp.html#ae682ee71af44b1e9e884849cc6a6b040", null ],
+ [ "k", "df/d11/midpoint__integral__method_8cpp.html#ae9f66040f8e0ba73c1c741261c22a52a", null ],
+ [ "l", "df/d11/midpoint__integral__method_8cpp.html#ad53616fb4fa6880ae876bcba53365c51", null ],
+ [ "main", "df/d11/midpoint__integral__method_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
+ [ "midpoint", "df/d11/midpoint__integral__method_8cpp.html#a7072493d1f0f8a91b2a71d4cc456c09c", null ],
+ [ "test", "df/d11/midpoint__integral__method_8cpp.html#a2ae48a41e43dc6ab11b962742349646e", null ]
+];
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.map b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.map
new file mode 100644
index 000000000..ba5342183
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.md5
new file mode 100644
index 000000000..ccb3fa530
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.md5
@@ -0,0 +1 @@
+933cfa74fd0798b815fb68d8a2bb3bf4
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.svg
new file mode 100644
index 000000000..8f16b846b
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a2ae48a41e43dc6ab11b962742349646e_cgraph.svg
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+test
+
+
+
+Node1
+
+
+test
+
+
+
+
+
+Node2
+
+
+std::endl
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+h
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.map b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.map
new file mode 100644
index 000000000..ec07b0539
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.map
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.md5
new file mode 100644
index 000000000..4e241f6a3
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.md5
@@ -0,0 +1 @@
+789454801ae4af4a2066076e1a213e13
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.svg
new file mode 100644
index 000000000..b69490247
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.svg
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+main
+
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+std::atof
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::atoi
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+std::endl
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+h
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+test
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
+Node6->Node4
+
+
+
+
+
+Node6->Node5
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.map b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.map
new file mode 100644
index 000000000..98908f6f7
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.md5
new file mode 100644
index 000000000..eaec7d18d
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.md5
@@ -0,0 +1 @@
+d371b96c9516262c01e1d8ad54bbfc8a
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.svg
new file mode 100644
index 000000000..c880f65c3
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7072493d1f0f8a91b2a71d4cc456c09c_cgraph.svg
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+numerical_methods::midpoint_rule::midpoint
+
+
+
+Node1
+
+
+numerical_methods::
+midpoint_rule::midpoint
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::map::at
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+h
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+std::map::insert
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+std::isnan
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.map b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.map
new file mode 100644
index 000000000..2c953bfc0
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.md5
new file mode 100644
index 000000000..b11801b68
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.md5
@@ -0,0 +1 @@
+e874b7a4f13a184aee08d3378ad6a8a2
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.svg
new file mode 100644
index 000000000..e0c7addba
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_a7ee8e824ef3e138a9a21883b26d97226_cgraph.svg
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+numerical_methods::midpoint_rule::f
+
+
+
+Node1
+
+
+numerical_methods::
+midpoint_rule::f
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::log
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::sqrt
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.map b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.map
new file mode 100644
index 000000000..7792ede1f
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.md5
new file mode 100644
index 000000000..373d41907
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.md5
@@ -0,0 +1 @@
+1a1f7f7ca1524ca8e26060fe6270f0c5
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.svg
new file mode 100644
index 000000000..7afc4731e
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ad53616fb4fa6880ae876bcba53365c51_cgraph.svg
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+numerical_methods::midpoint_rule::l
+
+
+
+Node1
+
+
+numerical_methods::
+midpoint_rule::l
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::log
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.map b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.map
new file mode 100644
index 000000000..9e350f28d
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.md5
new file mode 100644
index 000000000..67578825a
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.md5
@@ -0,0 +1 @@
+bc13e45eadc3877f0fb149de355cf296
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.svg
new file mode 100644
index 000000000..29d995e08
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae682ee71af44b1e9e884849cc6a6b040_cgraph.svg
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+numerical_methods::midpoint_rule::g
+
+
+
+Node1
+
+
+numerical_methods::
+midpoint_rule::g
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::exp
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::pow
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.map b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.map
new file mode 100644
index 000000000..a9a83ba57
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.md5 b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.md5
new file mode 100644
index 000000000..64de61431
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.md5
@@ -0,0 +1 @@
+60d0842ff97a4f87fb8b476cd61aeb36
\ No newline at end of file
diff --git a/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.svg b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.svg
new file mode 100644
index 000000000..3a32f8e89
--- /dev/null
+++ b/df/d11/midpoint__integral__method_8cpp_ae9f66040f8e0ba73c1c741261c22a52a_cgraph.svg
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+numerical_methods::midpoint_rule::k
+
+
+
+Node1
+
+
+numerical_methods::
+midpoint_rule::k
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::pow
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::sqrt
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
diff --git a/df/d82/breadth__first__search_8cpp.html b/df/d82/breadth__first__search_8cpp.html
index e90c3ae8e..d8b65bcca 100644
--- a/df/d82/breadth__first__search_8cpp.html
+++ b/df/d82/breadth__first__search_8cpp.html
@@ -181,30 +181,29 @@ Functions
189 std::cout <<
"Enter the number of edges: " ;
-
+
194 std::cout <<
"Enter space-separated pairs of vertices that form edges: "
-
+
-
+
202 g .breadth_first_search(0);
static void tests()
Definition: breadth_first_search.cpp:139
Definition: breadth_first_search.cpp:64
-
std::map< T, bool > breadth_first_search(T src)
Definition: breadth_first_search.cpp:96
-
void add_edge(T u, T v, bool bidir=true)
Definition: breadth_first_search.cpp:74
+
double g(double x)
A function g(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:97
-
@@ -238,23 +237,23 @@ Here is the call graph for this function:
Test 3 Begins
-
+
-
-
-
+
+
+
146 correct_result[0] =
true ;
147 correct_result[1] =
true ;
148 correct_result[2] =
true ;
149 correct_result[3] =
true ;
-
+
153 assert(returned_result == correct_result);
-
+
157 returned_result =
g .breadth_first_search(0);
159 assert(returned_result == correct_result);
@@ -281,6 +280,8 @@ Here is the call graph for this function:
181 assert(correct_res == returned_res);
+std::map< T, bool > breadth_first_search(T src)
Definition: breadth_first_search.cpp:96
+void add_edge(T u, T v, bool bidir=true)
Definition: breadth_first_search.cpp:74
diff --git a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
index e555d2641..74ce7b993 100644
--- a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
+++ b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -1,11 +1,11 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
index 7f54b756d..f7ee60491 100644
--- a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
+++ b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -1 +1 @@
-bd041341195b2e0789cc74208a3fe618
\ No newline at end of file
+d8a1b32206259a1ba8719912d88e4116
\ No newline at end of file
diff --git a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
index 0ad6b856c..ace057c3c 100644
--- a/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
+++ b/df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -4,158 +4,146 @@
-
-
+
+
main
-
+
Node1
-
-main
+
+main
Node2
-
-
-graph::Graph::add_edge
+
+
+std::endl
Node1->Node2
-
-
+
+
Node3
-
-
-graph::Graph::breadth
-_first_search
+
+
+tests
Node1->Node3
-
-
+
+
-
-
-Node8
-
-
-std::endl
-
-
-
-
-
-Node1->Node8
-
-
-
-
-
-Node9
-
-
-tests
-
-
-
-
-
-Node1->Node9
-
-
+
+
+Node3->Node2
+
+
Node4
-
-
-std::queue::empty
+
+
+graph::Graph::add_edge
Node3->Node4
-
-
+
+
Node5
-
-
-std::queue::front
+
+
+graph::Graph::breadth
+_first_search
Node3->Node5
-
-
+
+
Node6
-
+
+
+std::queue::empty
+
+
+
+
+
+Node5->Node6
+
+
+
+
+
+Node7
+
+
+std::queue::front
+
+
+
+
+
+Node5->Node7
+
+
+
+
+
+Node8
+
std::queue::pop
-
-
-Node3->Node6
+
+
+Node5->Node8
-
-
-Node7
-
+
+
+Node9
+
std::queue::push
-
-
-Node3->Node7
+
+
+Node5->Node9
-
-
-Node9->Node2
-
-
-
-
-
-Node9->Node3
-
-
-
-
-
-Node9->Node8
-
-
-
diff --git a/df/dce/namespacegraph.html b/df/dce/namespacegraph.html
index 1d18e2454..bfd3bf104 100644
--- a/df/dce/namespacegraph.html
+++ b/df/dce/namespacegraph.html
@@ -156,7 +156,7 @@ Functions
for IO operations for std::set
Graph Algorithms
A bipartite graph is the one whose nodes can be divided into two disjoint sets in such a way that the nodes in a set are not connected to each other at all, i.e. no intra-set connections. The only connections that exist are that of inter-set, i.e. the nodes from one set are connected to a subset of nodes in the other set. In this implementation, using a graph in the form of adjacency list, check whether the given graph is a bipartite or not.
-References used: GeeksForGeeks
Author tushar2407 for IO operations for queue data structure for vector data structure for assert
+References used: GeeksForGeeks
Author tushar2407 for assert for IO operations for queue data structure for vector data structure
Graphical algorithms
for std::min for assert for IO operations for limits of integral types for std::vector
@@ -374,34 +374,37 @@ Here is the call graph for this function:
insert the neighbouring node into the queue
if both the current node and its neighbour has the same state then it is not a bipartite graph
return true when all the connected nodes of the current nodes are travelled and satisify all the above conditions
-
-
-
-
-
44 (*visited)[index] = 1;
-
-
-
47 int64_t u = q.front();
-
-
49 for (uint64_t i=0;i<
graph [u].size();i++)
-
-
51 int64_t v =
graph [u][i];
-
-
-
-
55 (*visited)[v] = ((*visited)[u]==1)?-1:1;
-
-
-
-
59 else if ((*visited)[v] == (*visited)[u])
-
+
+
+
+
+
41 (*visited)[index] = 1;
+
+
43 int64_t u = q.front();
+
+
45 for (uint64_t i = 0; i <
graph [u].size(); i++) {
+
+
+
+
+
+
+
+
+
+
+
+
57 }
else if ((*visited)[v] ==
+
+
+
-
-
+
+
@@ -755,24 +758,25 @@ Here is the call graph for this function:
Returns booleans
< stores boolean values which signify whether that node had been visited or not
if the current node is not visited then check whether the sub-graph of that node is a bipartite or not
-
-
-
-
-
80 for (uint64_t i=0;i<
graph .size();i++)
-
-
-
-
-
-
+
+
+
+
+
+
+
81 for (uint64_t i = 0; i <
graph .size(); i++) {
+
+
+
+
+
-
bool checkBipartite(const std::vector< std::vector< int64_t > > &graph, int64_t index, std::vector< int64_t > *visited)
function to check whether the passed graph is bipartite or not
Definition: is_graph_bipartite2.cpp:35
+
bool checkBipartite(const std::vector< std::vector< int64_t > > &graph, int64_t index, std::vector< int64_t > *visited)
function to check whether the passed graph is bipartite or not
Definition: is_graph_bipartite2.cpp:36
@@ -839,12 +843,12 @@ Here is the call graph for this function:
54 int32_t curr_weight = 0;
-
+
-
59 curr_weight += (*cities)[k][i];
-
+
59 curr_weight += (*cities)[
k ][i];
+
-
62 curr_weight += (*cities)[k][src];
+
62 curr_weight += (*cities)[
k ][src];
65 min_path =
std::min (min_path, curr_weight);
@@ -855,6 +859,7 @@ Here is the call graph for this function:
+
double k(double x)
A function k(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:103
T next_permutation(T... args)
diff --git a/df/dd5/binary__search_8cpp.html b/df/dd5/binary__search_8cpp.html
index fae99818c..d49a0a08c 100644
--- a/df/dd5/binary__search_8cpp.html
+++ b/df/dd5/binary__search_8cpp.html
@@ -159,19 +159,20 @@ Functions
-1 if T is not found
-
+
-
19 int m = l + (r - l) / 2;
+
19 int m =
l + (r -
l ) / 2;
-
+
+
double l(double x)
A function l(x) that will be used to test the method.
Definition: midpoint_integral_method.cpp:109
diff --git a/dir_9c6faab82c22511b50177aa2e38e2780.html b/dir_9c6faab82c22511b50177aa2e38e2780.html
index 8f598b9d8..307ecf39d 100644
--- a/dir_9c6faab82c22511b50177aa2e38e2780.html
+++ b/dir_9c6faab82c22511b50177aa2e38e2780.html
@@ -120,6 +120,9 @@ Files
file lu_decomposition.h [code]
Functions associated with LU Decomposition of a square matrix.
+file midpoint_integral_method.cpp
+ A numerical method for easy approximation of integrals
+
file newton_raphson_method.cpp
Solve the equation \(f(x)=0\) using Newton-Raphson method for both real and complex solutions.
diff --git a/dir_9c6faab82c22511b50177aa2e38e2780.js b/dir_9c6faab82c22511b50177aa2e38e2780.js
index ef6c1a60d..cf6df4db0 100644
--- a/dir_9c6faab82c22511b50177aa2e38e2780.js
+++ b/dir_9c6faab82c22511b50177aa2e38e2780.js
@@ -8,6 +8,7 @@ var dir_9c6faab82c22511b50177aa2e38e2780 =
[ "golden_search_extrema.cpp", "d6/d7a/golden__search__extrema_8cpp.html", "d6/d7a/golden__search__extrema_8cpp" ],
[ "lu_decompose.cpp", "dd/d65/lu__decompose_8cpp.html", "dd/d65/lu__decompose_8cpp" ],
[ "lu_decomposition.h", "d1/dbe/lu__decomposition_8h.html", "d1/dbe/lu__decomposition_8h" ],
+ [ "midpoint_integral_method.cpp", "df/d11/midpoint__integral__method_8cpp.html", "df/d11/midpoint__integral__method_8cpp" ],
[ "newton_raphson_method.cpp", "de/dd3/newton__raphson__method_8cpp.html", "de/dd3/newton__raphson__method_8cpp" ],
[ "ode_forward_euler.cpp", "db/dd3/ode__forward__euler_8cpp.html", "db/dd3/ode__forward__euler_8cpp" ],
[ "ode_midpoint_euler.cpp", "d6/dd3/ode__midpoint__euler_8cpp.html", "d6/dd3/ode__midpoint__euler_8cpp" ],
diff --git a/files.html b/files.html
index 51deb6f04..55a6f1cd3 100644
--- a/files.html
+++ b/files.html
@@ -262,15 +262,16 @@ solve-a-rat-in-a-maze-c-java-pytho/"
golden_search_extrema.cpp Find extrema of a univariate real function in a given interval using golden section search algorithm
lu_decompose.cpp LU decomposition of a square matrix
lu_decomposition.h Functions associated with LU Decomposition of a square matrix
- newton_raphson_method.cpp Solve the equation \(f(x)=0\) using Newton-Raphson method for both real and complex solutions
- ode_forward_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using forward Euler method
- ode_midpoint_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using midpoint Euler method
- ode_semi_implicit_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using semi implicit Euler method
- qr_decompose.h Library functions to compute QR decomposition of a given matrix
- qr_decomposition.cpp Program to compute the QR decomposition of a given matrix
- qr_eigen_values.cpp Compute real eigen values and eigen vectors of a symmetric matrix using QR decomposition method
- rungekutta.cpp Runge Kutta fourth order method implementation
- successive_approximation.cpp Method of successive approximations using fixed-point iteration method
+ midpoint_integral_method.cpp A numerical method for easy approximation of integrals
+ newton_raphson_method.cpp Solve the equation \(f(x)=0\) using Newton-Raphson method for both real and complex solutions
+ ode_forward_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using forward Euler method
+ ode_midpoint_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using midpoint Euler method
+ ode_semi_implicit_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using semi implicit Euler method
+ qr_decompose.h Library functions to compute QR decomposition of a given matrix
+ qr_decomposition.cpp Program to compute the QR decomposition of a given matrix
+ qr_eigen_values.cpp Compute real eigen values and eigen vectors of a symmetric matrix using QR decomposition method
+ rungekutta.cpp Runge Kutta fourth order method implementation
+ successive_approximation.cpp Method of successive approximations using fixed-point iteration method
► operations_on_datastructures
array_left_rotation.cpp Implementation for the Array Left Rotation algorithm
array_right_rotation.cpp Implementation for the Array right Rotation algorithm
diff --git a/globals_func_m.html b/globals_func_m.html
index 7508105c8..6b9392b7d 100644
--- a/globals_func_m.html
+++ b/globals_func_m.html
@@ -93,7 +93,7 @@ $(document).ready(function(){initNavTree('globals_func_m.html',''); initResizabl
- m -