Added Doxygen docs
554
docs/docbook/_exponential_8h_source.xml
Normal file
@ -0,0 +1,554 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="__exponential_8h_source" xml:lang="en-US">
|
||||
<title>Exponential.h</title>
|
||||
<indexterm><primary>Exponential/Exponential.h</primary></indexterm>
|
||||
<programlisting linenumbering="unnumbered">1 <emphasis role="preprocessor">#pragma once</emphasis>
|
||||
2 <emphasis role="preprocessor">#ifndef JONATHAN_RAMPERSAD_EXPONENTIAL_H_</emphasis>
|
||||
3 <emphasis role="preprocessor">#define JONATHAN_RAMPERSAD_EXPONENTIAL_H_</emphasis>
|
||||
4
|
||||
5 <emphasis role="preprocessor">#include <ostream></emphasis>
|
||||
6 <emphasis role="preprocessor">#include <vector></emphasis>
|
||||
7 <emphasis role="preprocessor">#include <float.h></emphasis>
|
||||
8 <emphasis role="preprocessor">#include <random></emphasis>
|
||||
9 <emphasis role="preprocessor">#include <algorithm></emphasis>
|
||||
10 <emphasis role="preprocessor">#include <execution></emphasis>
|
||||
11 <emphasis role="preprocessor">#include <exception></emphasis>
|
||||
12
|
||||
13 <emphasis role="keyword">namespace </emphasis>JRAMPERSAD
|
||||
14 {
|
||||
15     <emphasis role="keyword">namespace </emphasis>EXPONENTIAL
|
||||
16     {
|
||||
21         <emphasis role="keyword">struct </emphasis><link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>
|
||||
22         {
|
||||
24             <emphasis role="keywordtype">double</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a316979973a2a6b70b00520c2f753a43c">min_range</link> = -100;
|
||||
26             <emphasis role="keywordtype">double</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a9b8f1e5367f6b0d8b16eecaea53b40e2">max_range</link> = 100;
|
||||
28             <emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a4a67bad303f8a4fca40020a0802524c5">num_of_generations</link> = 10;
|
||||
30             <emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1ad133af29dbbc26b8c3d507d359c03326">sample_size</link> = 1000;
|
||||
32             <emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a6ec95fe6cc95dc32727659cf5bb1be12">data_size</link> = 100000;
|
||||
34             <emphasis role="keywordtype">double</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a736488b3cfeebda7b93b3e8c6f576bf8">mutation_percentage</link> = 0.01;
|
||||
35         };
|
||||
36
|
||||
37         <emphasis role="keyword">namespace </emphasis>detail
|
||||
38         {
|
||||
39             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
40             [[nodiscard(<emphasis role="stringliteral">"MATH::ABS(T) returns a value of type T"</emphasis>)]] T ABS(<emphasis role="keyword">const</emphasis> T& n) <emphasis role="keyword">noexcept</emphasis>
|
||||
41             {
|
||||
42                 <emphasis role="keywordflow">return</emphasis> n < 0 ? n * -1 : n;
|
||||
43             }
|
||||
44
|
||||
45             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
46             [[nodiscard(<emphasis role="stringliteral">"MATH::NEGATE(T) returns a value of type T"</emphasis>)]] T NEGATE(<emphasis role="keyword">const</emphasis> T& n) <emphasis role="keyword">noexcept</emphasis>
|
||||
47             {
|
||||
48                 <emphasis role="keywordflow">return</emphasis> n * -1;
|
||||
49             }
|
||||
50
|
||||
51             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
52             [[nodiscard(<emphasis role="stringliteral">"MATH::POW(T, int) returns a value of type T"</emphasis>)]] T POW(<emphasis role="keyword">const</emphasis> T& n, <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& exp) <emphasis role="keyword">noexcept</emphasis>
|
||||
53             {
|
||||
54                 <emphasis role="keywordflow">if</emphasis> (exp == 0)
|
||||
55                     <emphasis role="keywordflow">return</emphasis> 1;
|
||||
56
|
||||
57                 T res = n;
|
||||
58                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> i = 1; i < exp; i++)
|
||||
59                 {
|
||||
60                     res *= n;
|
||||
61                 }
|
||||
62
|
||||
63                 <emphasis role="keywordflow">return</emphasis> res;
|
||||
64             }
|
||||
65
|
||||
66             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
67             [[nodiscard(<emphasis role="stringliteral">"MATH::SUM(std::vector<T>) returns a value of type T"</emphasis>)]] T SUM(<emphasis role="keyword">const</emphasis> std::vector<T>& vec) <emphasis role="keyword">noexcept</emphasis>
|
||||
68             {
|
||||
69                 T res{};
|
||||
70                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : vec)
|
||||
71                     res += val;
|
||||
72                 <emphasis role="keywordflow">return</emphasis> res;
|
||||
73             }
|
||||
74
|
||||
75             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
76             [[nodiscard]] T MEDIAN(std::vector<T> vec) <emphasis role="keyword">noexcept</emphasis>
|
||||
77             {
|
||||
78                 std::sort(
|
||||
79                     vec.begin(),
|
||||
80                     vec.end(),
|
||||
81                     [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& lhs, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& rhs) {
|
||||
82                         return lhs < rhs;
|
||||
83                     });
|
||||
84
|
||||
85                 <emphasis role="keywordflow">return</emphasis> vec[vec.size() / 2];
|
||||
86             }
|
||||
87
|
||||
88             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
89             [[nodiscard]] <emphasis role="keywordtype">double</emphasis> MEAN(<emphasis role="keyword">const</emphasis> std::vector<T>& vec) <emphasis role="keyword">noexcept</emphasis>
|
||||
90             {
|
||||
91                 <emphasis role="keywordflow">return</emphasis> SUM(vec) / vec.size();
|
||||
92             }
|
||||
93
|
||||
94             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
95             [[noreturn]] <emphasis role="keywordtype">void</emphasis> SortASC(std::vector<T>& vec)
|
||||
96             {
|
||||
97                 std::sort(
|
||||
98                     std::execution::par,
|
||||
99                     vec.begin(), vec.end(),
|
||||
100                     [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& lhs, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& rhs) {
|
||||
101                         return lhs < rhs;
|
||||
102                     });
|
||||
103             }
|
||||
104
|
||||
105             <emphasis role="keyword">template</emphasis><<emphasis role="keyword">typename</emphasis> T>
|
||||
106             [[noreturn]] <emphasis role="keywordtype">void</emphasis> SortDESC(std::vector<T>& vec)
|
||||
107             {
|
||||
108                 std::sort(
|
||||
109                     std::execution::par,
|
||||
110                     vec.begin(), vec.end(),
|
||||
111                     [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& lhs, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& rhs) {
|
||||
112                         return lhs > rhs;
|
||||
113                     });
|
||||
114             }
|
||||
115
|
||||
116             <emphasis role="keyword">template</emphasis> <<emphasis role="keywordtype">int</emphasis> lrgst_expo> <emphasis role="comment">// Genetic Algorithm helper struct</emphasis>
|
||||
117             <emphasis role="keyword">struct </emphasis>GA_Solution
|
||||
118             {
|
||||
119                 <emphasis role="keywordtype">double</emphasis> rank, x, y_val;
|
||||
120                 <emphasis role="keywordtype">bool</emphasis> ranked;
|
||||
121
|
||||
122                 GA_Solution() : rank(0), x(0), y_val(0), ranked(false) {}
|
||||
123                 GA_Solution(<emphasis role="keywordtype">double</emphasis> Rank, <emphasis role="keywordtype">double</emphasis> x_val, <emphasis role="keywordtype">double</emphasis> y = 0) : rank(Rank), x(x_val), y_val(y), ranked(false) {}
|
||||
124                 <emphasis role="keyword">virtual</emphasis> ~GA_Solution() = <emphasis role="keywordflow">default</emphasis>;
|
||||
125
|
||||
126                 <emphasis role="keywordtype">void</emphasis> fitness(<emphasis role="keyword">const</emphasis> std::vector<int>& constants)
|
||||
127                 {
|
||||
128                     <emphasis role="keywordtype">double</emphasis> ans = 0;
|
||||
129                     <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> i = lrgst_expo; i >= 0; i--)
|
||||
130                         ans += constants[i] * POW(x, (lrgst_expo - i));
|
||||
131
|
||||
132                     ans -= y_val;
|
||||
133                     rank = (ans == 0) ? DBL_MAX : ABS(1 / ans);
|
||||
134                 }
|
||||
135             };
|
||||
136         }
|
||||
137
|
||||
138         <emphasis role="keyword">using namespace </emphasis>detail;
|
||||
143         <emphasis role="keyword">template</emphasis> <<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
144         <emphasis role="keyword">class </emphasis><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>
|
||||
145         {
|
||||
146         <emphasis role="keyword">private</emphasis>:
|
||||
147             std::vector<int> constants;
|
||||
148
|
||||
149         <emphasis role="keyword">public</emphasis>:
|
||||
150             <emphasis role="comment">// Speicialty function to get the real roots of a Quadratic Function without relying on a Genetic Algorithm to approximate</emphasis>
|
||||
151             <emphasis role="keyword">friend</emphasis> std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a8f5b8975b6e7318c093a963cd0b43db6">QuadraticSolve</link>(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<2></link>& f);
|
||||
152
|
||||
153         <emphasis role="keyword">public</emphasis>:
|
||||
158             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>(<emphasis role="keyword">const</emphasis> std::vector<int>& constnts);
|
||||
163             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>(std::vector<int>&& constnts);
|
||||
164             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>& other) = <emphasis role="keywordflow">default</emphasis>;
|
||||
165             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>&& other) <emphasis role="keyword">noexcept</emphasis> = <emphasis role="keywordflow">default</emphasis>;
|
||||
166             <emphasis role="keyword">virtual</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">~Function</link>();
|
||||
167
|
||||
168             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>& operator=(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>& other) = <emphasis role="keywordflow">default</emphasis>;
|
||||
169             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>& operator=(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>&& other) <emphasis role="keyword">noexcept</emphasis> = <emphasis role="keywordflow">default</emphasis>;
|
||||
170
|
||||
171             <emphasis role="comment">// Operator function to display function object in a human readable format</emphasis>
|
||||
172             <emphasis role="keyword">friend</emphasis> std::ostream& operator<<(std::ostream& os, <emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo></link> func)
|
||||
173             {
|
||||
174                 <emphasis role="keywordflow">if</emphasis> (lrgst_expo == 0)
|
||||
175                 {
|
||||
176                     os << func.constants[0];
|
||||
177                     <emphasis role="keywordflow">return</emphasis> os;
|
||||
178                 }
|
||||
179
|
||||
180                 <emphasis role="keywordflow">if</emphasis> (func.constants[0] == 1)
|
||||
181                     os << <emphasis role="stringliteral">"x"</emphasis>;
|
||||
182                 <emphasis role="keywordflow">else</emphasis> <emphasis role="keywordflow">if</emphasis> (func.constants[0] == -1)
|
||||
183                     os << <emphasis role="stringliteral">"-x"</emphasis>;
|
||||
184                 <emphasis role="keywordflow">else</emphasis>
|
||||
185                     os << func.constants[0] << <emphasis role="stringliteral">"x"</emphasis>;
|
||||
186
|
||||
187                 <emphasis role="keywordflow">if</emphasis> (lrgst_expo != 1)
|
||||
188                     os << <emphasis role="stringliteral">"^"</emphasis> << lrgst_expo;
|
||||
189
|
||||
190                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> i = lrgst_expo - 1; i > 0; i--)
|
||||
191                 {
|
||||
192                     <emphasis role="keywordtype">int</emphasis> n = func.constants[lrgst_expo - i];
|
||||
193                     <emphasis role="keywordflow">if</emphasis> (n == 0) <emphasis role="keywordflow">continue</emphasis>;
|
||||
194
|
||||
195                     <emphasis role="keyword">auto</emphasis> s = n > 0 ? <emphasis role="stringliteral">" + "</emphasis> : <emphasis role="stringliteral">" - "</emphasis>;
|
||||
196
|
||||
197                     <emphasis role="keywordflow">if</emphasis> (n != 1)
|
||||
198                         os << s << ABS(n) << <emphasis role="stringliteral">"x"</emphasis>;
|
||||
199                     <emphasis role="keywordflow">else</emphasis>
|
||||
200                         os << s << <emphasis role="stringliteral">"x"</emphasis>;
|
||||
201
|
||||
202                     <emphasis role="keywordflow">if</emphasis> (i != 1)
|
||||
203                         os << <emphasis role="stringliteral">"^"</emphasis> << i;
|
||||
204                 }
|
||||
205
|
||||
206                 <emphasis role="keywordtype">int</emphasis> n = func.constants[lrgst_expo];
|
||||
207                 <emphasis role="keywordflow">if</emphasis> (n == 0) <emphasis role="keywordflow">return</emphasis> os;
|
||||
208
|
||||
209                 <emphasis role="keyword">auto</emphasis> s = n > 0 ? <emphasis role="stringliteral">" + "</emphasis> : <emphasis role="stringliteral">" - "</emphasis>;
|
||||
210                 os << s;
|
||||
211
|
||||
212                 os << ABS(n);
|
||||
213
|
||||
214                 <emphasis role="keywordflow">return</emphasis> os;
|
||||
215             }
|
||||
216
|
||||
217             <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> e1, <emphasis role="keywordtype">int</emphasis> e2, <emphasis role="keywordtype">int</emphasis> r>
|
||||
218             <emphasis role="keyword">friend</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<r></link> operator+(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e1></link>& f1, <emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e2></link>& f2); <emphasis role="comment">// Operator to add two functions</emphasis>
|
||||
219             <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> e1, <emphasis role="keywordtype">int</emphasis> e2, <emphasis role="keywordtype">int</emphasis> r>
|
||||
220             <emphasis role="keyword">friend</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<r></link> operator-(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e1></link>& f1, <emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e2></link>& f2); <emphasis role="comment">// Operator to subtract two functions</emphasis>
|
||||
221
|
||||
222             <emphasis role="comment">// Operators to multiply a function by a constant (Scaling it)</emphasis>
|
||||
223             <emphasis role="keyword">friend</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo></link> operator*(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo></link>& f, <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& c)
|
||||
224             {
|
||||
225                 <emphasis role="keywordflow">if</emphasis> (c == 1) <emphasis role="keywordflow">return</emphasis> f;
|
||||
226                 <emphasis role="keywordflow">if</emphasis> (c == 0) <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Cannot multiply a function by 0"</emphasis>);
|
||||
227
|
||||
228                 std::vector<int> res;
|
||||
229                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f.constants)
|
||||
230                     res.push_back(c * val);
|
||||
231
|
||||
232                 <emphasis role="keywordflow">return</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo></link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>);
|
||||
233             }
|
||||
234             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo></link>& operator*=(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link>)
|
||||
235             {
|
||||
236                 <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link> == 1) <emphasis role="keywordflow">return</emphasis> *<emphasis role="keyword">this</emphasis>;
|
||||
237                 <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link> == 0) <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Cannot multiply a function by 0"</emphasis>);
|
||||
238
|
||||
239                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link> : this->constants)
|
||||
240                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link> *= <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link>;
|
||||
241
|
||||
242                 <emphasis role="keywordflow">return</emphasis> *<emphasis role="keyword">this</emphasis>;
|
||||
243             }
|
||||
244
|
||||
249             [[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">nodiscard</link>(<emphasis role="stringliteral">"MATH::EXP::Function::differential() returns the differential, the calling object is not changed"</emphasis>)]]
|
||||
250             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link><<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - 1> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ae43c705b427ac1ef27aed061a63e500e">differential</link>() <emphasis role="keyword">const</emphasis>;
|
||||
251
|
||||
257             [[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">nodiscard</link>]] std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ad090de9f6636094f14f1279615fccbc0">get_real_roots</link>(<emphasis role="keyword">const</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link> = <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()) <emphasis role="keyword">const</emphasis>;
|
||||
258
|
||||
264             [[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">nodiscard</link>]] <emphasis role="keywordtype">double</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a5464547daff0c43faccdc40ea480bab4">solve_y</link>(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">double</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">x_val</link>) <emphasis role="keyword">const</emphasis> <emphasis role="keyword">noexcept</emphasis>;
|
||||
265
|
||||
272             [[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">nodiscard</link>]] std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a46b9671c4a29b2b2b34586048a3b795a">solve_x</link>(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">double</emphasis>& y_val, <emphasis role="keyword">const</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link> = <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()) <emphasis role="keyword">const</emphasis>;
|
||||
273         };
|
||||
274
|
||||
280         std::vector<double> QuadraticSolve(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<2></link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>)
|
||||
281         {
|
||||
282             std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>;
|
||||
283
|
||||
284             <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">a</link> = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>.constants[0];
|
||||
285             <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">b</link> = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>.constants[1];
|
||||
286             <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">int</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link> = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>.constants[2];
|
||||
287
|
||||
288             <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">double</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqr_val</link> = <emphasis role="keyword">static_cast<</emphasis><emphasis role="keywordtype">double</emphasis><emphasis role="keyword">></emphasis>(POW(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">b</link>, 2) - (4 * <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">a</link> * <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link>));
|
||||
289
|
||||
290             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqr_val</link> < 0)
|
||||
291             {
|
||||
292                 <emphasis role="keywordflow">return</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>;
|
||||
293             }
|
||||
294
|
||||
295             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>.push_back(((NEGATE(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">b</link>) + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqrt</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqr_val</link>)) / 2 * <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">a</link>));
|
||||
296             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>.push_back(((NEGATE(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">b</link>) - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqrt</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sqr_val</link>)) / 2 * <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">a</link>));
|
||||
297             <emphasis role="keywordflow">return</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>;
|
||||
298         }
|
||||
299
|
||||
300         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> e1, <emphasis role="keywordtype">int</emphasis> e2, <emphasis role="keywordtype">int</emphasis> r = (e1 > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link> ? <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e1</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link>)>
|
||||
301             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<r></link> <emphasis role="keyword">operator</emphasis>+(<emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e1></link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f1</link>, <emphasis role="keyword">const</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<e2></link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f2</link>)
|
||||
302         {
|
||||
303             std::vector<int> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>;
|
||||
304             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e1</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link>)
|
||||
305             {
|
||||
306                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f1</link>.constants)
|
||||
307                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>.<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">push_back</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link>);
|
||||
308
|
||||
309                 <emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e1</link> - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link>;
|
||||
310                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f2</link>.constants)
|
||||
311                 {
|
||||
312                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">res</link>[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>] += <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">val</link>;
|
||||
313                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>++;
|
||||
314                 }
|
||||
315             }
|
||||
316             <emphasis role="keywordflow">else</emphasis>
|
||||
317             {
|
||||
318                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f2.constants)
|
||||
319                     res.push_back(val);
|
||||
320
|
||||
321                 <emphasis role="keywordtype">int</emphasis> i = e2 - e1;
|
||||
322                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f1.constants)
|
||||
323                 {
|
||||
324                     res[i] += val;
|
||||
325                     i++;
|
||||
326                 }
|
||||
327             }
|
||||
328
|
||||
329             <emphasis role="keywordflow">return</emphasis> Function<r>{res};
|
||||
330         }
|
||||
331
|
||||
332         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> e1, <emphasis role="keywordtype">int</emphasis> e2, <emphasis role="keywordtype">int</emphasis> r = (e1 > e2 ? e1 : e2)>
|
||||
333             Function<r> <emphasis role="keyword">operator</emphasis>-(<emphasis role="keyword">const</emphasis> Function<e1>& f1, <emphasis role="keyword">const</emphasis> Function<e2>& f2)
|
||||
334         {
|
||||
335             std::vector<int> res;
|
||||
336             <emphasis role="keywordflow">if</emphasis> (e1 > e2)
|
||||
337             {
|
||||
338                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f1.constants)
|
||||
339                     res.push_back(val);
|
||||
340
|
||||
341                 <emphasis role="keywordtype">int</emphasis> i = e1 - e2;
|
||||
342                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f2.constants)
|
||||
343                 {
|
||||
344                     res[i] -= val;
|
||||
345                     i++;
|
||||
346                 }
|
||||
347             }
|
||||
348             <emphasis role="keywordflow">else</emphasis>
|
||||
349             {
|
||||
350                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f2.constants)
|
||||
351                     res.push_back(val);
|
||||
352
|
||||
353                 <emphasis role="keywordtype">int</emphasis> i = e2 - e1;
|
||||
354
|
||||
355                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> j = 0; j < i; j++)
|
||||
356                     res[j] *= -1;
|
||||
357
|
||||
358                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& val : f1.constants)
|
||||
359                 {
|
||||
360                     res[i] = val - res[i];
|
||||
361                     i++;
|
||||
362                 }
|
||||
363             }
|
||||
364
|
||||
365             <emphasis role="keywordflow">return</emphasis> Function<r>{res};
|
||||
366         }
|
||||
367
|
||||
368         <emphasis role="keyword">template</emphasis> <<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
369         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::Function</link>(<emphasis role="keyword">const</emphasis> std::vector<int>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>)
|
||||
370         {
|
||||
371             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> < 0)
|
||||
372                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Function template argument must not be less than 0"</emphasis>);
|
||||
373
|
||||
374             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>.size() != <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> + 1)
|
||||
375                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Function<n> must be created with (n+1) integers in vector object"</emphasis>);
|
||||
376
|
||||
377             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>[0] == 0)
|
||||
378                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"First value should not be 0"</emphasis>);
|
||||
379
|
||||
380             constants = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>;
|
||||
381         }
|
||||
382
|
||||
383         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
384         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::Function</link>(std::vector<int>&& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>)
|
||||
385         {
|
||||
386             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> < 0)
|
||||
387                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Function template argument must not be less than 0"</emphasis>);
|
||||
388
|
||||
389             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>.size() != <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> + 1)
|
||||
390                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Function<n> must be created with (n+1) integers in vector object"</emphasis>);
|
||||
391
|
||||
392             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>[0] == 0)
|
||||
393                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"First value should not be 0"</emphasis>);
|
||||
394
|
||||
395             constants = std::move(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>);
|
||||
396         }
|
||||
397
|
||||
398         <emphasis role="keyword">template</emphasis> <<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
399         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::~Function</link>()
|
||||
400         {
|
||||
401             constants.clear();
|
||||
402         }
|
||||
403
|
||||
404         <emphasis role="keyword">template</emphasis> <<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
405         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link><<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - 1> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::differential</link>()<emphasis role="keyword"> const</emphasis>
|
||||
406 <emphasis role="keyword">        </emphasis>{
|
||||
407             <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> == 0)
|
||||
408                 <emphasis role="keywordflow">throw</emphasis> std::logic_error(<emphasis role="stringliteral">"Cannot differentiate a number (Function<0>)"</emphasis>);
|
||||
409
|
||||
410             std::vector<int> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">result</link>;
|
||||
411             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> = 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> < <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link>; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>++)
|
||||
412             {
|
||||
413                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">result</link>.push_back(constants[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>] * (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>));
|
||||
414             }
|
||||
415
|
||||
416             <emphasis role="keywordflow">return</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link><<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - 1>{<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">result</link>};
|
||||
417         }
|
||||
418
|
||||
419         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
420         std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::get_real_roots</link>(<emphasis role="keyword">const</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>)<emphasis role="keyword"> const</emphasis>
|
||||
421 <emphasis role="keyword">        </emphasis>{
|
||||
422             <emphasis role="comment">// Create initial random solutions</emphasis>
|
||||
423             std::random_device <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>;
|
||||
424             std::uniform_real_distribution<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.min_range, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.max_range);
|
||||
425             std::vector<GA_Solution<lrgst_expo>> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>;
|
||||
426
|
||||
427             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.resize(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.data_size);
|
||||
428             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> = 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> < <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>++)
|
||||
429                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>] = (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">GA_Solution<lrgst_expo></link>{0, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>)});
|
||||
430
|
||||
431             <emphasis role="keywordtype">float</emphasis> timer{ 0 };
|
||||
432
|
||||
433             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> = 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> < <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.num_of_generations; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link>++)
|
||||
434             {
|
||||
435                 std::generate(std::execution::par, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin() + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(), [&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>, &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>]() {
|
||||
436                     return GA_Solution<lrgst_expo>{0, unif(device)};
|
||||
437                     });
|
||||
438
|
||||
439                 <emphasis role="comment">// Run our fitness function</emphasis>
|
||||
440                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>) { <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>.fitness(constants); }
|
||||
441
|
||||
442                 <emphasis role="comment">// Sort our solutions by rank</emphasis>
|
||||
443                 std::sort(std::execution::par, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(),
|
||||
444                     [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lhs</link>, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">rhs</link>) {
|
||||
445                         return lhs.rank > rhs.rank;
|
||||
446                     });
|
||||
447
|
||||
448                 <emphasis role="comment">// Take top solutions</emphasis>
|
||||
449                 std::vector<GA_Solution<lrgst_expo>> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>;
|
||||
450                 std::copy(
|
||||
451                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(),
|
||||
452                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin() + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size,
|
||||
453                     std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>)
|
||||
454                 );
|
||||
455                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.clear();
|
||||
456
|
||||
457                 <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> + 1 == <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.num_of_generations)
|
||||
458                 {
|
||||
459                     std::copy(
|
||||
460                         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(),
|
||||
461                         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(),
|
||||
462                         std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
463                     );
|
||||
464                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.clear();
|
||||
465                     <emphasis role="keywordflow">break</emphasis>;
|
||||
466                 }
|
||||
467
|
||||
468                 <emphasis role="comment">// Mutate the top solutions by %</emphasis>
|
||||
469                 std::uniform_real_distribution<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">m</link>((1 - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.mutation_percentage), (1 + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.mutation_percentage));
|
||||
470                 std::for_each(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(), [&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">m</link>, &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>](<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>) {
|
||||
471                     s.x *= m(device);
|
||||
472                     });
|
||||
473
|
||||
474                 <emphasis role="comment">// Cross over not needed as it's only one value</emphasis>
|
||||
475
|
||||
476                 std::copy(
|
||||
477                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(),
|
||||
478                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(),
|
||||
479                     std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
480                 );
|
||||
481                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.clear();
|
||||
482                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.resize(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.data_size);
|
||||
483             }
|
||||
484
|
||||
485             std::sort(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(),
|
||||
486                 [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lhs</link>, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">rhs</link>) {
|
||||
487                     return lhs.x < rhs.x;
|
||||
488                 });
|
||||
489
|
||||
490             std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>;
|
||||
491             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
492             {
|
||||
493                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>.push_back(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>.x);
|
||||
494             }
|
||||
495             <emphasis role="keywordflow">return</emphasis> ans;
|
||||
496         }
|
||||
497
|
||||
498         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
499         <emphasis role="keywordtype">double</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::solve_y</link>(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">double</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">x_val</link>) <emphasis role="keyword">const</emphasis> <emphasis role="keyword">noexcept</emphasis>
|
||||
500         {
|
||||
501             std::vector<bool> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">exceptions</link>;
|
||||
502
|
||||
503             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> : constants)
|
||||
504                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">exceptions</link>.push_back(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> != 0);
|
||||
505
|
||||
506             <emphasis role="keywordtype">double</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>{ 0 };
|
||||
507             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> = <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link>; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> >= 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>--)
|
||||
508             {
|
||||
509                 <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">exceptions</link>[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>])
|
||||
510                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link> += constants[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>] * POW(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">x_val</link>, (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>));
|
||||
511             }
|
||||
512
|
||||
513             <emphasis role="keywordflow">return</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>;
|
||||
514         }
|
||||
515
|
||||
516         <emphasis role="keyword">template</emphasis><<emphasis role="keywordtype">int</emphasis> lrgst_expo>
|
||||
517         <emphasis role="keyword">inline</emphasis> std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function<lrgst_expo>::solve_x</link>(<emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">double</emphasis>& y_val, <emphasis role="keyword">const</emphasis> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>)<emphasis role="keyword"> const</emphasis>
|
||||
518 <emphasis role="keyword">        </emphasis>{
|
||||
519             <emphasis role="comment">// Create initial random solutions</emphasis>
|
||||
520             std::random_device <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>;
|
||||
521             std::uniform_real_distribution<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.min_range, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.max_range);
|
||||
522             std::vector<GA_Solution<lrgst_expo>> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>;
|
||||
523
|
||||
524             <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.resize(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.data_size);
|
||||
525             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> = 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link> < <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>++)
|
||||
526                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>[<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">i</link>] = (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">GA_Solution<lrgst_expo></link>{0, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>), y_val});
|
||||
527
|
||||
528             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keywordtype">unsigned</emphasis> <emphasis role="keywordtype">int</emphasis> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> = 0; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> < <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.num_of_generations; <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link>++)
|
||||
529             {
|
||||
530                 std::generate(std::execution::par, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin() + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(), [&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unif</link>, &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>, &y_val]() {
|
||||
531                     return GA_Solution<lrgst_expo>{0, unif(device), y_val};
|
||||
532                     });
|
||||
533
|
||||
534
|
||||
535                 <emphasis role="comment">// Run our fitness function</emphasis>
|
||||
536                 <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>) { <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>.fitness(constants); }
|
||||
537
|
||||
538                 <emphasis role="comment">// Sort our solutions by rank</emphasis>
|
||||
539                 std::sort(std::execution::par, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(),
|
||||
540                     [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lhs</link>, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">rhs</link>) {
|
||||
541                         return lhs.rank > rhs.rank;
|
||||
542                     });
|
||||
543
|
||||
544                 <emphasis role="comment">// Take top solutions</emphasis>
|
||||
545                 std::vector<GA_Solution<lrgst_expo>> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>;
|
||||
546                 std::copy(
|
||||
547                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(),
|
||||
548                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin() + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.sample_size,
|
||||
549                     std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>)
|
||||
550                 );
|
||||
551                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.clear();
|
||||
552
|
||||
553                 <emphasis role="keywordflow">if</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">count</link> + 1 == <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.num_of_generations)
|
||||
554                 {
|
||||
555                     std::copy(
|
||||
556                         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(),
|
||||
557                         <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(),
|
||||
558                         std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
559                     );
|
||||
560                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.clear();
|
||||
561                     <emphasis role="keywordflow">break</emphasis>;
|
||||
562                 }
|
||||
563
|
||||
564                 <emphasis role="comment">// Mutate the top solutions by %</emphasis>
|
||||
565                 std::uniform_real_distribution<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">m</link>((1 - <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.mutation_percentage), (1 + <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.mutation_percentage));
|
||||
566                 std::for_each(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(), [&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">m</link>, &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">device</link>](<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>) {
|
||||
567                     s.x *= m(device);
|
||||
568                     });
|
||||
569
|
||||
570                 <emphasis role="comment">// Cross over not needed as it's only one value</emphasis>
|
||||
571
|
||||
572                 std::copy(
|
||||
573                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.begin(),
|
||||
574                     <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.end(),
|
||||
575                     std::back_inserter(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
576                 );
|
||||
577                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">sample</link>.clear();
|
||||
578                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.resize(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>.data_size);
|
||||
579             }
|
||||
580
|
||||
581             std::sort(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.begin(), <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>.end(),
|
||||
582                 [](<emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lhs</link>, <emphasis role="keyword">const</emphasis> <emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">rhs</link>) {
|
||||
583                     return lhs.x < rhs.x;
|
||||
584                 });
|
||||
585
|
||||
586             std::vector<double> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>;
|
||||
587             <emphasis role="keywordflow">for</emphasis> (<emphasis role="keyword">auto</emphasis>& <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link> : <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">solutions</link>)
|
||||
588             {
|
||||
589                 <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">ans</link>.push_back(<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">s</link>.x);
|
||||
590             }
|
||||
591             <emphasis role="keywordflow">return</emphasis> ans;
|
||||
592         }
|
||||
593     }
|
||||
594 }
|
||||
595
|
||||
596 <emphasis role="preprocessor">#endif </emphasis><emphasis role="comment">// !JONATHAN_RAMPERSAD_EXPONENTIAL_H_</emphasis>
|
||||
</programlisting></section>
|
8
docs/docbook/annotated.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_annotated" xml:lang="en-US">
|
||||
<title>Class List</title>
|
||||
Here are the classes, structs, unions and interfaces with brief descriptions:<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></link>
|
||||
<para>A class representing an Exponential <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> (e.g 2x^2 + 4x - 1), </para>
|
||||
<link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">JRAMPERSAD::EXPONENTIAL::GA_Options</link>
|
||||
<para>Structure for options to be used when running one of the two genetic algorithms in a <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> object </para>
|
||||
</section>
|
@ -0,0 +1,334 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function" xml:lang="en-US">
|
||||
<title>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo > Class Template Reference</title>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary></indexterm>
|
||||
<para>
|
||||
|
||||
<para>A class representing an Exponential <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> (e.g 2x^2 + 4x - 1),. </para>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
<computeroutput>#include <Exponential.h></computeroutput>
|
||||
</para>
|
||||
<simplesect>
|
||||
<title>Public Member Functions </title>
|
||||
<itemizedlist>
|
||||
<listitem><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a0585614da72409acfbed262411ea7882">Function</link> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>)</para>
|
||||
|
||||
<para>Constructor for <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> class. </para>
|
||||
</listitem>
|
||||
<listitem><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a7216329180e93c93204f4061be9e560b">Function</link> (std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> > &&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">constnts</link>)</para>
|
||||
|
||||
<para>Constructor for <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> class. </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a38038a3b3f371ca62098ad4d4c510966"/><emphasis role="strong">Function</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">other</link>)=<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">default</link></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1aaafd98fd5dc5d0f9e4503bed1d49d323"/><emphasis role="strong">Function</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> &&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">other</link>) <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">noexcept</link>=<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">default</link></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a5c6ff5d442c8a74503312fb6bc75a1ff"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> & <emphasis role="strong">operator=</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">other</link>)=<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">default</link></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ac8934939c219d782fd1e02bca393318d"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> & <emphasis role="strong">operator=</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> &&<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">other</link>) <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">noexcept</link>=<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">default</link></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a71628f495a8a26f9584487abf05293b8"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> > & <emphasis role="strong">operator*=</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link>)</para>
|
||||
</listitem>
|
||||
<listitem><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - 1 > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ae43c705b427ac1ef27aed061a63e500e">differential</link> () <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link></para>
|
||||
|
||||
<para>Calculates the differential (dy/dx) of the function. </para>
|
||||
</listitem>
|
||||
<listitem><para>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ad090de9f6636094f14f1279615fccbc0">get_real_roots</link> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>=<link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()) <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link></para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that uses a genetic algorithm to find the approximate roots of the function. </para>
|
||||
</listitem>
|
||||
<listitem><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a5464547daff0c43faccdc40ea480bab4">solve_y</link> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">x_val</link>) <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">noexcept</link></para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that solves for y when x = user value. </para>
|
||||
</listitem>
|
||||
<listitem><para>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a46b9671c4a29b2b2b34586048a3b795a">solve_x</link> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> &y_val, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">options</link>=<link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()) <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link></para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that uses a genetic algorithm to find the values of x where y = user value. </para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<simplesect>
|
||||
<title>Friends </title>
|
||||
<itemizedlist>
|
||||
<listitem><para>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a8f5b8975b6e7318c093a963cd0b43db6">QuadraticSolve</link> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< 2 > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>)</para>
|
||||
|
||||
<para>Uses the quadratic function to solve the roots of an entered quadratic equation. </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a5de27194ad9a38f44771637a0f187562"/>std::ostream & <emphasis role="strong">operator<<</emphasis> (std::ostream &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">os</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">func</link>)</para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a08885f8e67d9d34770121c63c16f2eea"/>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> e1, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> e2, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> r> </para><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">r</link> > <emphasis role="strong">operator+</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e1</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f1</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f2</link>)</para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1afde1d3a278a171c30ff0ff00f65d120e"/>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> e1, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> e2, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> r> </para><para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">r</link> > <emphasis role="strong">operator-</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e1</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f1</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">e2</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f2</link>)</para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ae95957956718c40093891faf8dd52b0e"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> > <emphasis role="strong">operator*</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> > &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">f</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> &<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">c</link>)</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<section>
|
||||
<title>Detailed Description</title>
|
||||
<simplesect><title>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a0585614da72409acfbed262411ea7882">int</link> lrgst_expo><?linebreak?>class JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></title></simplesect>
|
||||
|
||||
<para>A class representing an Exponential <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> (e.g 2x^2 + 4x - 1),. </para>
|
||||
|
||||
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Template Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>lrgst_expo</entry><entry>
|
||||
<para>The largest exponent in the function (e.g 2 means largest exponent is x^2) </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Constructor & Destructor Documentation</title>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a0585614da72409acfbed262411ea7882"/><section>
|
||||
<title>Function()<computeroutput>[1/2]</computeroutput></title>
|
||||
<indexterm><primary>Function</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>Function</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::Function (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> > & constnts)</computeroutput></para><para>
|
||||
|
||||
<para>Constructor for <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> class. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>constnts</entry><entry>
|
||||
<para>An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a7216329180e93c93204f4061be9e560b"/><section>
|
||||
<title>Function()<computeroutput>[2/2]</computeroutput></title>
|
||||
<indexterm><primary>Function</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>Function</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::Function (std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> > && constnts)</computeroutput></para><para>
|
||||
|
||||
<para>Constructor for <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> class. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>constnts</entry><entry>
|
||||
<para>An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<title>Member Function Documentation</title>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ae43c705b427ac1ef27aed061a63e500e"/><section>
|
||||
<title>differential()</title>
|
||||
<indexterm><primary>differential</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>differential</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> - 1 > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::differential ( ) const</computeroutput></para><para>
|
||||
|
||||
<para>Calculates the differential (dy/dx) of the function. </para>
|
||||
</para>
|
||||
|
||||
<para><formalpara><title>Returns</title>
|
||||
|
||||
<para>a function representing the differential (dy/dx) of the calling function object </para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1ad090de9f6636094f14f1279615fccbc0"/><section>
|
||||
<title>get_real_roots()</title>
|
||||
<indexterm><primary>get_real_roots</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>get_real_roots</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::get_real_roots (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> & options = <computeroutput><link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()</computeroutput>
|
||||
) const</computeroutput></para><para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that uses a genetic algorithm to find the approximate roots of the function. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>options</entry><entry>
|
||||
<para><link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> object specifying the options to run the algorithm </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara><title>Returns</title>
|
||||
|
||||
<para>A vector containing a n number of approximate root values (n = sample_size as defined in options) </para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a46b9671c4a29b2b2b34586048a3b795a"/><section>
|
||||
<title>solve_x()</title>
|
||||
<indexterm><primary>solve_x</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>solve_x</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::solve_x (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> & y_val, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> & options = <computeroutput><link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link>()</computeroutput>
|
||||
) const<computeroutput>[inline]</computeroutput></computeroutput></para><para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that uses a genetic algorithm to find the values of x where y = user value. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>y_val</entry><entry>
|
||||
<para>The return value that you would like to find the approximate x values needed to solve when entered into the function </para>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>options</entry><entry>
|
||||
<para><link linkend="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options">GA_Options</link> object specifying the options to run the algorithm </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara><title>Returns</title>
|
||||
|
||||
<para>A vector containing a n number of x values that cause the function to approximately equal the y_val (n = sample_size as defined in options) </para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a5464547daff0c43faccdc40ea480bab4"/><section>
|
||||
<title>solve_y()</title>
|
||||
<indexterm><primary>solve_y</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>solve_y</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">JRAMPERSAD::EXPONENTIAL::Function</link>< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">lrgst_expo</link> >::solve_y (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> & x_val) const<computeroutput>[noexcept]</computeroutput></computeroutput></para><para>
|
||||
|
||||
<para><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> that solves for y when x = user value. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>x_val</entry><entry>
|
||||
<para>the X Value you'd like the function to use </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara><title>Returns</title>
|
||||
|
||||
<para>the Y value the function returns based on the entered X value </para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<title>Friends And Related Symbol Documentation</title>
|
||||
<anchor xml:id="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_1a8f5b8975b6e7318c093a963cd0b43db6"/><section>
|
||||
<title>QuadraticSolve</title>
|
||||
<indexterm><primary>QuadraticSolve</primary><secondary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></secondary></indexterm>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></primary><secondary>QuadraticSolve</secondary></indexterm>
|
||||
<computeroutput>template<<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> lrgst_expo> </computeroutput><para><computeroutput>std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> > QuadraticSolve (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link>< 2 > & f)<computeroutput>[friend]</computeroutput></computeroutput></para><para>
|
||||
|
||||
<para>Uses the quadratic function to solve the roots of an entered quadratic equation. </para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<formalpara>
|
||||
<title>
|
||||
Parameters</title>
|
||||
<para>
|
||||
<table frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colwidth="1*"/>
|
||||
<colspec colwidth="4*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>f</entry><entry>
|
||||
<para>Quadratic function you'd like to find the roots of (Quadratic <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> object is a Function<2> object </para>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara><title>Returns</title>
|
||||
|
||||
<para>a vector containing the roots </para>
|
||||
</formalpara>
|
||||
</para>
|
||||
</section>
|
||||
<para>
|
||||
The documentation for this class was generated from the following file:</para>
|
||||
Exponential/Exponential.h</section>
|
||||
</section>
|
16
docs/docbook/index.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_index" xml:lang="en-US">
|
||||
<info>
|
||||
<title>Exponential Functions</title>
|
||||
</info>
|
||||
<chapter>
|
||||
<title>Class Documentation</title>
|
||||
<xi:include href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</chapter>
|
||||
<chapter>
|
||||
<title>File Documentation</title>
|
||||
<xi:include href="_exponential_8h_source.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</chapter>
|
||||
<index/>
|
||||
</book>
|
@ -0,0 +1,49 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options" xml:lang="en-US">
|
||||
<title>JRAMPERSAD::EXPONENTIAL::GA_Options Struct Reference</title>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::GA_Options</primary></indexterm>
|
||||
<para>
|
||||
|
||||
<para>Structure for options to be used when running one of the two genetic algorithms in a <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> object. </para>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
<computeroutput>#include <Exponential.h></computeroutput>
|
||||
</para>
|
||||
<simplesect>
|
||||
<title>Public Attributes </title>
|
||||
<itemizedlist>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a316979973a2a6b70b00520c2f753a43c"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">min_range</emphasis> = -100</para>
|
||||
|
||||
<para>Minimum value you believe the answer can be. </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a9b8f1e5367f6b0d8b16eecaea53b40e2"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">max_range</emphasis> = 100</para>
|
||||
|
||||
<para>Maximum value you believe the answer can be. </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a4a67bad303f8a4fca40020a0802524c5"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unsigned</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> <emphasis role="strong">num_of_generations</emphasis> = 10</para>
|
||||
|
||||
<para>Number of times you'd like to run the algorithm (increasing this value causes the algorithm to take longer) </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1ad133af29dbbc26b8c3d507d359c03326"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unsigned</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> <emphasis role="strong">sample_size</emphasis> = 1000</para>
|
||||
|
||||
<para>Amount of approximate solutions you'd like to be returned. </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a6ec95fe6cc95dc32727659cf5bb1be12"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">unsigned</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> <emphasis role="strong">data_size</emphasis> = 100000</para>
|
||||
|
||||
<para>Amount of solutions you'd like the algorithm to generate (increasing this value causes the algorithm to take longer) </para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_1a736488b3cfeebda7b93b3e8c6f576bf8"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">mutation_percentage</emphasis> = 0.01</para>
|
||||
|
||||
<para>How much you'd like the algorithm to mutate solutions (Leave this as default in most cases) </para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<section>
|
||||
<title>Detailed Description</title>
|
||||
|
||||
<para>Structure for options to be used when running one of the two genetic algorithms in a <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Function</link> object. </para>
|
||||
<para>
|
||||
The documentation for this struct was generated from the following file:</para>
|
||||
Exponential/Exponential.h</section>
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution" xml:lang="en-US">
|
||||
<title>JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo > Struct Template Reference</title>
|
||||
<indexterm><primary>JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></primary></indexterm>
|
||||
<simplesect>
|
||||
<title>Public Member Functions </title>
|
||||
<itemizedlist>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1a6cf25d21664ed2bd25b37ce771450dc4"/><emphasis role="strong">GA_Solution</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">Rank</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">x_val</link>, <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">y</link>=0)</para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1ac92bb2a2e6a4d39f555b907db40f46b0"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">void</link> <emphasis role="strong">fitness</emphasis> (<link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">const</link> std::vector< <link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">int</link> > &constants)</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<simplesect>
|
||||
<title>Public Attributes </title>
|
||||
<itemizedlist>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1a2e3723b62d3f4bac9e4cc573fd64e84c"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">rank</emphasis></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1a7d57801b01fab757029663439f04af65"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">x</emphasis></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1a9d6a8fae4ccfaeb1ce20afecb67c84ff"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">double</link> <emphasis role="strong">y_val</emphasis></para>
|
||||
</listitem>
|
||||
<listitem><para><anchor xml:id="_struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution_1adc3ef46c48fc4b5a202131921f5c2a5f"/><link linkend="_class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function">bool</link> <emphasis role="strong">ranked</emphasis></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<para>
|
||||
The documentation for this struct was generated from the following file:</para>
|
||||
Exponential/Exponential.h</section>
|
690
docs/html/_exponential_8h_source.html
Normal file
@ -0,0 +1,690 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Exponential/Exponential.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function() { init_codefold(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('_exponential_8h_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Exponential.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#ifndef JONATHAN_RAMPERSAD_EXPONENTIAL_H_</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#define JONATHAN_RAMPERSAD_EXPONENTIAL_H_</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <ostream></span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <vector></span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <float.h></span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <random></span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <algorithm></span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <execution></span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include <exception></span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>JRAMPERSAD</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>{</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">namespace </span>EXPONENTIAL</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> {</div>
|
||||
<div class="foldopen" id="foldopen00021" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html"> 21</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> {</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c"> 24</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c">min_range</a> = -100;</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2"> 26</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2">max_range</a> = 100;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5"> 28</a></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5">num_of_generations</a> = 10;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326"> 30</a></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326">sample_size</a> = 1000;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12"> 32</a></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12">data_size</a> = 100000;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8"> 34</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8">mutation_percentage</a> = 0.01;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">namespace </span>detail</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> {</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> [[nodiscard(<span class="stringliteral">"MATH::ABS(T) returns a value of type T"</span>)]] T ABS(<span class="keyword">const</span> T& n) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> n < 0 ? n * -1 : n;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> [[nodiscard(<span class="stringliteral">"MATH::NEGATE(T) returns a value of type T"</span>)]] T NEGATE(<span class="keyword">const</span> T& n) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> n * -1;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> [[nodiscard(<span class="stringliteral">"MATH::POW(T, int) returns a value of type T"</span>)]] T POW(<span class="keyword">const</span> T& n, <span class="keyword">const</span> <span class="keywordtype">int</span>& exp) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (exp == 0)</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> T res = n;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i < exp; i++)</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> res *= n;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> [[nodiscard(<span class="stringliteral">"MATH::SUM(std::vector<T>) returns a value of type T"</span>)]] T SUM(<span class="keyword">const</span> std::vector<T>& vec) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> T res{};</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : vec)</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> res += val;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> [[nodiscard]] T MEDIAN(std::vector<T> vec) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> std::sort(</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> vec.begin(),</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> vec.end(),</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& lhs, <span class="keyword">const</span> <span class="keyword">auto</span>& rhs) {</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> return lhs < rhs;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> });</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">return</span> vec[vec.size() / 2];</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> }</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> [[nodiscard]] <span class="keywordtype">double</span> MEAN(<span class="keyword">const</span> std::vector<T>& vec) <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">return</span> SUM(vec) / vec.size();</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> [[noreturn]] <span class="keywordtype">void</span> SortASC(std::vector<T>& vec)</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::sort(</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> std::execution::par,</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> vec.begin(), vec.end(),</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& lhs, <span class="keyword">const</span> <span class="keyword">auto</span>& rhs) {</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> return lhs < rhs;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> });</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> [[noreturn]] <span class="keywordtype">void</span> SortDESC(std::vector<T>& vec)</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::sort(</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> std::execution::par,</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> vec.begin(), vec.end(),</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& lhs, <span class="keyword">const</span> <span class="keyword">auto</span>& rhs) {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> return lhs > rhs;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> });</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">template</span> <<span class="keywordtype">int</span> lrgst_expo> <span class="comment">// Genetic Algorithm helper struct</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keyword">struct </span>GA_Solution</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> {</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">double</span> rank, x, y_val;</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordtype">bool</span> ranked;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> GA_Solution() : rank(0), x(0), y_val(0), ranked(false) {}</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> GA_Solution(<span class="keywordtype">double</span> Rank, <span class="keywordtype">double</span> x_val, <span class="keywordtype">double</span> y = 0) : rank(Rank), x(x_val), y_val(y), ranked(false) {}</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">virtual</span> ~GA_Solution() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">void</span> fitness(<span class="keyword">const</span> std::vector<int>& constants)</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordtype">double</span> ans = 0;</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = lrgst_expo; i >= 0; i--)</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> ans += constants[i] * POW(x, (lrgst_expo - i));</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> ans -= y_val;</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> rank = (ans == 0) ? DBL_MAX : ABS(1 / ans);</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> }</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> };</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keyword">using namespace </span>detail;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keyword">template</span> <<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00144" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html"> 144</a></span> <span class="keyword">class </span><a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> {</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> std::vector<int> constants;</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="comment">// Speicialty function to get the real roots of a Quadratic Function without relying on a Genetic Algorithm to approximate</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">friend</span> std::vector<double> <a class="code hl_friend" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">QuadraticSolve</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<2></a>& f);</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>(<span class="keyword">const</span> std::vector<int>& constnts);</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>(std::vector<int>&& constnts);</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>& other) = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>&& other) <span class="keyword">noexcept</span> = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keyword">virtual</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">~Function</a>();</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>& operator=(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>& other) = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>& operator=(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>&& other) <span class="keyword">noexcept</span> = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="comment">// Operator function to display function object in a human readable format</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">friend</span> std::ostream& operator<<(std::ostream& os, <span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo></a> func)</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> {</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">if</span> (lrgst_expo == 0)</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> {</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> os << func.constants[0];</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">return</span> os;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> }</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">if</span> (func.constants[0] == 1)</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> os << <span class="stringliteral">"x"</span>;</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (func.constants[0] == -1)</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> os << <span class="stringliteral">"-x"</span>;</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> os << func.constants[0] << <span class="stringliteral">"x"</span>;</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">if</span> (lrgst_expo != 1)</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> os << <span class="stringliteral">"^"</span> << lrgst_expo;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = lrgst_expo - 1; i > 0; i--)</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> {</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordtype">int</span> n = func.constants[lrgst_expo - i];</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">if</span> (n == 0) <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">auto</span> s = n > 0 ? <span class="stringliteral">" + "</span> : <span class="stringliteral">" - "</span>;</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> </div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">if</span> (n != 1)</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> os << s << ABS(n) << <span class="stringliteral">"x"</span>;</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> os << s << <span class="stringliteral">"x"</span>;</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">if</span> (i != 1)</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> os << <span class="stringliteral">"^"</span> << i;</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> }</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> </div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordtype">int</span> n = func.constants[lrgst_expo];</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">if</span> (n == 0) <span class="keywordflow">return</span> os;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keyword">auto</span> s = n > 0 ? <span class="stringliteral">" + "</span> : <span class="stringliteral">" - "</span>;</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> os << s;</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> os << ABS(n);</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">return</span> os;</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> }</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keyword">template</span><<span class="keywordtype">int</span> e1, <span class="keywordtype">int</span> e2, <span class="keywordtype">int</span> r></div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keyword">friend</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<r></a> operator+(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e1></a>& f1, <span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e2></a>& f2); <span class="comment">// Operator to add two functions</span></div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keyword">template</span><<span class="keywordtype">int</span> e1, <span class="keywordtype">int</span> e2, <span class="keywordtype">int</span> r></div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keyword">friend</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<r></a> operator-(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e1></a>& f1, <span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e2></a>& f2); <span class="comment">// Operator to subtract two functions</span></div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="comment">// Operators to multiply a function by a constant (Scaling it)</span></div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keyword">friend</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo></a> operator*(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo></a>& f, <span class="keyword">const</span> <span class="keywordtype">int</span>& c)</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> {</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">if</span> (c == 1) <span class="keywordflow">return</span> f;</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="keywordflow">if</span> (c == 0) <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Cannot multiply a function by 0"</span>);</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> std::vector<int> res;</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f.constants)</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> res.push_back(c * val);</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo></a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>);</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo></a>& operator*=(<span class="keyword">const</span> <span class="keywordtype">int</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a>)</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> {</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a> == 1) <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a> == 0) <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Cannot multiply a function by 0"</span>);</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a> : this->constants)</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a> *= <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a>;</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> </div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> }</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> </div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> [[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">nodiscard</a>(<span class="stringliteral">"MATH::EXP::Function::differential() returns the differential, the calling object is not changed"</span>)]]</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a><<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - 1> <a class="code hl_function" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">differential</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> [[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">nodiscard</a>]] std::vector<double> <a class="code hl_function" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">get_real_roots</a>(<span class="keyword">const</span> <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a> = <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> </div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> [[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">nodiscard</a>]] <span class="keywordtype">double</span> <a class="code hl_function" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">solve_y</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">x_val</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span>;</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> [[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">nodiscard</a>]] std::vector<double> <a class="code hl_function" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">solve_x</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& y_val, <span class="keyword">const</span> <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a> = <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
|
||||
<div class="foldopen" id="foldopen00280" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6"> 280</a></span> std::vector<double> QuadraticSolve(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<2></a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>)</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> {</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> std::vector<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>;</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> </div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keyword">const</span> <span class="keywordtype">int</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">a</a> = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>.constants[0];</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keyword">const</span> <span class="keywordtype">int</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">b</a> = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>.constants[1];</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keyword">const</span> <span class="keywordtype">int</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a> = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>.constants[2];</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> </div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqr_val</a> = <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(POW(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">b</a>, 2) - (4 * <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">a</a> * <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a>));</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqr_val</a> < 0)</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> {</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>;</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> }</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> </div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>.push_back(((NEGATE(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">b</a>) + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqrt</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqr_val</a>)) / 2 * <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">a</a>));</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>.push_back(((NEGATE(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">b</a>) - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqrt</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sqr_val</a>)) / 2 * <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">a</a>));</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>;</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> </div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <span class="keyword">template</span><<span class="keywordtype">int</span> e1, <span class="keywordtype">int</span> e2, <span class="keywordtype">int</span> r = (e1 > <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a> ? <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e1</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a>)></div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<r></a> <span class="keyword">operator</span>+(<span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e1></a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f1</a>, <span class="keyword">const</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<e2></a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f2</a>)</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> {</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> std::vector<int> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>;</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e1</a> > <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a>)</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> {</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f1</a>.constants)</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>.<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">push_back</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a>);</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> </div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e1</a> - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a>;</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f2</a>.constants)</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> {</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">res</a>[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>] += <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">val</a>;</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>++;</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> }</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> }</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> {</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f2.constants)</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> res.push_back(val);</div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> </div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="keywordtype">int</span> i = e2 - e1;</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f1.constants)</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> {</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> res[i] += val;</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> i++;</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> }</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> }</div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <span class="keywordflow">return</span> Function<r>{res};</div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> }</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> <span class="keyword">template</span><<span class="keywordtype">int</span> e1, <span class="keywordtype">int</span> e2, <span class="keywordtype">int</span> r = (e1 > e2 ? e1 : e2)></div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> Function<r> <span class="keyword">operator</span>-(<span class="keyword">const</span> Function<e1>& f1, <span class="keyword">const</span> Function<e2>& f2)</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> {</div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> std::vector<int> res;</div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keywordflow">if</span> (e1 > e2)</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> {</div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f1.constants)</div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> res.push_back(val);</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> </div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordtype">int</span> i = e1 - e2;</div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f2.constants)</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> {</div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> res[i] -= val;</div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> i++;</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> }</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> }</div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> {</div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f2.constants)</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> res.push_back(val);</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> </div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordtype">int</span> i = e2 - e1;</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> </div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < i; j++)</div>
|
||||
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> res[j] *= -1;</div>
|
||||
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> </div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& val : f1.constants)</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> {</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> res[i] = val - res[i];</div>
|
||||
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> i++;</div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> }</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> }</div>
|
||||
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> </div>
|
||||
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> <span class="keywordflow">return</span> Function<r>{res};</div>
|
||||
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> }</div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> </div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <span class="keyword">template</span> <<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00369" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882"> 369</a></span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::Function</a>(<span class="keyword">const</span> std::vector<int>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>)</div>
|
||||
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> {</div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> < 0)</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Function template argument must not be less than 0"</span>);</div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> </div>
|
||||
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>.size() != <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> + 1)</div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Function<n> must be created with (n+1) integers in vector object"</span>);</div>
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> </div>
|
||||
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>[0] == 0)</div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"First value should not be 0"</span>);</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> </div>
|
||||
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> constants = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>;</div>
|
||||
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> </div>
|
||||
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="keyword">template</span><<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00384" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b"> 384</a></span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::Function</a>(std::vector<int>&& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>)</div>
|
||||
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> {</div>
|
||||
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> < 0)</div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Function template argument must not be less than 0"</span>);</div>
|
||||
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> </div>
|
||||
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>.size() != <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> + 1)</div>
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Function<n> must be created with (n+1) integers in vector object"</span>);</div>
|
||||
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> </div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>[0] == 0)</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"First value should not be 0"</span>);</div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> </div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> constants = std::move(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>);</div>
|
||||
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> </div>
|
||||
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="keyword">template</span> <<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::~Function</a>()</div>
|
||||
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> {</div>
|
||||
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> constants.clear();</div>
|
||||
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> }</div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> </div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <span class="keyword">template</span> <<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00405" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e"> 405</a></span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a><<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - 1> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::differential</a>()<span class="keyword"> const</span></div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span><span class="keyword"> </span>{</div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> == 0)</div>
|
||||
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Cannot differentiate a number (Function<0>)"</span>);</div>
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> </div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> std::vector<int> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">result</a>;</div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> = 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> < <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a>; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>++)</div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> {</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">result</a>.push_back(constants[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>] * (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>));</div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> }</div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> </div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a><<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - 1>{<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">result</a>};</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> </div>
|
||||
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <span class="keyword">template</span><<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00420" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0"> 420</a></span> std::vector<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::get_real_roots</a>(<span class="keyword">const</span> <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>)<span class="keyword"> const</span></div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span><span class="keyword"> </span>{</div>
|
||||
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <span class="comment">// Create initial random solutions</span></div>
|
||||
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> std::random_device <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>;</div>
|
||||
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> std::uniform_real_distribution<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.min_range, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.max_range);</div>
|
||||
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> std::vector<GA_Solution<lrgst_expo>> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>;</div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> </div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.resize(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.data_size);</div>
|
||||
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> = 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> < <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>++)</div>
|
||||
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>] = (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">GA_Solution<lrgst_expo></a>{0, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>)});</div>
|
||||
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> </div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="keywordtype">float</span> timer{ 0 };</div>
|
||||
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
|
||||
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> = 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> < <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.num_of_generations; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a>++)</div>
|
||||
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> {</div>
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> std::generate(std::execution::par, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin() + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(), [&<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>, &<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>]() {</div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> return GA_Solution<lrgst_expo>{0, unif(device)};</div>
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> });</div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> </div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> <span class="comment">// Run our fitness function</span></div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>) { <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>.fitness(constants); }</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> </div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> <span class="comment">// Sort our solutions by rank</span></div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> std::sort(std::execution::par, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(),</div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lhs</a>, <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">rhs</a>) {</div>
|
||||
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> return lhs.rank > rhs.rank;</div>
|
||||
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> });</div>
|
||||
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> </div>
|
||||
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> <span class="comment">// Take top solutions</span></div>
|
||||
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> std::vector<GA_Solution<lrgst_expo>> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>;</div>
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> std::copy(</div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(),</div>
|
||||
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin() + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size,</div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>)</div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> );</div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.clear();</div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> </div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> + 1 == <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.num_of_generations)</div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> {</div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> std::copy(</div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(),</div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(),</div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> );</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.clear();</div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> }</div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> </div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <span class="comment">// Mutate the top solutions by %</span></div>
|
||||
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> std::uniform_real_distribution<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">m</a>((1 - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.mutation_percentage), (1 + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.mutation_percentage));</div>
|
||||
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> std::for_each(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(), [&<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">m</a>, &<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>](<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>) {</div>
|
||||
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> s.x *= m(device);</div>
|
||||
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> });</div>
|
||||
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> </div>
|
||||
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span> <span class="comment">// Cross over not needed as it's only one value</span></div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> </div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> std::copy(</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(),</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(),</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> );</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.clear();</div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.resize(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.data_size);</div>
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> }</div>
|
||||
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> </div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> std::sort(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(),</div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lhs</a>, <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">rhs</a>) {</div>
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> return lhs.x < rhs.x;</div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> });</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> </div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> std::vector<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>;</div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> {</div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>.push_back(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>.x);</div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> }</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keywordflow">return</span> ans;</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> </div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <span class="keyword">template</span><<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00499" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4"> 499</a></span> <span class="keywordtype">double</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::solve_y</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">x_val</a>) <span class="keyword">const</span> <span class="keyword">noexcept</span></div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> {</div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> std::vector<bool> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">exceptions</a>;</div>
|
||||
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> </div>
|
||||
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> : constants)</div>
|
||||
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">exceptions</a>.push_back(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> != 0);</div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> </div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="keywordtype">double</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>{ 0 };</div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> = <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a>; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> >= 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>--)</div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> {</div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">exceptions</a>[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>])</div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a> += constants[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>] * POW(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">x_val</a>, (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>));</div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> }</div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> </div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>;</div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> <span class="keyword">template</span><<span class="keywordtype">int</span> lrgst_expo></div>
|
||||
<div class="foldopen" id="foldopen00517" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"><a class="line" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a"> 517</a></span> <span class="keyword">inline</span> std::vector<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function<lrgst_expo>::solve_x</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>& y_val, <span class="keyword">const</span> <a class="code hl_struct" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>)<span class="keyword"> const</span></div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span><span class="keyword"> </span>{</div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> <span class="comment">// Create initial random solutions</span></div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> std::random_device <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>;</div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> std::uniform_real_distribution<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.min_range, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.max_range);</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> std::vector<GA_Solution<lrgst_expo>> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>;</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> </div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.resize(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.data_size);</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> = 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a> < <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>++)</div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>[<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">i</a>] = (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">GA_Solution<lrgst_expo></a>{0, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>), y_val});</div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> </div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> = 0; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> < <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.num_of_generations; <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a>++)</div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> {</div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> std::generate(std::execution::par, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin() + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(), [&<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unif</a>, &<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>, &y_val]() {</div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> return GA_Solution<lrgst_expo>{0, unif(device), y_val};</div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> });</div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> </div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> </div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> <span class="comment">// Run our fitness function</span></div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>) { <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>.fitness(constants); }</div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> </div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> <span class="comment">// Sort our solutions by rank</span></div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> std::sort(std::execution::par, <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(),</div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lhs</a>, <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">rhs</a>) {</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> return lhs.rank > rhs.rank;</div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> });</div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> </div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <span class="comment">// Take top solutions</span></div>
|
||||
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> std::vector<GA_Solution<lrgst_expo>> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>;</div>
|
||||
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> std::copy(</div>
|
||||
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(),</div>
|
||||
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin() + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.sample_size,</div>
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>)</div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> );</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.clear();</div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> </div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">count</a> + 1 == <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.num_of_generations)</div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> {</div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> std::copy(</div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(),</div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(),</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> );</div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.clear();</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> }</div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> </div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> <span class="comment">// Mutate the top solutions by %</span></div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> std::uniform_real_distribution<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">m</a>((1 - <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.mutation_percentage), (1 + <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.mutation_percentage));</div>
|
||||
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> std::for_each(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(), [&<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">m</a>, &<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">device</a>](<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>) {</div>
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> s.x *= m(device);</div>
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> });</div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> </div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="comment">// Cross over not needed as it's only one value</span></div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> </div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> std::copy(</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.begin(),</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.end(),</div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> std::back_inserter(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> );</div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">sample</a>.clear();</div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.resize(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>.data_size);</div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> }</div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> </div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> std::sort(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.begin(), <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>.end(),</div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> [](<span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lhs</a>, <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">rhs</a>) {</div>
|
||||
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> return lhs.x < rhs.x;</div>
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> });</div>
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> </div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> std::vector<double> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>;</div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a> : <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">solutions</a>)</div>
|
||||
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> {</div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> <a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">ans</a>.push_back(<a class="code hl_class" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">s</a>.x);</div>
|
||||
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> }</div>
|
||||
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> <span class="keywordflow">return</span> ans;</div>
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> }</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span>}</div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> </div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span><span class="preprocessor">#endif </span><span class="comment">// !JONATHAN_RAMPERSAD_EXPONENTIAL_H_</span></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a></div><div class="ttdoc">A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.</div><div class="ttdef"><b>Definition</b> Exponential.h:145</div></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html_a46b9671c4a29b2b2b34586048a3b795a"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">JRAMPERSAD::EXPONENTIAL::Function::solve_x</a></div><div class="ttdeci">std::vector< double > solve_x(const double &y_val, const GA_Options &options=GA_Options()) const</div><div class="ttdoc">Function that uses a genetic algorithm to find the values of x where y = user value.</div><div class="ttdef"><b>Definition</b> Exponential.h:517</div></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html_a5464547daff0c43faccdc40ea480bab4"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">JRAMPERSAD::EXPONENTIAL::Function::solve_y</a></div><div class="ttdeci">double solve_y(const double &x_val) const noexcept</div><div class="ttdoc">Function that solves for y when x = user value.</div><div class="ttdef"><b>Definition</b> Exponential.h:499</div></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html_a8f5b8975b6e7318c093a963cd0b43db6"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">JRAMPERSAD::EXPONENTIAL::Function::QuadraticSolve</a></div><div class="ttdeci">friend std::vector< double > QuadraticSolve(const Function< 2 > &f)</div><div class="ttdoc">Uses the quadratic function to solve the roots of an entered quadratic equation.</div><div class="ttdef"><b>Definition</b> Exponential.h:280</div></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html_ad090de9f6636094f14f1279615fccbc0"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">JRAMPERSAD::EXPONENTIAL::Function::get_real_roots</a></div><div class="ttdeci">std::vector< double > get_real_roots(const GA_Options &options=GA_Options()) const</div><div class="ttdoc">Function that uses a genetic algorithm to find the approximate roots of the function.</div><div class="ttdef"><b>Definition</b> Exponential.h:420</div></div>
|
||||
<div class="ttc" id="aclass_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_html_ae43c705b427ac1ef27aed061a63e500e"><div class="ttname"><a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">JRAMPERSAD::EXPONENTIAL::Function::differential</a></div><div class="ttdeci">Function< lrgst_expo - 1 > differential() const</div><div class="ttdoc">Calculates the differential (dy/dx) of the function.</div><div class="ttdef"><b>Definition</b> Exponential.h:405</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></div><div class="ttdoc">Structure for options to be used when running one of the two genetic algorithms in a Function object.</div><div class="ttdef"><b>Definition</b> Exponential.h:22</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_a316979973a2a6b70b00520c2f753a43c"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c">JRAMPERSAD::EXPONENTIAL::GA_Options::min_range</a></div><div class="ttdeci">double min_range</div><div class="ttdoc">Minimum value you believe the answer can be.</div><div class="ttdef"><b>Definition</b> Exponential.h:24</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_a4a67bad303f8a4fca40020a0802524c5"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5">JRAMPERSAD::EXPONENTIAL::GA_Options::num_of_generations</a></div><div class="ttdeci">unsigned int num_of_generations</div><div class="ttdoc">Number of times you'd like to run the algorithm (increasing this value causes the algorithm to take l...</div><div class="ttdef"><b>Definition</b> Exponential.h:28</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_a6ec95fe6cc95dc32727659cf5bb1be12"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12">JRAMPERSAD::EXPONENTIAL::GA_Options::data_size</a></div><div class="ttdeci">unsigned int data_size</div><div class="ttdoc">Amount of solutions you'd like the algorithm to generate (increasing this value causes the algorithm ...</div><div class="ttdef"><b>Definition</b> Exponential.h:32</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_a736488b3cfeebda7b93b3e8c6f576bf8"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8">JRAMPERSAD::EXPONENTIAL::GA_Options::mutation_percentage</a></div><div class="ttdeci">double mutation_percentage</div><div class="ttdoc">How much you'd like the algorithm to mutate solutions (Leave this as default in most cases)</div><div class="ttdef"><b>Definition</b> Exponential.h:34</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_a9b8f1e5367f6b0d8b16eecaea53b40e2"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2">JRAMPERSAD::EXPONENTIAL::GA_Options::max_range</a></div><div class="ttdeci">double max_range</div><div class="ttdoc">Maximum value you believe the answer can be.</div><div class="ttdef"><b>Definition</b> Exponential.h:26</div></div>
|
||||
<div class="ttc" id="astruct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_html_ad133af29dbbc26b8c3d507d359c03326"><div class="ttname"><a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326">JRAMPERSAD::EXPONENTIAL::GA_Options::sample_size</a></div><div class="ttdeci">unsigned int sample_size</div><div class="ttdoc">Amount of approximate solutions you'd like to be returned.</div><div class="ttdef"><b>Definition</b> Exponential.h:30</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_47b71af010aaa4c53cfa8d8f5b85c863.html">Exponential</a></li><li class="navelem"><b>Exponential.h</b></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
112
docs/html/annotated.html
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('annotated.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Class List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span class="icona"><span class="icon">N</span></span><b>JRAMPERSAD</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">▼</span><span class="icona"><span class="icon">N</span></span><b>EXPONENTIAL</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" target="_self">Function</a></td><td class="desc">A class representing an Exponential <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> (e.g 2x^2 + 4x - 1), </td></tr>
|
||||
<tr id="row_0_0_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html" target="_self">GA_Options</a></td><td class="desc">Structure for options to be used when running one of the two genetic algorithms in a <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> object </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
docs/html/annotated_dup.js
Normal file
@ -0,0 +1,9 @@
|
||||
var annotated_dup =
|
||||
[
|
||||
[ "JRAMPERSAD", null, [
|
||||
[ "EXPONENTIAL", null, [
|
||||
[ "Function", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function" ],
|
||||
[ "GA_Options", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options" ]
|
||||
] ]
|
||||
] ]
|
||||
];
|
BIN
docs/html/bc_s.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
docs/html/bc_sd.png
Normal file
After Width: | Height: | Size: 635 B |
@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo > Member List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">differential</a>() const</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882">Function</a>(const std::vector< int > &constnts)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b">Function</a>(std::vector< int > &&constnts)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>Function</b>(const Function &other)=default (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Function</b>(Function &&other) noexcept=default (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">get_real_roots</a>(const GA_Options &options=GA_Options()) const</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator*</b> (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator*=</b>(const int &c) (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator+</b> (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator-</b> (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator<<</b> (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator=</b>(const Function &other)=default (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator=</b>(Function &&other) noexcept=default (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">QuadraticSolve</a></td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">solve_x</a>(const double &y_val, const GA_Options &options=GA_Options()) const</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">solve_y</a>(const double &x_val) const noexcept</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>~Function</b>() (defined in <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,415 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo > Class Template Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#friends">Friends</a> |
|
||||
<a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function-members.html">List of all members</a> </div>
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo > Class Template Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>A class representing an Exponential <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> (e.g 2x^2 + 4x - 1),.
|
||||
<a href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="_exponential_8h_source.html">Exponential.h</a>></code></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a0585614da72409acfbed262411ea7882" id="r_a0585614da72409acfbed262411ea7882"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882">Function</a> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>)</td></tr>
|
||||
<tr class="memdesc:a0585614da72409acfbed262411ea7882"><td class="mdescLeft"> </td><td class="mdescRight">Constructor for <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> class. <br /></td></tr>
|
||||
<tr class="separator:a0585614da72409acfbed262411ea7882"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7216329180e93c93204f4061be9e560b" id="r_a7216329180e93c93204f4061be9e560b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b">Function</a> (std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> > &&<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">constnts</a>)</td></tr>
|
||||
<tr class="memdesc:a7216329180e93c93204f4061be9e560b"><td class="mdescLeft"> </td><td class="mdescRight">Constructor for <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> class. <br /></td></tr>
|
||||
<tr class="separator:a7216329180e93c93204f4061be9e560b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a38038a3b3f371ca62098ad4d4c510966" id="r_a38038a3b3f371ca62098ad4d4c510966"><td class="memItemLeft" align="right" valign="top"><a id="a38038a3b3f371ca62098ad4d4c510966" name="a38038a3b3f371ca62098ad4d4c510966"></a>
|
||||
 </td><td class="memItemRight" valign="bottom"><b>Function</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">other</a>)=<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">default</a></td></tr>
|
||||
<tr class="separator:a38038a3b3f371ca62098ad4d4c510966"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aaafd98fd5dc5d0f9e4503bed1d49d323" id="r_aaafd98fd5dc5d0f9e4503bed1d49d323"><td class="memItemLeft" align="right" valign="top"><a id="aaafd98fd5dc5d0f9e4503bed1d49d323" name="aaafd98fd5dc5d0f9e4503bed1d49d323"></a>
|
||||
 </td><td class="memItemRight" valign="bottom"><b>Function</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> &&<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">other</a>) <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">noexcept</a>=<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">default</a></td></tr>
|
||||
<tr class="separator:aaafd98fd5dc5d0f9e4503bed1d49d323"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5c6ff5d442c8a74503312fb6bc75a1ff" id="r_a5c6ff5d442c8a74503312fb6bc75a1ff"><td class="memItemLeft" align="right" valign="top"><a id="a5c6ff5d442c8a74503312fb6bc75a1ff" name="a5c6ff5d442c8a74503312fb6bc75a1ff"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">other</a>)=<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">default</a></td></tr>
|
||||
<tr class="separator:a5c6ff5d442c8a74503312fb6bc75a1ff"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac8934939c219d782fd1e02bca393318d" id="r_ac8934939c219d782fd1e02bca393318d"><td class="memItemLeft" align="right" valign="top"><a id="ac8934939c219d782fd1e02bca393318d" name="ac8934939c219d782fd1e02bca393318d"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> &&<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">other</a>) <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">noexcept</a>=<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">default</a></td></tr>
|
||||
<tr class="separator:ac8934939c219d782fd1e02bca393318d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a71628f495a8a26f9584487abf05293b8" id="r_a71628f495a8a26f9584487abf05293b8"><td class="memItemLeft" align="right" valign="top"><a id="a71628f495a8a26f9584487abf05293b8" name="a71628f495a8a26f9584487abf05293b8"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> > & </td><td class="memItemRight" valign="bottom"><b>operator*=</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a>)</td></tr>
|
||||
<tr class="separator:a71628f495a8a26f9584487abf05293b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae43c705b427ac1ef27aed061a63e500e" id="r_ae43c705b427ac1ef27aed061a63e500e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - 1 > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">differential</a> () <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a></td></tr>
|
||||
<tr class="memdesc:ae43c705b427ac1ef27aed061a63e500e"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the differential (dy/dx) of the function. <br /></td></tr>
|
||||
<tr class="separator:ae43c705b427ac1ef27aed061a63e500e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad090de9f6636094f14f1279615fccbc0" id="r_ad090de9f6636094f14f1279615fccbc0"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">get_real_roots</a> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>=<a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()) <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a></td></tr>
|
||||
<tr class="memdesc:ad090de9f6636094f14f1279615fccbc0"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that uses a genetic algorithm to find the approximate roots of the function. <br /></td></tr>
|
||||
<tr class="separator:ad090de9f6636094f14f1279615fccbc0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5464547daff0c43faccdc40ea480bab4" id="r_a5464547daff0c43faccdc40ea480bab4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">solve_y</a> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">x_val</a>) <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">noexcept</a></td></tr>
|
||||
<tr class="memdesc:a5464547daff0c43faccdc40ea480bab4"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that solves for y when x = user value. <br /></td></tr>
|
||||
<tr class="separator:a5464547daff0c43faccdc40ea480bab4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a46b9671c4a29b2b2b34586048a3b795a" id="r_a46b9671c4a29b2b2b34586048a3b795a"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">solve_x</a> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> &y_val, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">options</a>=<a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()) <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a></td></tr>
|
||||
<tr class="memdesc:a46b9671c4a29b2b2b34586048a3b795a"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that uses a genetic algorithm to find the values of x where y = user value. <br /></td></tr>
|
||||
<tr class="separator:a46b9671c4a29b2b2b34586048a3b795a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
|
||||
Friends</h2></td></tr>
|
||||
<tr class="memitem:a8f5b8975b6e7318c093a963cd0b43db6" id="r_a8f5b8975b6e7318c093a963cd0b43db6"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">QuadraticSolve</a> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< 2 > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>)</td></tr>
|
||||
<tr class="memdesc:a8f5b8975b6e7318c093a963cd0b43db6"><td class="mdescLeft"> </td><td class="mdescRight">Uses the quadratic function to solve the roots of an entered quadratic equation. <br /></td></tr>
|
||||
<tr class="separator:a8f5b8975b6e7318c093a963cd0b43db6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5de27194ad9a38f44771637a0f187562" id="r_a5de27194ad9a38f44771637a0f187562"><td class="memItemLeft" align="right" valign="top"><a id="a5de27194ad9a38f44771637a0f187562" name="a5de27194ad9a38f44771637a0f187562"></a>
|
||||
std::ostream & </td><td class="memItemRight" valign="bottom"><b>operator<<</b> (std::ostream &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">os</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> > <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">func</a>)</td></tr>
|
||||
<tr class="separator:a5de27194ad9a38f44771637a0f187562"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a08885f8e67d9d34770121c63c16f2eea" id="r_a08885f8e67d9d34770121c63c16f2eea"><td class="memTemplParams" colspan="2"><a id="a08885f8e67d9d34770121c63c16f2eea" name="a08885f8e67d9d34770121c63c16f2eea"></a>
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> e1, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> e2, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> r> </td></tr>
|
||||
<tr class="memitem:a08885f8e67d9d34770121c63c16f2eea"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">r</a> > </td><td class="memTemplItemRight" valign="bottom"><b>operator+</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e1</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f1</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f2</a>)</td></tr>
|
||||
<tr class="separator:a08885f8e67d9d34770121c63c16f2eea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:afde1d3a278a171c30ff0ff00f65d120e" id="r_afde1d3a278a171c30ff0ff00f65d120e"><td class="memTemplParams" colspan="2"><a id="afde1d3a278a171c30ff0ff00f65d120e" name="afde1d3a278a171c30ff0ff00f65d120e"></a>
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> e1, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> e2, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> r> </td></tr>
|
||||
<tr class="memitem:afde1d3a278a171c30ff0ff00f65d120e"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">r</a> > </td><td class="memTemplItemRight" valign="bottom"><b>operator-</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e1</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f1</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">e2</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f2</a>)</td></tr>
|
||||
<tr class="separator:afde1d3a278a171c30ff0ff00f65d120e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae95957956718c40093891faf8dd52b0e" id="r_ae95957956718c40093891faf8dd52b0e"><td class="memItemLeft" align="right" valign="top"><a id="ae95957956718c40093891faf8dd52b0e" name="ae95957956718c40093891faf8dd52b0e"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> > </td><td class="memItemRight" valign="bottom"><b>operator*</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> > &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">f</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> &<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">c</a>)</td></tr>
|
||||
<tr class="separator:ae95957956718c40093891faf8dd52b0e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><div class="compoundTemplParams">template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882">int</a> lrgst_expo><br />
|
||||
class JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></div><p>A class representing an Exponential <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> (e.g 2x^2 + 4x - 1),. </p>
|
||||
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
||||
<table class="tparams">
|
||||
<tr><td class="paramname">lrgst_expo</td><td>The largest exponent in the function (e.g 2 means largest exponent is x^2) </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a0585614da72409acfbed262411ea7882" name="a0585614da72409acfbed262411ea7882"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0585614da72409acfbed262411ea7882">◆ </a></span>Function() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::Function </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> > & </td>
|
||||
<td class="paramname"><em>constnts</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Constructor for <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> class. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">constnts</td><td>An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7216329180e93c93204f4061be9e560b" name="a7216329180e93c93204f4061be9e560b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7216329180e93c93204f4061be9e560b">◆ </a></span>Function() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::Function </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> > && </td>
|
||||
<td class="paramname"><em>constnts</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Constructor for <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> class. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">constnts</td><td>An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="ae43c705b427ac1ef27aed061a63e500e" name="ae43c705b427ac1ef27aed061a63e500e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae43c705b427ac1ef27aed061a63e500e">◆ </a></span>differential()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> - 1 > <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::differential </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Calculates the differential (dy/dx) of the function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a function representing the differential (dy/dx) of the calling function object </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ad090de9f6636094f14f1279615fccbc0" name="ad090de9f6636094f14f1279615fccbc0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad090de9f6636094f14f1279615fccbc0">◆ </a></span>get_real_roots()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::get_real_roots </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a> & </td>
|
||||
<td class="paramname"><em>options</em> = <code><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()</code></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that uses a genetic algorithm to find the approximate roots of the function. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">options</td><td><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html" title="Structure for options to be used when running one of the two genetic algorithms in a Function object.">GA_Options</a> object specifying the options to run the algorithm </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A vector containing a n number of approximate root values (n = sample_size as defined in options) </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a46b9671c4a29b2b2b34586048a3b795a" name="a46b9671c4a29b2b2b34586048a3b795a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a46b9671c4a29b2b2b34586048a3b795a">◆ </a></span>solve_x()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::solve_x </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> & </td>
|
||||
<td class="paramname"><em>y_val</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a> & </td>
|
||||
<td class="paramname"><em>options</em> = <code><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a>()</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that uses a genetic algorithm to find the values of x where y = user value. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">y_val</td><td>The return value that you would like to find the approximate x values needed to solve when entered into the function </td></tr>
|
||||
<tr><td class="paramname">options</td><td><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html" title="Structure for options to be used when running one of the two genetic algorithms in a Function object.">GA_Options</a> object specifying the options to run the algorithm </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A vector containing a n number of x values that cause the function to approximately equal the y_val (n = sample_size as defined in options) </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a5464547daff0c43faccdc40ea480bab4" name="a5464547daff0c43faccdc40ea480bab4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5464547daff0c43faccdc40ea480bab4">◆ </a></span>solve_y()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">JRAMPERSAD::EXPONENTIAL::Function</a>< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">lrgst_expo</a> >::solve_y </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> & </td>
|
||||
<td class="paramname"><em>x_val</em></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> that solves for y when x = user value. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">x_val</td><td>the X Value you'd like the function to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the Y value the function returns based on the entered X value </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Friends And Related Symbol Documentation</h2>
|
||||
<a id="a8f5b8975b6e7318c093a963cd0b43db6" name="a8f5b8975b6e7318c093a963cd0b43db6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8f5b8975b6e7318c093a963cd0b43db6">◆ </a></span>QuadraticSolve</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> lrgst_expo> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> > QuadraticSolve </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a>< 2 > & </td>
|
||||
<td class="paramname"><em>f</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Uses the quadratic function to solve the roots of an entered quadratic equation. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">f</td><td>Quadratic function you'd like to find the roots of (Quadratic <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> object is a Function<2> object </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a vector containing the roots </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>Exponential/<a class="el" href="_exponential_8h_source.html">Exponential.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><b>JRAMPERSAD</b></li><li class="navelem"><b>EXPONENTIAL</b></li><li class="navelem"><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
var class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function =
|
||||
[
|
||||
[ "Function", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882", null ],
|
||||
[ "Function", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b", null ],
|
||||
[ "differential", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e", null ],
|
||||
[ "get_real_roots", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0", null ],
|
||||
[ "solve_x", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a", null ],
|
||||
[ "solve_y", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4", null ],
|
||||
[ "QuadraticSolve", "class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6", null ]
|
||||
];
|
113
docs/html/classes.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('classes.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Class Index</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_G">G</a></div>
|
||||
<div class="classindex">
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_F" name="letter_F">F</a></dt>
|
||||
<dd><a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Function</a> (JRAMPERSAD::EXPONENTIAL)</dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_G" name="letter_G">G</a></dt>
|
||||
<dd><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a> (JRAMPERSAD::EXPONENTIAL)</dd></dl>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
docs/html/closed.png
Normal file
After Width: | Height: | Size: 132 B |
111
docs/html/dir_47b71af010aaa4c53cfa8d8f5b85c863.html
Normal file
@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Exponential Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('dir_47b71af010aaa4c53cfa8d8f5b85c863.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Exponential Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="_exponential_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><b>Exponential.h</b></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_47b71af010aaa4c53cfa8d8f5b85c863.html">Exponential</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
4
docs/html/dir_47b71af010aaa4c53cfa8d8f5b85c863.js
Normal file
@ -0,0 +1,4 @@
|
||||
var dir_47b71af010aaa4c53cfa8d8f5b85c863 =
|
||||
[
|
||||
[ "Exponential.h", "_exponential_8h_source.html", null ]
|
||||
];
|
12
docs/html/doc.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#4665A2">
|
||||
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
|
||||
</g>
|
||||
<g style="fill:#D8DFEE;stroke-width:0">
|
||||
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
|
||||
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
12
docs/html/docd.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#C4CFE5">
|
||||
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
|
||||
</g>
|
||||
<g style="fill:#4665A2;stroke-width:0">
|
||||
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
|
||||
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
2045
docs/html/doxygen.css
Normal file
28
docs/html/doxygen.svg
Normal file
After Width: | Height: | Size: 15 KiB |
192
docs/html/dynsections.js
Normal file
@ -0,0 +1,192 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
$('table.directory tr').
|
||||
removeClass('odd').filter(':visible:odd').addClass('odd');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
|
||||
var opened=true;
|
||||
// in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes
|
||||
var plusImg = [ "var(--fold-plus-image)", "var(--fold-plus-image-relpath)" ];
|
||||
var minusImg = [ "var(--fold-minus-image)", "var(--fold-minus-image-relpath)" ];
|
||||
|
||||
// toggle all folding blocks
|
||||
function codefold_toggle_all(relPath) {
|
||||
if (opened) {
|
||||
$('#fold_all').css('background-image',plusImg[relPath]);
|
||||
$('div[id^=foldopen]').hide();
|
||||
$('div[id^=foldclosed]').show();
|
||||
} else {
|
||||
$('#fold_all').css('background-image',minusImg[relPath]);
|
||||
$('div[id^=foldopen]').show();
|
||||
$('div[id^=foldclosed]').hide();
|
||||
}
|
||||
opened=!opened;
|
||||
}
|
||||
|
||||
// toggle single folding block
|
||||
function codefold_toggle(id) {
|
||||
$('#foldopen'+id).toggle();
|
||||
$('#foldclosed'+id).toggle();
|
||||
}
|
||||
function init_codefold(relPath) {
|
||||
$('span[class=lineno]').css(
|
||||
{'padding-right':'4px',
|
||||
'margin-right':'2px',
|
||||
'display':'inline-block',
|
||||
'width':'54px',
|
||||
'background':'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%'
|
||||
});
|
||||
// add global toggle to first line
|
||||
$('span[class=lineno]:first').append('<span class="fold" id="fold_all" '+
|
||||
'onclick="javascript:codefold_toggle_all('+relPath+');" '+
|
||||
'style="background-image:'+minusImg[relPath]+';"></span>');
|
||||
// add vertical lines to other rows
|
||||
$('span[class=lineno]').not(':eq(0)').append('<span class="fold"></span>');
|
||||
// add toggle controls to lines with fold divs
|
||||
$('div[class=foldopen]').each(function() {
|
||||
// extract specific id to use
|
||||
var id = $(this).attr('id').replace('foldopen','');
|
||||
// extract start and end foldable fragment attributes
|
||||
var start = $(this).attr('data-start');
|
||||
var end = $(this).attr('data-end');
|
||||
// replace normal fold span with controls for the first line of a foldable fragment
|
||||
$(this).find('span[class=fold]:first').replaceWith('<span class="fold" '+
|
||||
'onclick="javascript:codefold_toggle(\''+id+'\');" '+
|
||||
'style="background-image:'+minusImg[relPath]+';"></span>');
|
||||
// append div for folded (closed) representation
|
||||
$(this).after('<div id="foldclosed'+id+'" class="foldclosed" style="display:none;"></div>');
|
||||
// extract the first line from the "open" section to represent closed content
|
||||
var line = $(this).children().first().clone();
|
||||
// remove any glow that might still be active on the original line
|
||||
$(line).removeClass('glow');
|
||||
if (start) {
|
||||
// if line already ends with a start marker (e.g. trailing {), remove it
|
||||
$(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),''));
|
||||
}
|
||||
// replace minus with plus symbol
|
||||
$(line).find('span[class=fold]').css('background-image',plusImg[relPath]);
|
||||
// append ellipsis
|
||||
$(line).append(' '+start+'<a href="javascript:codefold_toggle(\''+id+'\')">…</a>'+end);
|
||||
// insert constructed line into closed div
|
||||
$('#foldclosed'+id).html(line);
|
||||
});
|
||||
}
|
||||
|
||||
/* @license-end */
|
110
docs/html/files.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: File List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('files.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">File List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_47b71af010aaa4c53cfa8d8f5b85c863.html" target="_self">Exponential</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="_exponential_8h_source.html"><span class="icondoc"></span></a><b>Exponential.h</b></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
4
docs/html/files_dup.js
Normal file
@ -0,0 +1,4 @@
|
||||
var files_dup =
|
||||
[
|
||||
[ "Exponential", "dir_47b71af010aaa4c53cfa8d8f5b85c863.html", "dir_47b71af010aaa4c53cfa8d8f5b85c863" ]
|
||||
];
|
11
docs/html/folderclosed.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#4665A2;">
|
||||
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
|
||||
</g>
|
||||
<g style="fill:#D8DFEE;stroke-width:0;">
|
||||
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
11
docs/html/folderclosedd.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#C4CFE5;">
|
||||
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
|
||||
</g>
|
||||
<g style="fill:#4665A2;stroke-width:0;">
|
||||
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
17
docs/html/folderopen.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#4665A2;">
|
||||
<path
|
||||
d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"
|
||||
id="path2" />
|
||||
</g>
|
||||
<g style="fill:#D8DFEE;stroke-width:0;">
|
||||
<path
|
||||
d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z"
|
||||
id="path199" /><path
|
||||
d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z"
|
||||
id="path201" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
12
docs/html/folderopend.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
<g style="fill:#C4CFE5;">
|
||||
<path d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"/>
|
||||
</g>
|
||||
<g style="fill:#4665A2;stroke-width:0;">
|
||||
<path d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z" />
|
||||
<path d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
115
docs/html/functions.html
Normal file
@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class Members</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('functions.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div><ul>
|
||||
<li>data_size : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>differential() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>Function() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>get_real_roots() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>max_range : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>min_range : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>mutation_percentage : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>num_of_generations : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>QuadraticSolve : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>sample_size : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>solve_x() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>solve_y() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
108
docs/html/functions_func.html
Normal file
@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class Members - Functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('functions_func.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented functions with links to the class documentation for each member:</div><ul>
|
||||
<li>differential() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>Function() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>get_real_roots() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>solve_x() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
<li>solve_y() : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
104
docs/html/functions_rela.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class Members - Related Symbols</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('functions_rela.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented related symbols with links to the class documentation for each member:</div><ul>
|
||||
<li>QuadraticSolve : <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6">JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo ></a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
109
docs/html/functions_vars.html
Normal file
@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Class Members - Variables</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('functions_vars.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented variables with links to the class documentation for each member:</div><ul>
|
||||
<li>data_size : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>max_range : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>min_range : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>mutation_percentage : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>num_of_generations : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
<li>sample_size : <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326">JRAMPERSAD::EXPONENTIAL::GA_Options</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
104
docs/html/index.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Main Page</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Exponential Functions Documentation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
34
docs/html/jquery.js
vendored
Normal file
136
docs/html/menu.js
Normal file
@ -0,0 +1,136 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
var url;
|
||||
var link;
|
||||
link = data.children[i].url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
} else {
|
||||
url = relPath+link;
|
||||
}
|
||||
result+='<li><a href="'+url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var searchBoxHtml;
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<div class="left">'+
|
||||
'<form id="FSearchBox" action="'+relPath+searchPage+
|
||||
'" method="get"><span id="MSearchSelectExt"> </span>'+
|
||||
'<input type="text" id="MSearchField" name="query" value="" placeholder="'+search+
|
||||
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
|
||||
' onblur="searchBox.OnSearchFieldFocus(false)"/>'+
|
||||
'</form>'+
|
||||
'</div>'+
|
||||
'<div class="right"></div>'+
|
||||
'</div>';
|
||||
} else {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<span class="left">'+
|
||||
'<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()"'+
|
||||
' onmouseout="return searchBox.OnSearchSelectHide()"> </span>'+
|
||||
'<input type="text" id="MSearchField" value="" placeholder="'+search+
|
||||
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
|
||||
'onblur="searchBox.OnSearchFieldFocus(false)" '+
|
||||
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
|
||||
'</span>'+
|
||||
'<span class="right"><a id="MSearchClose" '+
|
||||
'href="javascript:searchBox.CloseResultsWindow()">'+
|
||||
'<img id="MSearchCloseImg" border="0" src="'+relPath+
|
||||
'search/close.svg" alt=""/></a>'+
|
||||
'</span>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
|
||||
'<label class="main-menu-btn" for="main-menu-state">'+
|
||||
'<span class="main-menu-btn-icon"></span> '+
|
||||
'Toggle main menu visibility</label>'+
|
||||
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
|
||||
'</div>');
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchBoxHtml) {
|
||||
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
|
||||
}
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var prevWidth = 0;
|
||||
if ($mainMenuState.length) {
|
||||
function initResizableIfExists() {
|
||||
if (typeof initResizable==='function') initResizable();
|
||||
}
|
||||
// animate mobile menu
|
||||
$mainMenuState.change(function(e) {
|
||||
var $menu = $('#main-menu');
|
||||
var options = { duration: 250, step: initResizableIfExists };
|
||||
if (this.checked) {
|
||||
options['complete'] = function() { $menu.css('display', 'block') };
|
||||
$menu.hide().slideDown(options);
|
||||
} else {
|
||||
options['complete'] = function() { $menu.css('display', 'none') };
|
||||
$menu.show().slideUp(options);
|
||||
}
|
||||
});
|
||||
// set default menu visibility
|
||||
function resetState() {
|
||||
var $menu = $('#main-menu');
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var newWidth = $(window).outerWidth();
|
||||
if (newWidth!=prevWidth) {
|
||||
if ($(window).outerWidth()<768) {
|
||||
$mainMenuState.prop('checked',false); $menu.hide();
|
||||
$('#searchBoxPos1').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').hide();
|
||||
} else {
|
||||
$menu.show();
|
||||
$('#searchBoxPos1').empty();
|
||||
$('#searchBoxPos2').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').show();
|
||||
}
|
||||
if (typeof searchBox!=='undefined') {
|
||||
searchBox.CloseResultsWindow();
|
||||
}
|
||||
prevWidth = newWidth;
|
||||
}
|
||||
}
|
||||
$(window).ready(function() { resetState(); initResizableIfExists(); });
|
||||
$(window).resize(resetState);
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
36
docs/html/menudata.js
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Main Page",url:"index.html"},
|
||||
{text:"Classes",url:"annotated.html",children:[
|
||||
{text:"Class List",url:"annotated.html"},
|
||||
{text:"Class Index",url:"classes.html"},
|
||||
{text:"Class Members",url:"functions.html",children:[
|
||||
{text:"All",url:"functions.html"},
|
||||
{text:"Functions",url:"functions_func.html"},
|
||||
{text:"Variables",url:"functions_vars.html"},
|
||||
{text:"Related Symbols",url:"functions_rela.html"}]}]},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"}]}]}
|
8
docs/html/minus.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 582 B |
8
docs/html/minusd.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 582 B |
BIN
docs/html/nav_f.png
Normal file
After Width: | Height: | Size: 153 B |
BIN
docs/html/nav_fd.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
docs/html/nav_g.png
Normal file
After Width: | Height: | Size: 95 B |
BIN
docs/html/nav_h.png
Normal file
After Width: | Height: | Size: 98 B |
BIN
docs/html/nav_hd.png
Normal file
After Width: | Height: | Size: 114 B |
149
docs/html/navtree.css
Normal file
@ -0,0 +1,149 @@
|
||||
#nav-tree .children_ul {
|
||||
margin:0;
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
#nav-tree ul {
|
||||
list-style:none outside none;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree li {
|
||||
white-space:nowrap;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .plus {
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
#nav-tree .selected {
|
||||
background-image: url('tab_a.png');
|
||||
background-repeat:repeat-x;
|
||||
color: var(--nav-text-active-color);
|
||||
text-shadow: var(--nav-text-active-shadow);
|
||||
}
|
||||
|
||||
#nav-tree .selected .arrow {
|
||||
color: var(--nav-arrow-selected-color);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#nav-tree img {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
border:0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#nav-tree a {
|
||||
text-decoration:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
#nav-tree .label {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font: 12px var(--font-family-nav);
|
||||
}
|
||||
|
||||
#nav-tree .label a {
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
#nav-tree .selected a {
|
||||
text-decoration:none;
|
||||
color:var(--nav-text-active-color);
|
||||
}
|
||||
|
||||
#nav-tree .children_ul {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .item {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
padding: 0px 0px;
|
||||
font-size:14px;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
#doc-content {
|
||||
overflow:auto;
|
||||
display:block;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#side-nav {
|
||||
padding:0 6px 0 0;
|
||||
margin: 0px;
|
||||
display:block;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
width: $width;
|
||||
overflow : hidden;
|
||||
}
|
||||
|
||||
.ui-resizable .ui-resizable-handle {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.ui-resizable-e {
|
||||
background-image:var(--nav-splitbar-image);
|
||||
background-size:100%;
|
||||
background-repeat:repeat-y;
|
||||
background-attachment: scroll;
|
||||
cursor:ew-resize;
|
||||
height:100%;
|
||||
right:0;
|
||||
top:0;
|
||||
width:6px;
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
display:none;
|
||||
font-size:0.1px;
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
#nav-tree-contents {
|
||||
margin: 6px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
background-repeat:repeat-x;
|
||||
background-color: var(--nav-background-color);
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#nav-sync {
|
||||
position:absolute;
|
||||
top:5px;
|
||||
right:24px;
|
||||
z-index:0;
|
||||
}
|
||||
|
||||
#nav-sync img {
|
||||
opacity:0.3;
|
||||
}
|
||||
|
||||
#nav-sync img:hover {
|
||||
opacity:0.9;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
#nav-tree { display: none; }
|
||||
div.ui-resizable-handle { display: none; position: relative; }
|
||||
}
|
||||
|
559
docs/html/navtree.js
Normal file
@ -0,0 +1,559 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var navTreeSubIndices = new Array();
|
||||
var arrowDown = '▼';
|
||||
var arrowRight = '►';
|
||||
|
||||
function getData(varName)
|
||||
{
|
||||
var i = varName.lastIndexOf('/');
|
||||
var n = i>=0 ? varName.substring(i+1) : varName;
|
||||
return eval(n.replace(/\-/g,'_'));
|
||||
}
|
||||
|
||||
function stripPath(uri)
|
||||
{
|
||||
return uri.substring(uri.lastIndexOf('/')+1);
|
||||
}
|
||||
|
||||
function stripPath2(uri)
|
||||
{
|
||||
var i = uri.lastIndexOf('/');
|
||||
var s = uri.substring(i+1);
|
||||
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
|
||||
return m ? uri.substring(i-6) : s;
|
||||
}
|
||||
|
||||
function hashValue()
|
||||
{
|
||||
return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,'');
|
||||
}
|
||||
|
||||
function hashUrl()
|
||||
{
|
||||
return '#'+hashValue();
|
||||
}
|
||||
|
||||
function pathName()
|
||||
{
|
||||
return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, '');
|
||||
}
|
||||
|
||||
function localStorageSupported()
|
||||
{
|
||||
try {
|
||||
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
|
||||
}
|
||||
catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function storeLink(link)
|
||||
{
|
||||
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath',link);
|
||||
}
|
||||
}
|
||||
|
||||
function deleteLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath','');
|
||||
}
|
||||
}
|
||||
|
||||
function cachedLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
return window.localStorage.getItem('navpath');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function getScript(scriptName,func)
|
||||
{
|
||||
var head = document.getElementsByTagName("head")[0];
|
||||
var script = document.createElement('script');
|
||||
script.id = scriptName;
|
||||
script.type = 'text/javascript';
|
||||
script.onload = func;
|
||||
script.src = scriptName+'.js';
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
function createIndent(o,domNode,node,level)
|
||||
{
|
||||
var level=-1;
|
||||
var n = node;
|
||||
while (n.parentNode) { level++; n=n.parentNode; }
|
||||
if (node.childrenData) {
|
||||
var imgNode = document.createElement("span");
|
||||
imgNode.className = 'arrow';
|
||||
imgNode.style.paddingLeft=(16*level).toString()+'px';
|
||||
imgNode.innerHTML=arrowRight;
|
||||
node.plus_img = imgNode;
|
||||
node.expandToggle = document.createElement("a");
|
||||
node.expandToggle.href = "javascript:void(0)";
|
||||
node.expandToggle.onclick = function() {
|
||||
if (node.expanded) {
|
||||
$(node.getChildrenUL()).slideUp("fast");
|
||||
node.plus_img.innerHTML=arrowRight;
|
||||
node.expanded = false;
|
||||
} else {
|
||||
expandNode(o, node, false, true);
|
||||
}
|
||||
}
|
||||
node.expandToggle.appendChild(imgNode);
|
||||
domNode.appendChild(node.expandToggle);
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
span.className = 'arrow';
|
||||
span.style.width = 16*(level+1)+'px';
|
||||
span.innerHTML = ' ';
|
||||
domNode.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
var animationInProgress = false;
|
||||
|
||||
function gotoAnchor(anchor,aname,updateLocation)
|
||||
{
|
||||
var pos, docContent = $('#doc-content');
|
||||
var ancParent = $(anchor.parent());
|
||||
if (ancParent.hasClass('memItemLeft') ||
|
||||
ancParent.hasClass('memtitle') ||
|
||||
ancParent.hasClass('fieldname') ||
|
||||
ancParent.hasClass('fieldtype') ||
|
||||
ancParent.is(':header'))
|
||||
{
|
||||
pos = ancParent.position().top;
|
||||
} else if (anchor.position()) {
|
||||
pos = anchor.position().top;
|
||||
}
|
||||
if (pos) {
|
||||
var dist = Math.abs(Math.min(
|
||||
pos-docContent.offset().top,
|
||||
docContent[0].scrollHeight-
|
||||
docContent.height()-docContent.scrollTop()));
|
||||
animationInProgress=true;
|
||||
docContent.animate({
|
||||
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
|
||||
},Math.max(50,Math.min(500,dist)),function(){
|
||||
if (updateLocation) window.location.href=aname;
|
||||
animationInProgress=false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function newNode(o, po, text, link, childrenData, lastNode)
|
||||
{
|
||||
var node = new Object();
|
||||
node.children = Array();
|
||||
node.childrenData = childrenData;
|
||||
node.depth = po.depth + 1;
|
||||
node.relpath = po.relpath;
|
||||
node.isLast = lastNode;
|
||||
|
||||
node.li = document.createElement("li");
|
||||
po.getChildrenUL().appendChild(node.li);
|
||||
node.parentNode = po;
|
||||
|
||||
node.itemDiv = document.createElement("div");
|
||||
node.itemDiv.className = "item";
|
||||
|
||||
node.labelSpan = document.createElement("span");
|
||||
node.labelSpan.className = "label";
|
||||
|
||||
createIndent(o,node.itemDiv,node,0);
|
||||
node.itemDiv.appendChild(node.labelSpan);
|
||||
node.li.appendChild(node.itemDiv);
|
||||
|
||||
var a = document.createElement("a");
|
||||
node.labelSpan.appendChild(a);
|
||||
node.label = document.createTextNode(text);
|
||||
node.expanded = false;
|
||||
a.appendChild(node.label);
|
||||
if (link) {
|
||||
var url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
link = url;
|
||||
} else {
|
||||
url = node.relpath+link;
|
||||
}
|
||||
a.className = stripPath(link.replace('#',':'));
|
||||
if (link.indexOf('#')!=-1) {
|
||||
var aname = '#'+link.split('#')[1];
|
||||
var srcPage = stripPath(pathName());
|
||||
var targetPage = stripPath(link.split('#')[0]);
|
||||
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
|
||||
a.onclick = function(){
|
||||
storeLink(link);
|
||||
if (!$(a).parent().parent().hasClass('selected'))
|
||||
{
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
$(a).parent().parent().addClass('selected');
|
||||
$(a).parent().parent().attr('id','selected');
|
||||
}
|
||||
var anchor = $(aname);
|
||||
gotoAnchor(anchor,aname,true);
|
||||
};
|
||||
} else {
|
||||
a.href = url;
|
||||
a.onclick = function() { storeLink(link); }
|
||||
}
|
||||
} else {
|
||||
if (childrenData != null)
|
||||
{
|
||||
a.className = "nolink";
|
||||
a.href = "javascript:void(0)";
|
||||
a.onclick = node.expandToggle.onclick;
|
||||
}
|
||||
}
|
||||
|
||||
node.childrenUL = null;
|
||||
node.getChildrenUL = function() {
|
||||
if (!node.childrenUL) {
|
||||
node.childrenUL = document.createElement("ul");
|
||||
node.childrenUL.className = "children_ul";
|
||||
node.childrenUL.style.display = "none";
|
||||
node.li.appendChild(node.childrenUL);
|
||||
}
|
||||
return node.childrenUL;
|
||||
};
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function showRoot()
|
||||
{
|
||||
var headerHeight = $("#top").height();
|
||||
var footerHeight = $("#nav-path").height();
|
||||
var windowHeight = $(window).height() - headerHeight - footerHeight;
|
||||
(function (){ // retry until we can scroll to the selected item
|
||||
try {
|
||||
var navtree=$('#nav-tree');
|
||||
navtree.scrollTo('#selected',100,{offset:-windowHeight/2});
|
||||
} catch (err) {
|
||||
setTimeout(arguments.callee, 0);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
function expandNode(o, node, imm, setFocus)
|
||||
{
|
||||
if (node.childrenData && !node.expanded) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
expandNode(o, node, imm, setFocus);
|
||||
});
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).slideDown("fast");
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
if (setFocus) {
|
||||
$(node.expandToggle).focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function glowEffect(n,duration)
|
||||
{
|
||||
n.addClass('glow').delay(duration).queue(function(next){
|
||||
$(this).removeClass('glow');next();
|
||||
});
|
||||
}
|
||||
|
||||
function highlightAnchor()
|
||||
{
|
||||
var aname = hashUrl();
|
||||
var anchor = $(aname);
|
||||
if (anchor.parent().attr('class')=='memItemLeft'){
|
||||
var rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
|
||||
glowEffect(rows.children(),300); // member without details
|
||||
} else if (anchor.parent().attr('class')=='fieldname'){
|
||||
glowEffect(anchor.parent().parent(),1000); // enum value
|
||||
} else if (anchor.parent().attr('class')=='fieldtype'){
|
||||
glowEffect(anchor.parent().parent(),1000); // struct field
|
||||
} else if (anchor.parent().is(":header")) {
|
||||
glowEffect(anchor.parent(),1000); // section header
|
||||
} else {
|
||||
glowEffect(anchor.next(),1000); // normal member
|
||||
}
|
||||
}
|
||||
|
||||
function selectAndHighlight(hash,n)
|
||||
{
|
||||
var a;
|
||||
if (hash) {
|
||||
var link=stripPath(pathName())+':'+hash.substring(1);
|
||||
a=$('.item a[class$="'+link+'"]');
|
||||
}
|
||||
if (a && a.length) {
|
||||
a.parent().parent().addClass('selected');
|
||||
a.parent().parent().attr('id','selected');
|
||||
highlightAnchor();
|
||||
} else if (n) {
|
||||
$(n.itemDiv).addClass('selected');
|
||||
$(n.itemDiv).attr('id','selected');
|
||||
}
|
||||
var topOffset=5;
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
topOffset+=$('#top').outerHeight();
|
||||
}
|
||||
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
|
||||
topOffset+=25;
|
||||
}
|
||||
$('#nav-sync').css('top',topOffset+'px');
|
||||
showRoot();
|
||||
}
|
||||
|
||||
function showNode(o, node, index, hash)
|
||||
{
|
||||
if (node && node.childrenData) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
showNode(o,node,index,hash);
|
||||
});
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).css({'display':'block'});
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
var n = node.children[o.breadcrumbs[index]];
|
||||
if (index+1<o.breadcrumbs.length) {
|
||||
showNode(o,n,index+1,hash);
|
||||
} else {
|
||||
if (typeof(n.childrenData)==='string') {
|
||||
var varName = n.childrenData;
|
||||
getScript(n.relpath+varName,function(){
|
||||
n.childrenData = getData(varName);
|
||||
node.expanded=false;
|
||||
showNode(o,node,index,hash); // retry with child node expanded
|
||||
});
|
||||
} else {
|
||||
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
|
||||
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
|
||||
expandNode(o, n, true, false);
|
||||
}
|
||||
selectAndHighlight(hash,n);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectAndHighlight(hash);
|
||||
}
|
||||
}
|
||||
|
||||
function removeToInsertLater(element) {
|
||||
var parentNode = element.parentNode;
|
||||
var nextSibling = element.nextSibling;
|
||||
parentNode.removeChild(element);
|
||||
return function() {
|
||||
if (nextSibling) {
|
||||
parentNode.insertBefore(element, nextSibling);
|
||||
} else {
|
||||
parentNode.appendChild(element);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getNode(o, po)
|
||||
{
|
||||
var insertFunction = removeToInsertLater(po.li);
|
||||
po.childrenVisited = true;
|
||||
var l = po.childrenData.length-1;
|
||||
for (var i in po.childrenData) {
|
||||
var nodeData = po.childrenData[i];
|
||||
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
|
||||
i==l);
|
||||
}
|
||||
insertFunction();
|
||||
}
|
||||
|
||||
function gotoNode(o,subIndex,root,hash,relpath)
|
||||
{
|
||||
var nti = navTreeSubIndices[subIndex][root+hash];
|
||||
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
|
||||
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
|
||||
navTo(o,NAVTREE[0][1],"",relpath);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
if (o.breadcrumbs) {
|
||||
o.breadcrumbs.unshift(0); // add 0 for root node
|
||||
showNode(o, o.node, 0, hash);
|
||||
}
|
||||
}
|
||||
|
||||
function navTo(o,root,hash,relpath)
|
||||
{
|
||||
var link = cachedLink();
|
||||
if (link) {
|
||||
var parts = link.split('#');
|
||||
root = parts[0];
|
||||
if (parts.length>1) hash = '#'+parts[1].replace(/[^\w\-]/g,'');
|
||||
else hash='';
|
||||
}
|
||||
if (hash.match(/^#l\d+$/)) {
|
||||
var anchor=$('a[name='+hash.substring(1)+']');
|
||||
glowEffect(anchor.parent(),1000); // line number
|
||||
hash=''; // strip line number anchors
|
||||
}
|
||||
var url=root+hash;
|
||||
var i=-1;
|
||||
while (NAVTREEINDEX[i+1]<=url) i++;
|
||||
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath)
|
||||
} else {
|
||||
getScript(relpath+'navtreeindex'+i,function(){
|
||||
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function showSyncOff(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
|
||||
}
|
||||
|
||||
function showSyncOn(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
|
||||
}
|
||||
|
||||
function toggleSyncButton(relpath)
|
||||
{
|
||||
var navSync = $('#nav-sync');
|
||||
if (navSync.hasClass('sync')) {
|
||||
navSync.removeClass('sync');
|
||||
showSyncOff(navSync,relpath);
|
||||
storeLink(stripPath2(pathName())+hashUrl());
|
||||
} else {
|
||||
navSync.addClass('sync');
|
||||
showSyncOn(navSync,relpath);
|
||||
deleteLink();
|
||||
}
|
||||
}
|
||||
|
||||
var loadTriggered = false;
|
||||
var readyTriggered = false;
|
||||
var loadObject,loadToRoot,loadUrl,loadRelPath;
|
||||
|
||||
$(window).on('load',function(){
|
||||
if (readyTriggered) { // ready first
|
||||
navTo(loadObject,loadToRoot,loadUrl,loadRelPath);
|
||||
showRoot();
|
||||
}
|
||||
loadTriggered=true;
|
||||
});
|
||||
|
||||
function initNavTree(toroot,relpath)
|
||||
{
|
||||
var o = new Object();
|
||||
o.toroot = toroot;
|
||||
o.node = new Object();
|
||||
o.node.li = document.getElementById("nav-tree-contents");
|
||||
o.node.childrenData = NAVTREE;
|
||||
o.node.children = new Array();
|
||||
o.node.childrenUL = document.createElement("ul");
|
||||
o.node.getChildrenUL = function() { return o.node.childrenUL; };
|
||||
o.node.li.appendChild(o.node.childrenUL);
|
||||
o.node.depth = 0;
|
||||
o.node.relpath = relpath;
|
||||
o.node.expanded = false;
|
||||
o.node.isLast = true;
|
||||
o.node.plus_img = document.createElement("span");
|
||||
o.node.plus_img.className = 'arrow';
|
||||
o.node.plus_img.innerHTML = arrowRight;
|
||||
|
||||
if (localStorageSupported()) {
|
||||
var navSync = $('#nav-sync');
|
||||
if (cachedLink()) {
|
||||
showSyncOff(navSync,relpath);
|
||||
navSync.removeClass('sync');
|
||||
} else {
|
||||
showSyncOn(navSync,relpath);
|
||||
}
|
||||
navSync.click(function(){ toggleSyncButton(relpath); });
|
||||
}
|
||||
|
||||
if (loadTriggered) { // load before ready
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
showRoot();
|
||||
} else { // ready before load
|
||||
loadObject = o;
|
||||
loadToRoot = toroot;
|
||||
loadUrl = hashUrl();
|
||||
loadRelPath = relpath;
|
||||
readyTriggered=true;
|
||||
}
|
||||
|
||||
$(window).bind('hashchange', function(){
|
||||
if (window.location.hash && window.location.hash.length>1){
|
||||
var a;
|
||||
if ($(location).attr('hash')){
|
||||
var clslink=stripPath(pathName())+':'+hashValue();
|
||||
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
|
||||
}
|
||||
if (a==null || !$(a).parent().parent().hasClass('selected')){
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
var link=stripPath2(pathName());
|
||||
navTo(o,link,hashUrl(),relpath);
|
||||
} else if (!animationInProgress) {
|
||||
$('#doc-content').scrollTop(0);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
}
|
||||
})
|
||||
|
||||
$("div.toc a[href]").click(function(e) {
|
||||
e.preventDefault();
|
||||
var docContent = $('#doc-content');
|
||||
var aname = $(this).attr("href");
|
||||
gotoAnchor($(aname),aname,true);
|
||||
})
|
||||
}
|
||||
/* @license-end */
|
50
docs/html/navtreedata.js
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var NAVTREE =
|
||||
[
|
||||
[ "Exponential Functions", "index.html", [
|
||||
[ "Classes", "annotated.html", [
|
||||
[ "Class List", "annotated.html", "annotated_dup" ],
|
||||
[ "Class Index", "classes.html", null ],
|
||||
[ "Class Members", "functions.html", [
|
||||
[ "All", "functions.html", null ],
|
||||
[ "Functions", "functions_func.html", null ],
|
||||
[ "Variables", "functions_vars.html", null ],
|
||||
[ "Related Symbols", "functions_rela.html", null ]
|
||||
] ]
|
||||
] ],
|
||||
[ "Files", "files.html", [
|
||||
[ "File List", "files.html", "files_dup" ]
|
||||
] ]
|
||||
] ]
|
||||
];
|
||||
|
||||
var NAVTREEINDEX =
|
||||
[
|
||||
"_exponential_8h_source.html"
|
||||
];
|
||||
|
||||
var SYNCONMSG = 'click to disable panel synchronisation';
|
||||
var SYNCOFFMSG = 'click to enable panel synchronisation';
|
29
docs/html/navtreeindex0.js
Normal file
@ -0,0 +1,29 @@
|
||||
var NAVTREEINDEX0 =
|
||||
{
|
||||
"_exponential_8h_source.html":[1,0,0,0],
|
||||
"annotated.html":[0,0],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html":[0,0,0,0,0],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882":[0,0,0,0,0,0],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a":[0,0,0,0,0,4],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4":[0,0,0,0,0,5],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b":[0,0,0,0,0,1],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6":[0,0,0,0,0,6],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0":[0,0,0,0,0,3],
|
||||
"class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e":[0,0,0,0,0,2],
|
||||
"classes.html":[0,1],
|
||||
"dir_47b71af010aaa4c53cfa8d8f5b85c863.html":[1,0,0],
|
||||
"files.html":[1,0],
|
||||
"functions.html":[0,2,0],
|
||||
"functions_func.html":[0,2,1],
|
||||
"functions_rela.html":[0,2,3],
|
||||
"functions_vars.html":[0,2,2],
|
||||
"index.html":[],
|
||||
"pages.html":[],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html":[0,0,0,0,1],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c":[0,0,0,0,1,2],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5":[0,0,0,0,1,4],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12":[0,0,0,0,1,0],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8":[0,0,0,0,1,3],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2":[0,0,0,0,1,1],
|
||||
"struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326":[0,0,0,0,1,5]
|
||||
};
|
BIN
docs/html/open.png
Normal file
After Width: | Height: | Size: 123 B |
9
docs/html/plus.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 696 B |
9
docs/html/plusd.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 696 B |
155
docs/html/resize.js
Normal file
@ -0,0 +1,155 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var once=1;
|
||||
function initResizable()
|
||||
{
|
||||
var cookie_namespace = 'doxygen';
|
||||
var sidenav,navtree,content,header,barWidth=6,desktop_vp=768,titleHeight;
|
||||
|
||||
function readSetting(cookie)
|
||||
{
|
||||
if (window.chrome) {
|
||||
var val = localStorage.getItem(cookie_namespace+'_width');
|
||||
if (val) return val;
|
||||
} else {
|
||||
var myCookie = cookie_namespace+"_"+cookie+"=";
|
||||
if (document.cookie) {
|
||||
var index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
var valStart = index + myCookie.length;
|
||||
var valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
var val = document.cookie.substring(valStart, valEnd);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 250;
|
||||
}
|
||||
|
||||
function writeSetting(cookie, val)
|
||||
{
|
||||
if (window.chrome) {
|
||||
localStorage.setItem(cookie_namespace+"_width",val);
|
||||
} else {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
|
||||
expiration = date.toGMTString();
|
||||
document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/";
|
||||
}
|
||||
}
|
||||
|
||||
function resizeWidth()
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
}
|
||||
writeSetting('width',sidenavWidth-barWidth);
|
||||
}
|
||||
|
||||
function restoreWidth(navWidth)
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
}
|
||||
sidenav.css({width:navWidth + "px"});
|
||||
}
|
||||
|
||||
function resizeHeight()
|
||||
{
|
||||
var headerHeight = header.outerHeight();
|
||||
var footerHeight = footer.outerHeight();
|
||||
var windowHeight = $(window).height();
|
||||
var contentHeight,navtreeHeight,sideNavHeight;
|
||||
if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */
|
||||
contentHeight = windowHeight - headerHeight - footerHeight;
|
||||
navtreeHeight = contentHeight;
|
||||
sideNavHeight = contentHeight;
|
||||
} else if (page_layout==1) { /* DISABLE_INDEX=YES */
|
||||
contentHeight = windowHeight - footerHeight;
|
||||
navtreeHeight = windowHeight - headerHeight;
|
||||
sideNavHeight = windowHeight;
|
||||
}
|
||||
content.css({height:contentHeight + "px"});
|
||||
navtree.css({height:navtreeHeight + "px"});
|
||||
sidenav.css({height:sideNavHeight + "px"});
|
||||
if (location.hash.slice(1)) {
|
||||
(document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
function collapseExpand()
|
||||
{
|
||||
var newWidth;
|
||||
if (sidenav.width()>0) {
|
||||
newWidth=0;
|
||||
}
|
||||
else {
|
||||
var width = readSetting('width');
|
||||
newWidth = (width>250 && width<$(window).width()) ? width : 250;
|
||||
}
|
||||
restoreWidth(newWidth);
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
writeSetting('width',sidenavWidth-barWidth);
|
||||
}
|
||||
|
||||
header = $("#top");
|
||||
sidenav = $("#side-nav");
|
||||
content = $("#doc-content");
|
||||
navtree = $("#nav-tree");
|
||||
footer = $("#nav-path");
|
||||
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
|
||||
$(sidenav).resizable({ minWidth: 0 });
|
||||
$(window).resize(function() { resizeHeight(); });
|
||||
var device = navigator.userAgent.toLowerCase();
|
||||
var touch_device = device.match(/(iphone|ipod|ipad|android)/);
|
||||
if (touch_device) { /* wider split bar for touch only devices */
|
||||
$(sidenav).css({ paddingRight:'20px' });
|
||||
$('.ui-resizable-e').css({ width:'20px' });
|
||||
$('#nav-sync').css({ right:'34px' });
|
||||
barWidth=20;
|
||||
}
|
||||
var width = readSetting('width');
|
||||
if (width) { restoreWidth(width); } else { resizeWidth(); }
|
||||
resizeHeight();
|
||||
var url = location.href;
|
||||
var i=url.indexOf("#");
|
||||
if (i>=0) window.location.hash=url.substr(i);
|
||||
var _preventDefault = function(evt) { evt.preventDefault(); };
|
||||
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
|
||||
if (once) {
|
||||
$(".ui-resizable-handle").dblclick(collapseExpand);
|
||||
once=0
|
||||
}
|
||||
$(window).on('load',resizeHeight);
|
||||
}
|
||||
/* @license-end */
|
5
docs/html/search/all_0.js
Normal file
@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['data_5fsize_0',['data_size',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['differential_1',['differential',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
4
docs/html/search/all_1.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['function_0',['function',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html',1,'JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo >'],['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882',1,'JRAMPERSAD::EXPONENTIAL::Function::Function(const std::vector< int > &constnts)'],['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b',1,'JRAMPERSAD::EXPONENTIAL::Function::Function(std::vector< int > &&constnts)']]]
|
||||
];
|
5
docs/html/search/all_2.js
Normal file
@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['ga_5foptions_0',['GA_Options',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html',1,'JRAMPERSAD::EXPONENTIAL']]],
|
||||
['get_5freal_5froots_1',['get_real_roots',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
6
docs/html/search/all_3.js
Normal file
@ -0,0 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['max_5frange_0',['max_range',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['min_5frange_1',['min_range',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['mutation_5fpercentage_2',['mutation_percentage',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
4
docs/html/search/all_4.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['num_5fof_5fgenerations_0',['num_of_generations',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
4
docs/html/search/all_5.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['quadraticsolve_0',['QuadraticSolve',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
6
docs/html/search/all_6.js
Normal file
@ -0,0 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['sample_5fsize_0',['sample_size',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['solve_5fx_1',['solve_x',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a',1,'JRAMPERSAD::EXPONENTIAL::Function']]],
|
||||
['solve_5fy_2',['solve_y',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
4
docs/html/search/classes_0.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['function_0',['Function',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html',1,'JRAMPERSAD::EXPONENTIAL']]]
|
||||
];
|
4
docs/html/search/classes_1.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['ga_5foptions_0',['GA_Options',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html',1,'JRAMPERSAD::EXPONENTIAL']]]
|
||||
];
|
18
docs/html/search/close.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 11 11"
|
||||
height="11"
|
||||
width="11"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<path
|
||||
id="path12"
|
||||
d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
|
||||
style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 947 B |
4
docs/html/search/functions_0.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['differential_0',['differential',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ae43c705b427ac1ef27aed061a63e500e',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
4
docs/html/search/functions_1.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['function_0',['function',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a0585614da72409acfbed262411ea7882',1,'JRAMPERSAD::EXPONENTIAL::Function::Function(const std::vector< int > &constnts)'],['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a7216329180e93c93204f4061be9e560b',1,'JRAMPERSAD::EXPONENTIAL::Function::Function(std::vector< int > &&constnts)']]]
|
||||
];
|
4
docs/html/search/functions_2.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['get_5freal_5froots_0',['get_real_roots',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#ad090de9f6636094f14f1279615fccbc0',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
5
docs/html/search/functions_3.js
Normal file
@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['solve_5fx_0',['solve_x',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a46b9671c4a29b2b2b34586048a3b795a',1,'JRAMPERSAD::EXPONENTIAL::Function']]],
|
||||
['solve_5fy_1',['solve_y',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a5464547daff0c43faccdc40ea480bab4',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
24
docs/html/search/mag.svg
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 804 B |
24
docs/html/search/mag_d.svg
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 804 B |
31
docs/html/search/mag_sel.svg
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
/>
|
||||
<path
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 1019 B |
31
docs/html/search/mag_seld.svg
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#c5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#c5C5C5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
/>
|
||||
<path
|
||||
style="fill:none;stroke:#c5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 1019 B |
4
docs/html/search/related_0.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['quadraticsolve_0',['QuadraticSolve',['../class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html#a8f5b8975b6e7318c093a963cd0b43db6',1,'JRAMPERSAD::EXPONENTIAL::Function']]]
|
||||
];
|
291
docs/html/search/search.css
Normal file
@ -0,0 +1,291 @@
|
||||
/*---------------- Search Box positioning */
|
||||
|
||||
#main-menu > li:last-child {
|
||||
/* This <li> object is the parent of the search bar */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/*---------------- Search box styling */
|
||||
|
||||
.SRPage * {
|
||||
font-weight: normal;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
dark-mode-toggle {
|
||||
margin-left: 5px;
|
||||
display: flex;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#MSearchBox {
|
||||
display: inline-block;
|
||||
white-space : nowrap;
|
||||
background: var(--search-background-color);
|
||||
border-radius: 0.65em;
|
||||
box-shadow: var(--search-box-shadow);
|
||||
z-index: 102;
|
||||
}
|
||||
|
||||
#MSearchBox .left {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchSelect {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
background-image: var(--search-magnification-select-image);
|
||||
margin: 0 0 0 0.3em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#MSearchSelectExt {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 10px;
|
||||
height: 19px;
|
||||
background-image: var(--search-magnification-image);
|
||||
margin: 0 0 0 0.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#MSearchField {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 7.5em;
|
||||
height: 19px;
|
||||
margin: 0 0.15em;
|
||||
padding: 0;
|
||||
line-height: 1em;
|
||||
border:none;
|
||||
color: var(--search-foreground-color);
|
||||
outline: none;
|
||||
font-family: var(--font-family-search);
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
@media(hover: none) {
|
||||
/* to avoid zooming on iOS */
|
||||
#MSearchField {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#MSearchBox .right {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchClose {
|
||||
display: none;
|
||||
font-size: inherit;
|
||||
background : none;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
|
||||
#MSearchCloseImg {
|
||||
padding: 0.3em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.MSearchBoxActive #MSearchField {
|
||||
color: var(--search-active-color);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*---------------- Search filter selection */
|
||||
|
||||
#MSearchSelectWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid var(--search-filter-border-color);
|
||||
background-color: var(--search-filter-background-color);
|
||||
z-index: 10001;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.SelectItem {
|
||||
font: 8pt var(--font-family-search);
|
||||
padding-left: 2px;
|
||||
padding-right: 12px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
span.SelectionMark {
|
||||
margin-right: 4px;
|
||||
font-family: var(--font-family-monospace);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem {
|
||||
display: block;
|
||||
outline-style: none;
|
||||
color: var(--search-filter-foreground-color);
|
||||
text-decoration: none;
|
||||
padding-left: 6px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
a.SelectItem:focus,
|
||||
a.SelectItem:active {
|
||||
color: var(--search-filter-foreground-color);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem:hover {
|
||||
color: var(--search-filter-highlight-text-color);
|
||||
background-color: var(--search-filter-highlight-bg-color);
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*---------------- Search results window */
|
||||
|
||||
iframe#MSearchResults {
|
||||
/*width: 60ex;*/
|
||||
height: 15em;
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid var(--search-results-border-color);
|
||||
background-color: var(--search-results-background-color);
|
||||
z-index:10000;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
|
||||
#SRIndex {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.SREntry {
|
||||
font-size: 10pt;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
|
||||
.SRPage .SREntry {
|
||||
font-size: 8pt;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
div.SRPage {
|
||||
margin: 5px 2px;
|
||||
background-color: var(--search-results-background-color);
|
||||
}
|
||||
|
||||
.SRChildren {
|
||||
padding-left: 3ex; padding-bottom: .5em
|
||||
}
|
||||
|
||||
.SRPage .SRChildren {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.SRSymbol {
|
||||
font-weight: bold;
|
||||
color: var(--search-results-foreground-color);
|
||||
font-family: var(--font-family-search);
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRScope {
|
||||
display: block;
|
||||
color: var(--search-results-foreground-color);
|
||||
font-family: var(--font-family-search);
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRSymbol:focus, a.SRSymbol:active,
|
||||
a.SRScope:focus, a.SRScope:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.SRScope {
|
||||
padding-left: 4px;
|
||||
font-family: var(--font-family-search);
|
||||
}
|
||||
|
||||
.SRPage .SRStatus {
|
||||
padding: 2px 5px;
|
||||
font-size: 8pt;
|
||||
font-style: italic;
|
||||
font-family: var(--font-family-search);
|
||||
}
|
||||
|
||||
.SRResult {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.searchresults {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/*---------------- External search page results */
|
||||
|
||||
.pages b {
|
||||
color: white;
|
||||
padding: 5px 5px 3px 5px;
|
||||
background-image: var(--nav-gradient-active-image-parent);
|
||||
background-repeat: repeat-x;
|
||||
text-shadow: 0 1px 1px #000000;
|
||||
}
|
||||
|
||||
.pages {
|
||||
line-height: 17px;
|
||||
margin-left: 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hl {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.searchpages {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
840
docs/html/search/search.js
Normal file
@ -0,0 +1,840 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function convertToId(search)
|
||||
{
|
||||
var result = '';
|
||||
for (i=0;i<search.length;i++)
|
||||
{
|
||||
var c = search.charAt(i);
|
||||
var cn = c.charCodeAt(0);
|
||||
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
|
||||
{
|
||||
result+=c;
|
||||
}
|
||||
else if (cn<16)
|
||||
{
|
||||
result+="_0"+cn.toString(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
result+="_"+cn.toString(16);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getXPos(item)
|
||||
{
|
||||
var x = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
x += item.offsetLeft;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
function getYPos(item)
|
||||
{
|
||||
var y = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
y += item.offsetTop;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
|
||||
/* A class handling everything associated with the search panel.
|
||||
|
||||
Parameters:
|
||||
name - The name of the global variable that will be
|
||||
storing this instance. Is needed to be able to set timeouts.
|
||||
resultPath - path to use for external files
|
||||
*/
|
||||
function SearchBox(name, resultsPath, extension)
|
||||
{
|
||||
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||
if (!extension || extension == "") { extension = ".html"; }
|
||||
|
||||
// ---------- Instance variables
|
||||
this.name = name;
|
||||
this.resultsPath = resultsPath;
|
||||
this.keyTimeout = 0;
|
||||
this.keyTimeoutLength = 500;
|
||||
this.closeSelectionTimeout = 300;
|
||||
this.lastSearchValue = "";
|
||||
this.lastResultsPage = "";
|
||||
this.hideTimeout = 0;
|
||||
this.searchIndex = 0;
|
||||
this.searchActive = false;
|
||||
this.extension = extension;
|
||||
|
||||
// ----------- DOM Elements
|
||||
|
||||
this.DOMSearchField = function()
|
||||
{ return document.getElementById("MSearchField"); }
|
||||
|
||||
this.DOMSearchSelect = function()
|
||||
{ return document.getElementById("MSearchSelect"); }
|
||||
|
||||
this.DOMSearchSelectWindow = function()
|
||||
{ return document.getElementById("MSearchSelectWindow"); }
|
||||
|
||||
this.DOMPopupSearchResults = function()
|
||||
{ return document.getElementById("MSearchResults"); }
|
||||
|
||||
this.DOMPopupSearchResultsWindow = function()
|
||||
{ return document.getElementById("MSearchResultsWindow"); }
|
||||
|
||||
this.DOMSearchClose = function()
|
||||
{ return document.getElementById("MSearchClose"); }
|
||||
|
||||
this.DOMSearchBox = function()
|
||||
{ return document.getElementById("MSearchBox"); }
|
||||
|
||||
// ------------ Event Handlers
|
||||
|
||||
// Called when focus is added or removed from the search field.
|
||||
this.OnSearchFieldFocus = function(isActive)
|
||||
{
|
||||
this.Activate(isActive);
|
||||
}
|
||||
|
||||
this.OnSearchSelectShow = function()
|
||||
{
|
||||
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||
var searchField = this.DOMSearchSelect();
|
||||
|
||||
var left = getXPos(searchField);
|
||||
var top = getYPos(searchField);
|
||||
top += searchField.offsetHeight;
|
||||
|
||||
// show search selection popup
|
||||
searchSelectWindow.style.display='block';
|
||||
searchSelectWindow.style.left = left + 'px';
|
||||
searchSelectWindow.style.top = top + 'px';
|
||||
|
||||
// stop selection hide timer
|
||||
if (this.hideTimeout)
|
||||
{
|
||||
clearTimeout(this.hideTimeout);
|
||||
this.hideTimeout=0;
|
||||
}
|
||||
return false; // to avoid "image drag" default event
|
||||
}
|
||||
|
||||
this.OnSearchSelectHide = function()
|
||||
{
|
||||
this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this),
|
||||
this.closeSelectionTimeout);
|
||||
}
|
||||
|
||||
// Called when the content of the search field is changed.
|
||||
this.OnSearchFieldChange = function(evt)
|
||||
{
|
||||
if (this.keyTimeout) // kill running timer
|
||||
{
|
||||
clearTimeout(this.keyTimeout);
|
||||
this.keyTimeout = 0;
|
||||
}
|
||||
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 || e.keyCode==13)
|
||||
{
|
||||
if (e.shiftKey==1)
|
||||
{
|
||||
this.OnSearchSelectShow();
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
child.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
}
|
||||
else if (e.keyCode==27) // Escape out of the search field
|
||||
{
|
||||
e.stopPropagation();
|
||||
this.DOMSearchField().blur();
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
this.Activate(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// strip whitespaces
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
|
||||
if (searchValue != this.lastSearchValue) // search value has changed
|
||||
{
|
||||
if (searchValue != "") // non-empty search
|
||||
{
|
||||
// set timer for search update
|
||||
this.keyTimeout = setTimeout(this.Search.bind(this),
|
||||
this.keyTimeoutLength);
|
||||
}
|
||||
else // empty search field
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.SelectItemCount = function(id)
|
||||
{
|
||||
var count=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
this.SelectItemSet = function(id)
|
||||
{
|
||||
var i,j=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
var node = child.firstChild;
|
||||
if (j==id)
|
||||
{
|
||||
node.innerHTML='•';
|
||||
}
|
||||
else
|
||||
{
|
||||
node.innerHTML=' ';
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when an search filter selection is made.
|
||||
// set item with index id as the active item
|
||||
this.OnSelectItem = function(id)
|
||||
{
|
||||
this.searchIndex = id;
|
||||
this.SelectItemSet(id);
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||
{
|
||||
this.Search();
|
||||
}
|
||||
}
|
||||
|
||||
this.OnSearchSelectKey = function(evt)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||
{
|
||||
this.searchIndex++;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||
{
|
||||
this.searchIndex--;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==13 || e.keyCode==27)
|
||||
{
|
||||
e.stopPropagation();
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
this.CloseSelectionWindow();
|
||||
this.DOMSearchField().focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------- Actions
|
||||
|
||||
// Closes the results window.
|
||||
this.CloseResultsWindow = function()
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.Activate(false);
|
||||
}
|
||||
|
||||
this.CloseSelectionWindow = function()
|
||||
{
|
||||
this.DOMSearchSelectWindow().style.display = 'none';
|
||||
}
|
||||
|
||||
// Performs a search.
|
||||
this.Search = function()
|
||||
{
|
||||
this.keyTimeout = 0;
|
||||
|
||||
// strip leading whitespace
|
||||
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||
|
||||
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||
var idxChar = searchValue.substr(0, 1).toLowerCase();
|
||||
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
|
||||
{
|
||||
idxChar = searchValue.substr(0, 2);
|
||||
}
|
||||
|
||||
var jsFile;
|
||||
|
||||
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
|
||||
if (idx!=-1)
|
||||
{
|
||||
var hexCode=idx.toString(16);
|
||||
jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js';
|
||||
}
|
||||
|
||||
var loadJS = function(url, impl, loc){
|
||||
var scriptTag = document.createElement('script');
|
||||
scriptTag.src = url;
|
||||
scriptTag.onload = impl;
|
||||
scriptTag.onreadystatechange = impl;
|
||||
loc.appendChild(scriptTag);
|
||||
}
|
||||
|
||||
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||
var domSearchBox = this.DOMSearchBox();
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
var domSearchClose = this.DOMSearchClose();
|
||||
var resultsPath = this.resultsPath;
|
||||
|
||||
var handleResults = function() {
|
||||
document.getElementById("Loading").style.display="none";
|
||||
if (typeof searchData !== 'undefined') {
|
||||
createResults(resultsPath);
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
}
|
||||
|
||||
if (idx!=-1) {
|
||||
searchResults.Search(searchValue);
|
||||
} else { // no file with search results => force empty search results
|
||||
searchResults.Search('====');
|
||||
}
|
||||
|
||||
if (domPopupSearchResultsWindow.style.display!='block')
|
||||
{
|
||||
domSearchClose.style.display = 'inline-block';
|
||||
var left = getXPos(domSearchBox) + 150;
|
||||
var top = getYPos(domSearchBox) + 20;
|
||||
domPopupSearchResultsWindow.style.display = 'block';
|
||||
left -= domPopupSearchResults.offsetWidth;
|
||||
var maxWidth = document.body.clientWidth;
|
||||
var maxHeight = document.body.clientHeight;
|
||||
var width = 300;
|
||||
if (left<10) left=10;
|
||||
if (width+left+8>maxWidth) width=maxWidth-left-8;
|
||||
var height = 400;
|
||||
if (height+top+8>maxHeight) height=maxHeight-top-8;
|
||||
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||
domPopupSearchResultsWindow.style.height = height + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
if (jsFile) {
|
||||
loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow());
|
||||
} else {
|
||||
handleResults();
|
||||
}
|
||||
|
||||
this.lastSearchValue = searchValue;
|
||||
}
|
||||
|
||||
// -------- Activation Functions
|
||||
|
||||
// Activates or deactivates the search panel, resetting things to
|
||||
// their default values if necessary.
|
||||
this.Activate = function(isActive)
|
||||
{
|
||||
if (isActive || // open it
|
||||
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||
)
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||
this.searchActive = true;
|
||||
}
|
||||
else if (!isActive) // directly remove the panel
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||
this.searchActive = false;
|
||||
this.lastSearchValue = ''
|
||||
this.lastResultsPage = '';
|
||||
this.DOMSearchField().value = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// The class that handles everything on the search results page.
|
||||
function SearchResults(name)
|
||||
{
|
||||
// The number of matches from the last run of <Search()>.
|
||||
this.lastMatchCount = 0;
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
|
||||
// Toggles the visibility of the passed element ID.
|
||||
this.FindChildElement = function(id)
|
||||
{
|
||||
var parentElement = document.getElementById(id);
|
||||
var element = parentElement.firstChild;
|
||||
|
||||
while (element && element!=parentElement)
|
||||
{
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
|
||||
{
|
||||
element = element.firstChild;
|
||||
}
|
||||
else if (element.nextSibling)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
element = element.parentNode;
|
||||
}
|
||||
while (element && element!=parentElement && !element.nextSibling);
|
||||
|
||||
if (element && element!=parentElement)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.Toggle = function(id)
|
||||
{
|
||||
var element = this.FindChildElement(id);
|
||||
if (element)
|
||||
{
|
||||
if (element.style.display == 'block')
|
||||
{
|
||||
element.style.display = 'none';
|
||||
}
|
||||
else
|
||||
{
|
||||
element.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Searches for the passed string. If there is no parameter,
|
||||
// it takes it from the URL query.
|
||||
//
|
||||
// Always returns true, since other documents may try to call it
|
||||
// and that may or may not be possible.
|
||||
this.Search = function(search)
|
||||
{
|
||||
if (!search) // get search word from URL
|
||||
{
|
||||
search = window.location.search;
|
||||
search = search.substring(1); // Remove the leading '?'
|
||||
search = unescape(search);
|
||||
}
|
||||
|
||||
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||
search = search.toLowerCase();
|
||||
search = convertToId(search);
|
||||
|
||||
var resultRows = document.getElementsByTagName("div");
|
||||
var matches = 0;
|
||||
|
||||
var i = 0;
|
||||
while (i < resultRows.length)
|
||||
{
|
||||
var row = resultRows.item(i);
|
||||
if (row.className == "SRResult")
|
||||
{
|
||||
var rowMatchName = row.id.toLowerCase();
|
||||
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||
|
||||
if (search.length<=rowMatchName.length &&
|
||||
rowMatchName.substr(0, search.length)==search)
|
||||
{
|
||||
row.style.display = 'block';
|
||||
matches++;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.style.display = 'none';
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
document.getElementById("Searching").style.display='none';
|
||||
if (matches == 0) // no results
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='block';
|
||||
}
|
||||
else // at least one result
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='none';
|
||||
}
|
||||
this.lastMatchCount = matches;
|
||||
return true;
|
||||
}
|
||||
|
||||
// return the first item with index index or higher that is visible
|
||||
this.NavNext = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index++;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.NavPrev = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index--;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.ProcessKeys = function(e)
|
||||
{
|
||||
if (e.type == "keydown")
|
||||
{
|
||||
this.repeatOn = false;
|
||||
this.lastKey = e.keyCode;
|
||||
}
|
||||
else if (e.type == "keypress")
|
||||
{
|
||||
if (!this.repeatOn)
|
||||
{
|
||||
if (this.lastKey) this.repeatOn = true;
|
||||
return false; // ignore first keypress after keydown
|
||||
}
|
||||
}
|
||||
else if (e.type == "keyup")
|
||||
{
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
}
|
||||
return this.lastKey!=0;
|
||||
}
|
||||
|
||||
this.Nav = function(evt,itemIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
var newIndex = itemIndex-1;
|
||||
var focusItem = this.NavPrev(newIndex);
|
||||
if (focusItem)
|
||||
{
|
||||
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||
if (child && child.style.display == 'block') // children visible
|
||||
{
|
||||
var n=0;
|
||||
var tmpElem;
|
||||
while (1) // search for last child
|
||||
{
|
||||
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||
if (tmpElem)
|
||||
{
|
||||
focusItem = tmpElem;
|
||||
}
|
||||
else // found it!
|
||||
{
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (focusItem)
|
||||
{
|
||||
focusItem.focus();
|
||||
}
|
||||
else // return focus to search field
|
||||
{
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = itemIndex+1;
|
||||
var focusItem;
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem && elem.style.display == 'block') // children visible
|
||||
{
|
||||
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||
}
|
||||
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||
if (focusItem) focusItem.focus();
|
||||
}
|
||||
else if (this.lastKey==39) // Right
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'block';
|
||||
}
|
||||
else if (this.lastKey==37) // Left
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'none';
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
e.stopPropagation();
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.NavChild = function(evt,itemIndex,childIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
if (childIndex>0)
|
||||
{
|
||||
var newIndex = childIndex-1;
|
||||
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||
}
|
||||
else // already at first child, jump to parent
|
||||
{
|
||||
document.getElementById('Item'+itemIndex).focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = childIndex+1;
|
||||
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||
if (!elem) // last child, jump to parent next parent
|
||||
{
|
||||
elem = this.NavNext(itemIndex+1);
|
||||
}
|
||||
if (elem)
|
||||
{
|
||||
elem.focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
e.stopPropagation();
|
||||
searchBox.CloseResultsWindow();
|
||||
document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setKeyActions(elem,action)
|
||||
{
|
||||
elem.setAttribute('onkeydown',action);
|
||||
elem.setAttribute('onkeypress',action);
|
||||
elem.setAttribute('onkeyup',action);
|
||||
}
|
||||
|
||||
function setClassAttr(elem,attr)
|
||||
{
|
||||
elem.setAttribute('class',attr);
|
||||
elem.setAttribute('className',attr);
|
||||
}
|
||||
|
||||
function createResults(resultsPath)
|
||||
{
|
||||
var results = document.getElementById("SRResults");
|
||||
results.innerHTML = '';
|
||||
for (var e=0; e<searchData.length; e++)
|
||||
{
|
||||
var id = searchData[e][0];
|
||||
var srResult = document.createElement('div');
|
||||
srResult.setAttribute('id','SR_'+id);
|
||||
setClassAttr(srResult,'SRResult');
|
||||
var srEntry = document.createElement('div');
|
||||
setClassAttr(srEntry,'SREntry');
|
||||
var srLink = document.createElement('a');
|
||||
srLink.setAttribute('id','Item'+e);
|
||||
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||
setClassAttr(srLink,'SRSymbol');
|
||||
srLink.innerHTML = searchData[e][1][0];
|
||||
srEntry.appendChild(srLink);
|
||||
if (searchData[e][1].length==2) // single result
|
||||
{
|
||||
srLink.setAttribute('href',resultsPath+searchData[e][1][1][0]);
|
||||
srLink.setAttribute('onclick','searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][1][1])
|
||||
{
|
||||
srLink.setAttribute('target','_parent');
|
||||
}
|
||||
else
|
||||
{
|
||||
srLink.setAttribute('target','_blank');
|
||||
}
|
||||
var srScope = document.createElement('span');
|
||||
setClassAttr(srScope,'SRScope');
|
||||
srScope.innerHTML = searchData[e][1][1][2];
|
||||
srEntry.appendChild(srScope);
|
||||
}
|
||||
else // multiple results
|
||||
{
|
||||
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||
var srChildren = document.createElement('div');
|
||||
setClassAttr(srChildren,'SRChildren');
|
||||
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||
{
|
||||
var srChild = document.createElement('a');
|
||||
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||
setClassAttr(srChild,'SRScope');
|
||||
srChild.setAttribute('href',resultsPath+searchData[e][1][c+1][0]);
|
||||
srChild.setAttribute('onclick','searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][c+1][1])
|
||||
{
|
||||
srChild.setAttribute('target','_parent');
|
||||
}
|
||||
else
|
||||
{
|
||||
srChild.setAttribute('target','_blank');
|
||||
}
|
||||
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||
srChildren.appendChild(srChild);
|
||||
}
|
||||
srEntry.appendChild(srChildren);
|
||||
}
|
||||
srResult.appendChild(srEntry);
|
||||
results.appendChild(srResult);
|
||||
}
|
||||
}
|
||||
|
||||
function init_search()
|
||||
{
|
||||
var results = document.getElementById("MSearchSelectWindow");
|
||||
results.tabIndex=0;
|
||||
for (var key in indexSectionLabels)
|
||||
{
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('class','SelectItem');
|
||||
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
|
||||
link.href='javascript:void(0)';
|
||||
link.innerHTML='<span class="SelectionMark"> </span>'+indexSectionLabels[key];
|
||||
results.appendChild(link);
|
||||
}
|
||||
searchBox.OnSelectItem(0);
|
||||
|
||||
var input = document.getElementById("MSearchSelect");
|
||||
var searchSelectWindow = document.getElementById("MSearchSelectWindow");
|
||||
input.tabIndex=0;
|
||||
input.addEventListener("keydown", function(event) {
|
||||
if (event.keyCode==13 || event.keyCode==40) {
|
||||
event.preventDefault();
|
||||
if (searchSelectWindow.style.display == 'block') {
|
||||
searchBox.CloseSelectionWindow();
|
||||
} else {
|
||||
searchBox.OnSearchSelectShow();
|
||||
searchBox.DOMSearchSelectWindow().focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/* @license-end */
|
27
docs/html/search/searchdata.js
Normal file
@ -0,0 +1,27 @@
|
||||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "dfgmnqs",
|
||||
1: "fg",
|
||||
2: "dfgs",
|
||||
3: "dmns",
|
||||
4: "q"
|
||||
};
|
||||
|
||||
var indexSectionNames =
|
||||
{
|
||||
0: "all",
|
||||
1: "classes",
|
||||
2: "functions",
|
||||
3: "variables",
|
||||
4: "related"
|
||||
};
|
||||
|
||||
var indexSectionLabels =
|
||||
{
|
||||
0: "All",
|
||||
1: "Classes",
|
||||
2: "Functions",
|
||||
3: "Variables",
|
||||
4: "Friends"
|
||||
};
|
||||
|
4
docs/html/search/variables_0.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['data_5fsize_0',['data_size',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
6
docs/html/search/variables_1.js
Normal file
@ -0,0 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['max_5frange_0',['max_range',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['min_5frange_1',['min_range',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]],
|
||||
['mutation_5fpercentage_2',['mutation_percentage',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
4
docs/html/search/variables_2.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['num_5fof_5fgenerations_0',['num_of_generations',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
4
docs/html/search/variables_3.js
Normal file
@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['sample_5fsize_0',['sample_size',['../struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326',1,'JRAMPERSAD::EXPONENTIAL::GA_Options']]]
|
||||
];
|
BIN
docs/html/splitbar.png
Normal file
After Width: | Height: | Size: 314 B |
BIN
docs/html/splitbard.png
Normal file
After Width: | Height: | Size: 282 B |
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::GA_Options Member List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12">data_size</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2">max_range</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c">min_range</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8">mutation_percentage</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5">num_of_generations</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326">sample_size</a></td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">JRAMPERSAD::EXPONENTIAL::GA_Options</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: JRAMPERSAD::EXPONENTIAL::GA_Options Struct Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-attribs">Public Attributes</a> |
|
||||
<a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options-members.html">List of all members</a> </div>
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::GA_Options Struct Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Structure for options to be used when running one of the two genetic algorithms in a <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> object.
|
||||
<a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="_exponential_8h_source.html">Exponential.h</a>></code></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a316979973a2a6b70b00520c2f753a43c" id="r_a316979973a2a6b70b00520c2f753a43c"><td class="memItemLeft" align="right" valign="top"><a id="a316979973a2a6b70b00520c2f753a43c" name="a316979973a2a6b70b00520c2f753a43c"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>min_range</b> = -100</td></tr>
|
||||
<tr class="memdesc:a316979973a2a6b70b00520c2f753a43c"><td class="mdescLeft"> </td><td class="mdescRight">Minimum value you believe the answer can be. <br /></td></tr>
|
||||
<tr class="separator:a316979973a2a6b70b00520c2f753a43c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9b8f1e5367f6b0d8b16eecaea53b40e2" id="r_a9b8f1e5367f6b0d8b16eecaea53b40e2"><td class="memItemLeft" align="right" valign="top"><a id="a9b8f1e5367f6b0d8b16eecaea53b40e2" name="a9b8f1e5367f6b0d8b16eecaea53b40e2"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>max_range</b> = 100</td></tr>
|
||||
<tr class="memdesc:a9b8f1e5367f6b0d8b16eecaea53b40e2"><td class="mdescLeft"> </td><td class="mdescRight">Maximum value you believe the answer can be. <br /></td></tr>
|
||||
<tr class="separator:a9b8f1e5367f6b0d8b16eecaea53b40e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4a67bad303f8a4fca40020a0802524c5" id="r_a4a67bad303f8a4fca40020a0802524c5"><td class="memItemLeft" align="right" valign="top"><a id="a4a67bad303f8a4fca40020a0802524c5" name="a4a67bad303f8a4fca40020a0802524c5"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unsigned</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> </td><td class="memItemRight" valign="bottom"><b>num_of_generations</b> = 10</td></tr>
|
||||
<tr class="memdesc:a4a67bad303f8a4fca40020a0802524c5"><td class="mdescLeft"> </td><td class="mdescRight">Number of times you'd like to run the algorithm (increasing this value causes the algorithm to take longer) <br /></td></tr>
|
||||
<tr class="separator:a4a67bad303f8a4fca40020a0802524c5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad133af29dbbc26b8c3d507d359c03326" id="r_ad133af29dbbc26b8c3d507d359c03326"><td class="memItemLeft" align="right" valign="top"><a id="ad133af29dbbc26b8c3d507d359c03326" name="ad133af29dbbc26b8c3d507d359c03326"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unsigned</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> </td><td class="memItemRight" valign="bottom"><b>sample_size</b> = 1000</td></tr>
|
||||
<tr class="memdesc:ad133af29dbbc26b8c3d507d359c03326"><td class="mdescLeft"> </td><td class="mdescRight">Amount of approximate solutions you'd like to be returned. <br /></td></tr>
|
||||
<tr class="separator:ad133af29dbbc26b8c3d507d359c03326"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6ec95fe6cc95dc32727659cf5bb1be12" id="r_a6ec95fe6cc95dc32727659cf5bb1be12"><td class="memItemLeft" align="right" valign="top"><a id="a6ec95fe6cc95dc32727659cf5bb1be12" name="a6ec95fe6cc95dc32727659cf5bb1be12"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">unsigned</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> </td><td class="memItemRight" valign="bottom"><b>data_size</b> = 100000</td></tr>
|
||||
<tr class="memdesc:a6ec95fe6cc95dc32727659cf5bb1be12"><td class="mdescLeft"> </td><td class="mdescRight">Amount of solutions you'd like the algorithm to generate (increasing this value causes the algorithm to take longer) <br /></td></tr>
|
||||
<tr class="separator:a6ec95fe6cc95dc32727659cf5bb1be12"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a736488b3cfeebda7b93b3e8c6f576bf8" id="r_a736488b3cfeebda7b93b3e8c6f576bf8"><td class="memItemLeft" align="right" valign="top"><a id="a736488b3cfeebda7b93b3e8c6f576bf8" name="a736488b3cfeebda7b93b3e8c6f576bf8"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>mutation_percentage</b> = 0.01</td></tr>
|
||||
<tr class="memdesc:a736488b3cfeebda7b93b3e8c6f576bf8"><td class="mdescLeft"> </td><td class="mdescRight">How much you'd like the algorithm to mutate solutions (Leave this as default in most cases) <br /></td></tr>
|
||||
<tr class="separator:a736488b3cfeebda7b93b3e8c6f576bf8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Structure for options to be used when running one of the two genetic algorithms in a <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html" title="A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.">Function</a> object. </p>
|
||||
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>Exponential/<a class="el" href="_exponential_8h_source.html">Exponential.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><b>JRAMPERSAD</b></li><li class="navelem"><b>EXPONENTIAL</b></li><li class="navelem"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html">GA_Options</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
var struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options =
|
||||
[
|
||||
[ "data_size", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a6ec95fe6cc95dc32727659cf5bb1be12", null ],
|
||||
[ "max_range", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a9b8f1e5367f6b0d8b16eecaea53b40e2", null ],
|
||||
[ "min_range", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a316979973a2a6b70b00520c2f753a43c", null ],
|
||||
[ "mutation_percentage", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a736488b3cfeebda7b93b3e8c6f576bf8", null ],
|
||||
[ "num_of_generations", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#a4a67bad303f8a4fca40020a0802524c5", null ],
|
||||
[ "sample_size", "struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options.html#ad133af29dbbc26b8c3d507d359c03326", null ]
|
||||
];
|
@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo > Member List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>fitness</b>(const std::vector< int > &constants) (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>GA_Solution</b>() (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>GA_Solution</b>(double Rank, double x_val, double y=0) (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>rank</b> (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>ranked</b> (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>x</b> (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>y_val</b> (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>~GA_Solution</b>()=default (defined in <a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a>)</td><td class="entry"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo ></a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Exponential Functions: JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo > Struct Template Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Exponential Functions
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pub-attribs">Public Attributes</a> |
|
||||
<a href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution-members.html">List of all members</a> </div>
|
||||
<div class="headertitle"><div class="title">JRAMPERSAD::EXPONENTIAL::detail::GA_Solution< lrgst_expo > Struct Template Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a6cf25d21664ed2bd25b37ce771450dc4" id="r_a6cf25d21664ed2bd25b37ce771450dc4"><td class="memItemLeft" align="right" valign="top"><a id="a6cf25d21664ed2bd25b37ce771450dc4" name="a6cf25d21664ed2bd25b37ce771450dc4"></a>
|
||||
 </td><td class="memItemRight" valign="bottom"><b>GA_Solution</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">Rank</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">x_val</a>, <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">y</a>=0)</td></tr>
|
||||
<tr class="separator:a6cf25d21664ed2bd25b37ce771450dc4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac92bb2a2e6a4d39f555b907db40f46b0" id="r_ac92bb2a2e6a4d39f555b907db40f46b0"><td class="memItemLeft" align="right" valign="top"><a id="ac92bb2a2e6a4d39f555b907db40f46b0" name="ac92bb2a2e6a4d39f555b907db40f46b0"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">void</a> </td><td class="memItemRight" valign="bottom"><b>fitness</b> (<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">const</a> std::vector< <a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">int</a> > &constants)</td></tr>
|
||||
<tr class="separator:ac92bb2a2e6a4d39f555b907db40f46b0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a2e3723b62d3f4bac9e4cc573fd64e84c" id="r_a2e3723b62d3f4bac9e4cc573fd64e84c"><td class="memItemLeft" align="right" valign="top"><a id="a2e3723b62d3f4bac9e4cc573fd64e84c" name="a2e3723b62d3f4bac9e4cc573fd64e84c"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>rank</b></td></tr>
|
||||
<tr class="separator:a2e3723b62d3f4bac9e4cc573fd64e84c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7d57801b01fab757029663439f04af65" id="r_a7d57801b01fab757029663439f04af65"><td class="memItemLeft" align="right" valign="top"><a id="a7d57801b01fab757029663439f04af65" name="a7d57801b01fab757029663439f04af65"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>x</b></td></tr>
|
||||
<tr class="separator:a7d57801b01fab757029663439f04af65"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9d6a8fae4ccfaeb1ce20afecb67c84ff" id="r_a9d6a8fae4ccfaeb1ce20afecb67c84ff"><td class="memItemLeft" align="right" valign="top"><a id="a9d6a8fae4ccfaeb1ce20afecb67c84ff" name="a9d6a8fae4ccfaeb1ce20afecb67c84ff"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">double</a> </td><td class="memItemRight" valign="bottom"><b>y_val</b></td></tr>
|
||||
<tr class="separator:a9d6a8fae4ccfaeb1ce20afecb67c84ff"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:adc3ef46c48fc4b5a202131921f5c2a5f" id="r_adc3ef46c48fc4b5a202131921f5c2a5f"><td class="memItemLeft" align="right" valign="top"><a id="adc3ef46c48fc4b5a202131921f5c2a5f" name="adc3ef46c48fc4b5a202131921f5c2a5f"></a>
|
||||
<a class="el" href="class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function.html">bool</a> </td><td class="memItemRight" valign="bottom"><b>ranked</b></td></tr>
|
||||
<tr class="separator:adc3ef46c48fc4b5a202131921f5c2a5f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>Exponential/<a class="el" href="_exponential_8h_source.html">Exponential.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><b>JRAMPERSAD</b></li><li class="navelem"><b>EXPONENTIAL</b></li><li class="navelem"><b>detail</b></li><li class="navelem"><a class="el" href="struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1detail_1_1_g_a___solution.html">GA_Solution</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
docs/html/sync_off.png
Normal file
After Width: | Height: | Size: 853 B |
BIN
docs/html/sync_on.png
Normal file
After Width: | Height: | Size: 845 B |
BIN
docs/html/tab_a.png
Normal file
After Width: | Height: | Size: 142 B |
BIN
docs/html/tab_ad.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
docs/html/tab_b.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
docs/html/tab_bd.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
docs/html/tab_h.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
docs/html/tab_hd.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
docs/html/tab_s.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
docs/html/tab_sd.png
Normal file
After Width: | Height: | Size: 188 B |
1
docs/html/tabs.css
Normal file
27
docs/latex/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
LATEX_CMD?=pdflatex
|
||||
MKIDX_CMD?=makeindex
|
||||
BIBTEX_CMD?=bibtex
|
||||
LATEX_COUNT?=8
|
||||
MANUAL_FILE?=refman
|
||||
|
||||
all: $(MANUAL_FILE).pdf
|
||||
|
||||
pdf: $(MANUAL_FILE).pdf
|
||||
|
||||
$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex
|
||||
$(LATEX_CMD) $(MANUAL_FILE)
|
||||
$(MKIDX_CMD) $(MANUAL_FILE).idx
|
||||
$(LATEX_CMD) $(MANUAL_FILE)
|
||||
latex_count=$(LATEX_COUNT) ; \
|
||||
while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\
|
||||
do \
|
||||
echo "Rerunning latex...." ;\
|
||||
$(LATEX_CMD) $(MANUAL_FILE) ;\
|
||||
latex_count=`expr $$latex_count - 1` ;\
|
||||
done
|
||||
$(MKIDX_CMD) $(MANUAL_FILE).idx
|
||||
$(LATEX_CMD) $(MANUAL_FILE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf
|
555
docs/latex/_exponential_8h_source.tex
Normal file
@ -0,0 +1,555 @@
|
||||
\doxysection{Exponential.\+h}
|
||||
\hypertarget{_exponential_8h_source}{}\label{_exponential_8h_source}\index{Exponential/Exponential.h@{Exponential/Exponential.h}}
|
||||
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
|
||||
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ JONATHAN\_RAMPERSAD\_EXPONENTIAL\_H\_}}
|
||||
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ JONATHAN\_RAMPERSAD\_EXPONENTIAL\_H\_}}
|
||||
\DoxyCodeLine{00004\ }
|
||||
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <ostream>}}
|
||||
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <vector>}}
|
||||
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <float.h>}}
|
||||
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <random>}}
|
||||
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <algorithm>}}
|
||||
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <execution>}}
|
||||
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <exception>}}
|
||||
\DoxyCodeLine{00012\ }
|
||||
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }JRAMPERSAD}
|
||||
\DoxyCodeLine{00014\ \{}
|
||||
\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keyword}{namespace\ }EXPONENTIAL}
|
||||
\DoxyCodeLine{00016\ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}}
|
||||
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_a316979973a2a6b70b00520c2f753a43c}{min\_range}}\ =\ -\/100;}
|
||||
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_a9b8f1e5367f6b0d8b16eecaea53b40e2}{max\_range}}\ =\ 100;}
|
||||
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_a4a67bad303f8a4fca40020a0802524c5}{num\_of\_generations}}\ =\ 10;}
|
||||
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_ad133af29dbbc26b8c3d507d359c03326}{sample\_size}}\ =\ 1000;}
|
||||
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_a6ec95fe6cc95dc32727659cf5bb1be12}{data\_size}}\ =\ 100000;}
|
||||
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options_a736488b3cfeebda7b93b3e8c6f576bf8}{mutation\_percentage}}\ =\ 0.01;}
|
||||
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \};}
|
||||
\DoxyCodeLine{00036\ }
|
||||
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{namespace\ }detail}
|
||||
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard(\textcolor{stringliteral}{"{}MATH::ABS(T)\ returns\ a\ value\ of\ type\ T"{}})]]\ T\ ABS(\textcolor{keyword}{const}\ T\&\ n)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ n\ <\ 0\ ?\ n\ *\ -\/1\ :\ n;}
|
||||
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00044\ }
|
||||
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard(\textcolor{stringliteral}{"{}MATH::NEGATE(T)\ returns\ a\ value\ of\ type\ T"{}})]]\ T\ NEGATE(\textcolor{keyword}{const}\ T\&\ n)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ n\ *\ -\/1;}
|
||||
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00050\ }
|
||||
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard(\textcolor{stringliteral}{"{}MATH::POW(T,\ int)\ returns\ a\ value\ of\ type\ T"{}})]]\ T\ POW(\textcolor{keyword}{const}\ T\&\ n,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ exp)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (exp\ ==\ 0)}
|
||||
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 1;}
|
||||
\DoxyCodeLine{00056\ }
|
||||
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ T\ res\ =\ n;}
|
||||
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 1;\ i\ <\ exp;\ i++)}
|
||||
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res\ *=\ n;}
|
||||
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00062\ }
|
||||
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
|
||||
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00065\ }
|
||||
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard(\textcolor{stringliteral}{"{}MATH::SUM(std::vector<T>)\ returns\ a\ value\ of\ type\ T"{}})]]\ T\ SUM(\textcolor{keyword}{const}\ std::vector<T>\&\ vec)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ T\ res\{\};}
|
||||
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ vec)}
|
||||
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res\ +=\ val;}
|
||||
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ res;}
|
||||
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00074\ }
|
||||
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard]]\ T\ MEDIAN(std::vector<T>\ vec)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(}
|
||||
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vec.begin(),}
|
||||
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vec.end(),}
|
||||
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ lhs,\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ rhs)\ \{}
|
||||
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs\ <\ rhs;}
|
||||
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00084\ }
|
||||
\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ vec[vec.size()\ /\ 2];}
|
||||
\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00087\ }
|
||||
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{double}\ MEAN(\textcolor{keyword}{const}\ std::vector<T>\&\ vec)\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ SUM(vec)\ /\ vec.size();}
|
||||
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00093\ }
|
||||
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \ \ \ \ [[noreturn]]\ \textcolor{keywordtype}{void}\ SortASC(std::vector<T>\&\ vec)}
|
||||
\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(}
|
||||
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::execution::par,}
|
||||
\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vec.begin(),\ vec.end(),}
|
||||
\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ lhs,\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ rhs)\ \{}
|
||||
\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs\ <\ rhs;}
|
||||
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00104\ }
|
||||
\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keyword}{typename}\ T>}
|
||||
\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \ \ \ \ [[noreturn]]\ \textcolor{keywordtype}{void}\ SortDESC(std::vector<T>\&\ vec)}
|
||||
\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(}
|
||||
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::execution::par,}
|
||||
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vec.begin(),\ vec.end(),}
|
||||
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ lhs,\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ rhs)\ \{}
|
||||
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs\ >\ rhs;}
|
||||
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00115\ }
|
||||
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ lrgst\_expo>\ \textcolor{comment}{//\ Genetic\ Algorithm\ helper\ struct}}
|
||||
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }GA\_Solution}
|
||||
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ rank,\ x,\ y\_val;}
|
||||
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ ranked;}
|
||||
\DoxyCodeLine{00121\ }
|
||||
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GA\_Solution()\ :\ rank(0),\ x(0),\ y\_val(0),\ ranked(false)\ \{\}}
|
||||
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ GA\_Solution(\textcolor{keywordtype}{double}\ Rank,\ \textcolor{keywordtype}{double}\ x\_val,\ \textcolor{keywordtype}{double}\ y\ =\ 0)\ :\ rank(Rank),\ x(x\_val),\ y\_val(y),\ ranked(false)\ \{\}}
|
||||
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \string~GA\_Solution()\ =\ \textcolor{keywordflow}{default};}
|
||||
\DoxyCodeLine{00125\ }
|
||||
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ fitness(\textcolor{keyword}{const}\ std::vector<int>\&\ constants)}
|
||||
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ ans\ =\ 0;}
|
||||
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ lrgst\_expo;\ i\ >=\ 0;\ i-\/-\/)}
|
||||
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ans\ +=\ constants[i]\ *\ POW(x,\ (lrgst\_expo\ -\/\ i));}
|
||||
\DoxyCodeLine{00131\ }
|
||||
\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ans\ -\/=\ y\_val;}
|
||||
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rank\ =\ (ans\ ==\ 0)\ ?\ DBL\_MAX\ :\ ABS(1\ /\ ans);}
|
||||
\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \ \ \ \ \};}
|
||||
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00137\ }
|
||||
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ namespace\ }detail;}
|
||||
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}}
|
||||
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \textcolor{keyword}{private}:}
|
||||
\DoxyCodeLine{00147\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<int>\ constants;}
|
||||
\DoxyCodeLine{00148\ }
|
||||
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}:}
|
||||
\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Speicialty\ function\ to\ get\ the\ real\ roots\ of\ a\ Quadratic\ Function\ without\ relying\ on\ a\ Genetic\ Algorithm\ to\ approximate}}
|
||||
\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a8f5b8975b6e7318c093a963cd0b43db6}{QuadraticSolve}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<2>}}\&\ f);}
|
||||
\DoxyCodeLine{00152\ }
|
||||
\DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}:}
|
||||
\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}(\textcolor{keyword}{const}\ std::vector<int>\&\ constnts);}
|
||||
\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}(std::vector<int>\&\&\ constnts);}
|
||||
\DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\ other)\ =\ \textcolor{keywordflow}{default};}
|
||||
\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\&\ other)\ \textcolor{keyword}{noexcept}\ =\ \textcolor{keywordflow}{default};}
|
||||
\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{virtual}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{\string~Function}}();}
|
||||
\DoxyCodeLine{00167\ }
|
||||
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\ operator=(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\ other)\ =\ \textcolor{keywordflow}{default};}
|
||||
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\ operator=(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}\&\&\ other)\ \textcolor{keyword}{noexcept}\ =\ \textcolor{keywordflow}{default};}
|
||||
\DoxyCodeLine{00170\ }
|
||||
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Operator\ function\ to\ display\ function\ object\ in\ a\ human\ readable\ format}}
|
||||
\DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ std::ostream\&\ operator<<(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>}}\ func)}
|
||||
\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lrgst\_expo\ ==\ 0)}
|
||||
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ func.constants[0];}
|
||||
\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
|
||||
\DoxyCodeLine{00178\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00179\ }
|
||||
\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (func.constants[0]\ ==\ 1)}
|
||||
\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}x"{}};}
|
||||
\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (func.constants[0]\ ==\ -\/1)}
|
||||
\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}-\/x"{}};}
|
||||
\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
|
||||
\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ func.constants[0]\ <<\ \textcolor{stringliteral}{"{}x"{}};}
|
||||
\DoxyCodeLine{00186\ }
|
||||
\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lrgst\_expo\ !=\ 1)}
|
||||
\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}\string^"{}}\ <<\ lrgst\_expo;}
|
||||
\DoxyCodeLine{00189\ }
|
||||
\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ lrgst\_expo\ -\/\ 1;\ i\ >\ 0;\ i-\/-\/)}
|
||||
\DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ n\ =\ func.constants[lrgst\_expo\ -\/\ i];}
|
||||
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (n\ ==\ 0)\ \textcolor{keywordflow}{continue};}
|
||||
\DoxyCodeLine{00194\ }
|
||||
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ s\ =\ n\ >\ 0\ ?\ \textcolor{stringliteral}{"{}\ +\ "{}}\ :\ \textcolor{stringliteral}{"{}\ -\/\ "{}};}
|
||||
\DoxyCodeLine{00196\ }
|
||||
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (n\ !=\ 1)}
|
||||
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ s\ <<\ ABS(n)\ <<\ \textcolor{stringliteral}{"{}x"{}};}
|
||||
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
|
||||
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ s\ <<\ \textcolor{stringliteral}{"{}x"{}};}
|
||||
\DoxyCodeLine{00201\ }
|
||||
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (i\ !=\ 1)}
|
||||
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}\string^"{}}\ <<\ i;}
|
||||
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00205\ }
|
||||
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ n\ =\ func.constants[lrgst\_expo];}
|
||||
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (n\ ==\ 0)\ \textcolor{keywordflow}{return}\ os;}
|
||||
\DoxyCodeLine{00208\ }
|
||||
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ s\ =\ n\ >\ 0\ ?\ \textcolor{stringliteral}{"{}\ +\ "{}}\ :\ \textcolor{stringliteral}{"{}\ -\/\ "{}};}
|
||||
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ s;}
|
||||
\DoxyCodeLine{00211\ }
|
||||
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ ABS(n);}
|
||||
\DoxyCodeLine{00213\ }
|
||||
\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
|
||||
\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00216\ }
|
||||
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ e1,\ \textcolor{keywordtype}{int}\ e2,\ \textcolor{keywordtype}{int}\ r>}
|
||||
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<r>}}\ operator+(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e1>}}\&\ f1,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e2>}}\&\ f2);\ \textcolor{comment}{//\ Operator\ to\ add\ two\ functions}}
|
||||
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ e1,\ \textcolor{keywordtype}{int}\ e2,\ \textcolor{keywordtype}{int}\ r>}
|
||||
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<r>}}\ operator-\/(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e1>}}\&\ f1,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e2>}}\&\ f2);\ \textcolor{comment}{//\ Operator\ to\ subtract\ two\ functions}}
|
||||
\DoxyCodeLine{00221\ }
|
||||
\DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Operators\ to\ multiply\ a\ function\ by\ a\ constant\ (Scaling\ it)}}
|
||||
\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{friend}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>}}\ operator*(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>}}\&\ f,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ c)}
|
||||
\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ 1)\ \textcolor{keywordflow}{return}\ f;}
|
||||
\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ 0)\ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Cannot\ multiply\ a\ function\ by\ 0"{}});}
|
||||
\DoxyCodeLine{00227\ }
|
||||
\DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<int>\ res;}
|
||||
\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f.constants)}
|
||||
\DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.push\_back(c\ *\ val);}
|
||||
\DoxyCodeLine{00231\ }
|
||||
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}});}
|
||||
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>}}\&\ operator*=(\textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}})}
|
||||
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}}\ ==\ 1)\ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
|
||||
\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}}\ ==\ 0)\ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Cannot\ multiply\ a\ function\ by\ 0"{}});}
|
||||
\DoxyCodeLine{00238\ }
|
||||
\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}}\ :\ this-\/>constants)}
|
||||
\DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}}\ *=\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}};}
|
||||
\DoxyCodeLine{00241\ }
|
||||
\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
|
||||
\DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00244\ }
|
||||
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ [[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{nodiscard}}(\textcolor{stringliteral}{"{}MATH::EXP::Function::differential()\ returns\ the\ differential,\ the\ calling\ object\ is\ not\ changed"{}})]]}
|
||||
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}<\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ -\/\ 1>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae43c705b427ac1ef27aed061a63e500e}{differential}}()\ \textcolor{keyword}{const};}
|
||||
\DoxyCodeLine{00251\ }
|
||||
\DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \ \ \ \ [[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{nodiscard}}]]\ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ad090de9f6636094f14f1279615fccbc0}{get\_real\_roots}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}\ =\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}())\ \textcolor{keyword}{const};}
|
||||
\DoxyCodeLine{00258\ }
|
||||
\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ \ \ \ \ [[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{nodiscard}}]]\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5464547daff0c43faccdc40ea480bab4}{solve\_y}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{x\_val}})\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept};}
|
||||
\DoxyCodeLine{00265\ }
|
||||
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \ \ \ \ [[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{nodiscard}}]]\ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a46b9671c4a29b2b2b34586048a3b795a}{solve\_x}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ y\_val,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}\ =\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}())\ \textcolor{keyword}{const};}
|
||||
\DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ \};}
|
||||
\DoxyCodeLine{00274\ }
|
||||
\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ std::vector<double>\ QuadraticSolve(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<2>}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}})}
|
||||
\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}};}
|
||||
\DoxyCodeLine{00283\ }
|
||||
\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{a}}\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}}.constants[0];}
|
||||
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{b}}\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}}.constants[1];}
|
||||
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}}\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}}.constants[2];}
|
||||
\DoxyCodeLine{00287\ }
|
||||
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqr\_val}}\ =\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{double}\textcolor{keyword}{>}(POW(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{b}},\ 2)\ -\/\ (4\ *\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{a}}\ *\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}}));}
|
||||
\DoxyCodeLine{00289\ }
|
||||
\DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqr\_val}}\ <\ 0)}
|
||||
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}};}
|
||||
\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00294\ }
|
||||
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}}.push\_back(((NEGATE(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{b}})\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqrt}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqr\_val}}))\ /\ 2\ *\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{a}}));}
|
||||
\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}}.push\_back(((NEGATE(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{b}})\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqrt}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sqr\_val}}))\ /\ 2\ *\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{a}}));}
|
||||
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}};}
|
||||
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00299\ }
|
||||
\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ e1,\ \textcolor{keywordtype}{int}\ e2,\ \textcolor{keywordtype}{int}\ r\ =\ (e1\ >\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}}\ ?\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e1}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}})>}
|
||||
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<r>}}\ \textcolor{keyword}{operator}+(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e1>}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f1}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<e2>}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f2}})}
|
||||
\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<int>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}};}
|
||||
\DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e1}}\ >\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}})}
|
||||
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f1}}.constants)}
|
||||
\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}}.\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{push\_back}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}});}
|
||||
\DoxyCodeLine{00308\ }
|
||||
\DoxyCodeLine{00309\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e1}}\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}};}
|
||||
\DoxyCodeLine{00310\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f2}}.constants)}
|
||||
\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{res}}[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}]\ +=\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{val}};}
|
||||
\DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}++;}
|
||||
\DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00315\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00316\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
|
||||
\DoxyCodeLine{00317\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f2.constants)}
|
||||
\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.push\_back(val);}
|
||||
\DoxyCodeLine{00320\ }
|
||||
\DoxyCodeLine{00321\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ i\ =\ e2\ -\/\ e1;}
|
||||
\DoxyCodeLine{00322\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f1.constants)}
|
||||
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res[i]\ +=\ val;}
|
||||
\DoxyCodeLine{00325\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i++;}
|
||||
\DoxyCodeLine{00326\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00327\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00328\ }
|
||||
\DoxyCodeLine{00329\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ Function<r>\{res\};}
|
||||
\DoxyCodeLine{00330\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00331\ }
|
||||
\DoxyCodeLine{00332\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ e1,\ \textcolor{keywordtype}{int}\ e2,\ \textcolor{keywordtype}{int}\ r\ =\ (e1\ >\ e2\ ?\ e1\ :\ e2)>}
|
||||
\DoxyCodeLine{00333\ \ \ \ \ \ \ \ \ \ \ \ \ Function<r>\ \textcolor{keyword}{operator}-\/(\textcolor{keyword}{const}\ Function<e1>\&\ f1,\ \textcolor{keyword}{const}\ Function<e2>\&\ f2)}
|
||||
\DoxyCodeLine{00334\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<int>\ res;}
|
||||
\DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (e1\ >\ e2)}
|
||||
\DoxyCodeLine{00337\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f1.constants)}
|
||||
\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.push\_back(val);}
|
||||
\DoxyCodeLine{00340\ }
|
||||
\DoxyCodeLine{00341\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ i\ =\ e1\ -\/\ e2;}
|
||||
\DoxyCodeLine{00342\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f2.constants)}
|
||||
\DoxyCodeLine{00343\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res[i]\ -\/=\ val;}
|
||||
\DoxyCodeLine{00345\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i++;}
|
||||
\DoxyCodeLine{00346\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00347\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00348\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
|
||||
\DoxyCodeLine{00349\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00350\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f2.constants)}
|
||||
\DoxyCodeLine{00351\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res.push\_back(val);}
|
||||
\DoxyCodeLine{00352\ }
|
||||
\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ i\ =\ e2\ -\/\ e1;}
|
||||
\DoxyCodeLine{00354\ }
|
||||
\DoxyCodeLine{00355\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ i;\ j++)}
|
||||
\DoxyCodeLine{00356\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res[j]\ *=\ -\/1;}
|
||||
\DoxyCodeLine{00357\ }
|
||||
\DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ val\ :\ f1.constants)}
|
||||
\DoxyCodeLine{00359\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00360\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ res[i]\ =\ val\ -\/\ res[i];}
|
||||
\DoxyCodeLine{00361\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i++;}
|
||||
\DoxyCodeLine{00362\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00363\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00364\ }
|
||||
\DoxyCodeLine{00365\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ Function<r>\{res\};}
|
||||
\DoxyCodeLine{00366\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00367\ }
|
||||
\DoxyCodeLine{00368\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00369\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::Function}}(\textcolor{keyword}{const}\ std::vector<int>\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}})}
|
||||
\DoxyCodeLine{00370\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00371\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ <\ 0)}
|
||||
\DoxyCodeLine{00372\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Function\ template\ argument\ must\ not\ be\ less\ than\ 0"{}});}
|
||||
\DoxyCodeLine{00373\ }
|
||||
\DoxyCodeLine{00374\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}}.size()\ !=\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ +\ 1)}
|
||||
\DoxyCodeLine{00375\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Function<n>\ must\ be\ created\ with\ (n+1)\ integers\ in\ vector\ object"{}});}
|
||||
\DoxyCodeLine{00376\ }
|
||||
\DoxyCodeLine{00377\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}}[0]\ ==\ 0)}
|
||||
\DoxyCodeLine{00378\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}First\ value\ should\ not\ be\ 0"{}});}
|
||||
\DoxyCodeLine{00379\ }
|
||||
\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ \ \ \ \ constants\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}};}
|
||||
\DoxyCodeLine{00381\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00382\ }
|
||||
\DoxyCodeLine{00383\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00384\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::Function}}(std::vector<int>\&\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}})}
|
||||
\DoxyCodeLine{00385\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00386\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ <\ 0)}
|
||||
\DoxyCodeLine{00387\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Function\ template\ argument\ must\ not\ be\ less\ than\ 0"{}});}
|
||||
\DoxyCodeLine{00388\ }
|
||||
\DoxyCodeLine{00389\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}}.size()\ !=\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ +\ 1)}
|
||||
\DoxyCodeLine{00390\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Function<n>\ must\ be\ created\ with\ (n+1)\ integers\ in\ vector\ object"{}});}
|
||||
\DoxyCodeLine{00391\ }
|
||||
\DoxyCodeLine{00392\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}}[0]\ ==\ 0)}
|
||||
\DoxyCodeLine{00393\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}First\ value\ should\ not\ be\ 0"{}});}
|
||||
\DoxyCodeLine{00394\ }
|
||||
\DoxyCodeLine{00395\ \ \ \ \ \ \ \ \ \ \ \ \ constants\ =\ std::move(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}});}
|
||||
\DoxyCodeLine{00396\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00397\ }
|
||||
\DoxyCodeLine{00398\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::\string~Function}}()}
|
||||
\DoxyCodeLine{00400\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00401\ \ \ \ \ \ \ \ \ \ \ \ \ constants.clear();}
|
||||
\DoxyCodeLine{00402\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00403\ }
|
||||
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}<\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ -\/\ 1>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::differential}}()\textcolor{keyword}{\ const}}
|
||||
\DoxyCodeLine{00406\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
|
||||
\DoxyCodeLine{00407\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ ==\ 0)}
|
||||
\DoxyCodeLine{00408\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::logic\_error(\textcolor{stringliteral}{"{}Cannot\ differentiate\ a\ number\ (Function<0>)"{}});}
|
||||
\DoxyCodeLine{00409\ }
|
||||
\DoxyCodeLine{00410\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<int>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{result}};}
|
||||
\DoxyCodeLine{00411\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ =\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ <\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}};\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}++)}
|
||||
\DoxyCodeLine{00412\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00413\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{result}}.push\_back(constants[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}]\ *\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}));}
|
||||
\DoxyCodeLine{00414\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00415\ }
|
||||
\DoxyCodeLine{00416\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}<\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ -\/\ 1>\{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{result}}\};}
|
||||
\DoxyCodeLine{00417\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00418\ }
|
||||
\DoxyCodeLine{00419\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00420\ \ \ \ \ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::get\_real\_roots}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}})\textcolor{keyword}{\ const}}
|
||||
\DoxyCodeLine{00421\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
|
||||
\DoxyCodeLine{00422\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Create\ initial\ random\ solutions}}
|
||||
\DoxyCodeLine{00423\ \ \ \ \ \ \ \ \ \ \ \ \ std::random\_device\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}};}
|
||||
\DoxyCodeLine{00424\ \ \ \ \ \ \ \ \ \ \ \ \ std::uniform\_real\_distribution<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.min\_range,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.max\_range);}
|
||||
\DoxyCodeLine{00425\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<GA\_Solution<lrgst\_expo>>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}};}
|
||||
\DoxyCodeLine{00426\ }
|
||||
\DoxyCodeLine{00427\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.resize(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.data\_size);}
|
||||
\DoxyCodeLine{00428\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ =\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ <\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}++)}
|
||||
\DoxyCodeLine{00429\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}]\ =\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{GA\_Solution<lrgst\_expo>}}\{0,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}})\});}
|
||||
\DoxyCodeLine{00430\ }
|
||||
\DoxyCodeLine{00431\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ timer\{\ 0\ \};}
|
||||
\DoxyCodeLine{00432\ }
|
||||
\DoxyCodeLine{00433\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ =\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ <\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.num\_of\_generations;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}++)}
|
||||
\DoxyCodeLine{00434\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00435\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::generate(std::execution::par,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin()\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),\ [\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}},\ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}}]()\ \{}
|
||||
\DoxyCodeLine{00436\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ GA\_Solution<lrgst\_expo>\{0,\ unif(device)\};}
|
||||
\DoxyCodeLine{00437\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00438\ }
|
||||
\DoxyCodeLine{00439\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Run\ our\ fitness\ function}}
|
||||
\DoxyCodeLine{00440\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})\ \{\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}.fitness(constants);\ \}}
|
||||
\DoxyCodeLine{00441\ }
|
||||
\DoxyCodeLine{00442\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Sort\ our\ solutions\ by\ rank}}
|
||||
\DoxyCodeLine{00443\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(std::execution::par,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),}
|
||||
\DoxyCodeLine{00444\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lhs}},\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{rhs}})\ \{}
|
||||
\DoxyCodeLine{00445\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs.rank\ >\ rhs.rank;}
|
||||
\DoxyCodeLine{00446\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00447\ }
|
||||
\DoxyCodeLine{00448\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Take\ top\ solutions}}
|
||||
\DoxyCodeLine{00449\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<GA\_Solution<lrgst\_expo>>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}};}
|
||||
\DoxyCodeLine{00450\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00451\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),}
|
||||
\DoxyCodeLine{00452\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin()\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size,}
|
||||
\DoxyCodeLine{00453\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}})}
|
||||
\DoxyCodeLine{00454\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00455\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.clear();}
|
||||
\DoxyCodeLine{00456\ }
|
||||
\DoxyCodeLine{00457\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ +\ 1\ ==\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.num\_of\_generations)}
|
||||
\DoxyCodeLine{00458\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00459\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00460\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),}
|
||||
\DoxyCodeLine{00461\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),}
|
||||
\DoxyCodeLine{00462\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00463\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00464\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.clear();}
|
||||
\DoxyCodeLine{00465\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
|
||||
\DoxyCodeLine{00466\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00467\ }
|
||||
\DoxyCodeLine{00468\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Mutate\ the\ top\ solutions\ by\ \%}}
|
||||
\DoxyCodeLine{00469\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::uniform\_real\_distribution<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{m}}((1\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.mutation\_percentage),\ (1\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.mutation\_percentage));}
|
||||
\DoxyCodeLine{00470\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::for\_each(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),\ [\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{m}},\ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}}](\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}})\ \{}
|
||||
\DoxyCodeLine{00471\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ s.x\ *=\ m(device);}
|
||||
\DoxyCodeLine{00472\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00473\ }
|
||||
\DoxyCodeLine{00474\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Cross\ over\ not\ needed\ as\ it's\ only\ one\ value}}
|
||||
\DoxyCodeLine{00475\ }
|
||||
\DoxyCodeLine{00476\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00477\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),}
|
||||
\DoxyCodeLine{00478\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),}
|
||||
\DoxyCodeLine{00479\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00480\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00481\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.clear();}
|
||||
\DoxyCodeLine{00482\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.resize(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.data\_size);}
|
||||
\DoxyCodeLine{00483\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00484\ }
|
||||
\DoxyCodeLine{00485\ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),}
|
||||
\DoxyCodeLine{00486\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lhs}},\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{rhs}})\ \{}
|
||||
\DoxyCodeLine{00487\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs.x\ <\ rhs.x;}
|
||||
\DoxyCodeLine{00488\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00489\ }
|
||||
\DoxyCodeLine{00490\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}};}
|
||||
\DoxyCodeLine{00491\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00492\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00493\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}}.push\_back(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}.x);}
|
||||
\DoxyCodeLine{00494\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00495\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ans;}
|
||||
\DoxyCodeLine{00496\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00497\ }
|
||||
\DoxyCodeLine{00498\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00499\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::solve\_y}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{x\_val}})\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
|
||||
\DoxyCodeLine{00500\ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00501\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<bool>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{exceptions}};}
|
||||
\DoxyCodeLine{00502\ }
|
||||
\DoxyCodeLine{00503\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ :\ constants)}
|
||||
\DoxyCodeLine{00504\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{exceptions}}.push\_back(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ !=\ 0);}
|
||||
\DoxyCodeLine{00505\ }
|
||||
\DoxyCodeLine{00506\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}}\{\ 0\ \};}
|
||||
\DoxyCodeLine{00507\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ =\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}};\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ >=\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}-\/-\/)}
|
||||
\DoxyCodeLine{00508\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00509\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{exceptions}}[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}])}
|
||||
\DoxyCodeLine{00510\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}}\ +=\ constants[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}]\ *\ POW(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{x\_val}},\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\_expo}}\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}));}
|
||||
\DoxyCodeLine{00511\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00512\ }
|
||||
\DoxyCodeLine{00513\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}};}
|
||||
\DoxyCodeLine{00514\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00515\ }
|
||||
\DoxyCodeLine{00516\ \ \ \ \ \ \ \ \ \textcolor{keyword}{template}<\textcolor{keywordtype}{int}\ lrgst\_expo>}
|
||||
\DoxyCodeLine{00517\ \ \ \ \ \ \ \ \ \textcolor{keyword}{inline}\ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function<lrgst\_expo>::solve\_x}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ y\_val,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\_Options}}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}})\textcolor{keyword}{\ const}}
|
||||
\DoxyCodeLine{00518\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
|
||||
\DoxyCodeLine{00519\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Create\ initial\ random\ solutions}}
|
||||
\DoxyCodeLine{00520\ \ \ \ \ \ \ \ \ \ \ \ \ std::random\_device\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}};}
|
||||
\DoxyCodeLine{00521\ \ \ \ \ \ \ \ \ \ \ \ \ std::uniform\_real\_distribution<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.min\_range,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.max\_range);}
|
||||
\DoxyCodeLine{00522\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<GA\_Solution<lrgst\_expo>>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}};}
|
||||
\DoxyCodeLine{00523\ }
|
||||
\DoxyCodeLine{00524\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.resize(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.data\_size);}
|
||||
\DoxyCodeLine{00525\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ =\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}\ <\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}++)}
|
||||
\DoxyCodeLine{00526\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}[\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{i}}]\ =\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{GA\_Solution<lrgst\_expo>}}\{0,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}}(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}}),\ y\_val\});}
|
||||
\DoxyCodeLine{00527\ }
|
||||
\DoxyCodeLine{00528\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ =\ 0;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ <\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.num\_of\_generations;\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}++)}
|
||||
\DoxyCodeLine{00529\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00530\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::generate(std::execution::par,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin()\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),\ [\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{unif}},\ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}},\ \&y\_val]()\ \{}
|
||||
\DoxyCodeLine{00531\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ GA\_Solution<lrgst\_expo>\{0,\ unif(device),\ y\_val\};}
|
||||
\DoxyCodeLine{00532\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00533\ }
|
||||
\DoxyCodeLine{00534\ }
|
||||
\DoxyCodeLine{00535\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Run\ our\ fitness\ function}}
|
||||
\DoxyCodeLine{00536\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})\ \{\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}.fitness(constants);\ \}}
|
||||
\DoxyCodeLine{00537\ }
|
||||
\DoxyCodeLine{00538\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Sort\ our\ solutions\ by\ rank}}
|
||||
\DoxyCodeLine{00539\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(std::execution::par,\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),}
|
||||
\DoxyCodeLine{00540\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lhs}},\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{rhs}})\ \{}
|
||||
\DoxyCodeLine{00541\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs.rank\ >\ rhs.rank;}
|
||||
\DoxyCodeLine{00542\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00543\ }
|
||||
\DoxyCodeLine{00544\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Take\ top\ solutions}}
|
||||
\DoxyCodeLine{00545\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<GA\_Solution<lrgst\_expo>>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}};}
|
||||
\DoxyCodeLine{00546\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00547\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),}
|
||||
\DoxyCodeLine{00548\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin()\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.sample\_size,}
|
||||
\DoxyCodeLine{00549\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}})}
|
||||
\DoxyCodeLine{00550\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00551\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.clear();}
|
||||
\DoxyCodeLine{00552\ }
|
||||
\DoxyCodeLine{00553\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{count}}\ +\ 1\ ==\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.num\_of\_generations)}
|
||||
\DoxyCodeLine{00554\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00555\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00556\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),}
|
||||
\DoxyCodeLine{00557\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),}
|
||||
\DoxyCodeLine{00558\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00559\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00560\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.clear();}
|
||||
\DoxyCodeLine{00561\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
|
||||
\DoxyCodeLine{00562\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00563\ }
|
||||
\DoxyCodeLine{00564\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Mutate\ the\ top\ solutions\ by\ \%}}
|
||||
\DoxyCodeLine{00565\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::uniform\_real\_distribution<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{m}}((1\ -\/\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.mutation\_percentage),\ (1\ +\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.mutation\_percentage));}
|
||||
\DoxyCodeLine{00566\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::for\_each(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),\ [\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{m}},\ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{device}}](\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}})\ \{}
|
||||
\DoxyCodeLine{00567\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ s.x\ *=\ m(device);}
|
||||
\DoxyCodeLine{00568\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00569\ }
|
||||
\DoxyCodeLine{00570\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Cross\ over\ not\ needed\ as\ it's\ only\ one\ value}}
|
||||
\DoxyCodeLine{00571\ }
|
||||
\DoxyCodeLine{00572\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::copy(}
|
||||
\DoxyCodeLine{00573\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.begin(),}
|
||||
\DoxyCodeLine{00574\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.end(),}
|
||||
\DoxyCodeLine{00575\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::back\_inserter(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00576\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ );}
|
||||
\DoxyCodeLine{00577\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{sample}}.clear();}
|
||||
\DoxyCodeLine{00578\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.resize(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}.data\_size);}
|
||||
\DoxyCodeLine{00579\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00580\ }
|
||||
\DoxyCodeLine{00581\ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.begin(),\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}}.end(),}
|
||||
\DoxyCodeLine{00582\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [](\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lhs}},\ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{rhs}})\ \{}
|
||||
\DoxyCodeLine{00583\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ lhs.x\ <\ rhs.x;}
|
||||
\DoxyCodeLine{00584\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \});}
|
||||
\DoxyCodeLine{00585\ }
|
||||
\DoxyCodeLine{00586\ \ \ \ \ \ \ \ \ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}};}
|
||||
\DoxyCodeLine{00587\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}\ :\ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{solutions}})}
|
||||
\DoxyCodeLine{00588\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
|
||||
\DoxyCodeLine{00589\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{ans}}.push\_back(\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{s}}.x);}
|
||||
\DoxyCodeLine{00590\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00591\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ans;}
|
||||
\DoxyCodeLine{00592\ \ \ \ \ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00593\ \ \ \ \ \}}
|
||||
\DoxyCodeLine{00594\ \}}
|
||||
\DoxyCodeLine{00595\ }
|
||||
\DoxyCodeLine{00596\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ !JONATHAN\_RAMPERSAD\_EXPONENTIAL\_H\_}}
|
||||
|
||||
\end{DoxyCode}
|
5
docs/latex/annotated.tex
Normal file
@ -0,0 +1,5 @@
|
||||
\doxysection{Class List}
|
||||
Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList}
|
||||
\item\contentsline{section}{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function$<$ lrgst\+\_\+expo $>$}} \\*A class representing an Exponential \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} (e.\+g 2x\texorpdfstring{$^\wedge$}{\string^}2 + 4x -\/ 1), }{\pageref{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}}{}
|
||||
\item\contentsline{section}{\mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+GA\+\_\+\+Options}} \\*Structure for options to be used when running one of the two genetic algorithms in a \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} object }{\pageref{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}}{}
|
||||
\end{DoxyCompactList}
|
@ -0,0 +1,208 @@
|
||||
\doxysection{JRAMPERSAD\+::EXPONENTIAL\+::Function\texorpdfstring{$<$}{<} lrgst\+\_\+expo \texorpdfstring{$>$}{>} Class Template Reference}
|
||||
\hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
|
||||
|
||||
A class representing an Exponential \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} (e.\+g 2x\texorpdfstring{$^\wedge$}{\string^}2 + 4x -\/ 1),.
|
||||
|
||||
|
||||
|
||||
|
||||
{\ttfamily \#include $<$Exponential.\+h$>$}
|
||||
|
||||
\doxysubsubsection*{Public Member Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a0585614da72409acfbed262411ea7882}{Function}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}})
|
||||
\begin{DoxyCompactList}\small\item\em Constructor for \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} class. \end{DoxyCompactList}\item
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a7216329180e93c93204f4061be9e560b}{Function}} (std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} $>$ \&\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{constnts}})
|
||||
\begin{DoxyCompactList}\small\item\em Constructor for \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} class. \end{DoxyCompactList}\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a38038a3b3f371ca62098ad4d4c510966}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a38038a3b3f371ca62098ad4d4c510966}
|
||||
{\bfseries Function} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{other}})=\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{default}}
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_aaafd98fd5dc5d0f9e4503bed1d49d323}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_aaafd98fd5dc5d0f9e4503bed1d49d323}
|
||||
{\bfseries Function} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \&\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{other}}) \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{noexcept}}=\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{default}}
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5c6ff5d442c8a74503312fb6bc75a1ff}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5c6ff5d442c8a74503312fb6bc75a1ff}
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \& {\bfseries operator=} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{other}})=\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{default}}
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ac8934939c219d782fd1e02bca393318d}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ac8934939c219d782fd1e02bca393318d}
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \& {\bfseries operator=} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}} \&\&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{other}}) \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{noexcept}}=\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{default}}
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a71628f495a8a26f9584487abf05293b8}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a71628f495a8a26f9584487abf05293b8}
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$ \& {\bfseries operator\texorpdfstring{$\ast$}{*}=} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}})
|
||||
\item
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} -\/ 1 $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae43c705b427ac1ef27aed061a63e500e}{differential}} () \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}}
|
||||
\begin{DoxyCompactList}\small\item\em Calculates the differential (dy/dx) of the function. \end{DoxyCompactList}\item
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ad090de9f6636094f14f1279615fccbc0}{get\+\_\+real\+\_\+roots}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}=\mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}}()) \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}}
|
||||
\begin{DoxyCompactList}\small\item\em \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that uses a genetic algorithm to find the approximate roots of the function. \end{DoxyCompactList}\item
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5464547daff0c43faccdc40ea480bab4}{solve\+\_\+y}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{x\+\_\+val}}) \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{noexcept}}
|
||||
\begin{DoxyCompactList}\small\item\em \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that solves for y when x = user value. \end{DoxyCompactList}\item
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a46b9671c4a29b2b2b34586048a3b795a}{solve\+\_\+x}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \&y\+\_\+val, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{options}}=\mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}}()) \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}}
|
||||
\begin{DoxyCompactList}\small\item\em \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that uses a genetic algorithm to find the values of x where y = user value. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsection*{Friends}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a8f5b8975b6e7318c093a963cd0b43db6}{Quadratic\+Solve}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ 2 $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}})
|
||||
\begin{DoxyCompactList}\small\item\em Uses the quadratic function to solve the roots of an entered quadratic equation. \end{DoxyCompactList}\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5de27194ad9a38f44771637a0f187562}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5de27194ad9a38f44771637a0f187562}
|
||||
std\+::ostream \& {\bfseries operator$<$$<$} (std\+::ostream \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{os}}, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{func}})
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a08885f8e67d9d34770121c63c16f2eea}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a08885f8e67d9d34770121c63c16f2eea}
|
||||
{\footnotesize template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} e1, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} e2, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} r$>$ }\\\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{r}} $>$ {\bfseries operator+} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e1}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f1}}, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f2}})
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_afde1d3a278a171c30ff0ff00f65d120e}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_afde1d3a278a171c30ff0ff00f65d120e}
|
||||
{\footnotesize template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} e1, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} e2, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} r$>$ }\\\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{r}} $>$ {\bfseries operator-\/} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e1}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f1}}, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{e2}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f2}})
|
||||
\item
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae95957956718c40093891faf8dd52b0e}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae95957956718c40093891faf8dd52b0e}
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$ {\bfseries operator\texorpdfstring{$\ast$}{*}} (\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$ \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{f}}, \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} \&\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{c}})
|
||||
\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\doxysubsection{Detailed Description}
|
||||
\subsubsection*{template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a0585614da72409acfbed262411ea7882}{int}} lrgst\+\_\+expo$>$\newline
|
||||
class JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function$<$ lrgst\+\_\+expo $>$}
|
||||
A class representing an Exponential \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} (e.\+g 2x\texorpdfstring{$^\wedge$}{\string^}2 + 4x -\/ 1),.
|
||||
|
||||
|
||||
\begin{DoxyTemplParams}{Template Parameters}
|
||||
{\em lrgst\+\_\+expo} & The largest exponent in the function (e.\+g 2 means largest exponent is x\texorpdfstring{$^\wedge$}{\string^}2) \\
|
||||
\hline
|
||||
\end{DoxyTemplParams}
|
||||
|
||||
|
||||
\doxysubsection{Constructor \& Destructor Documentation}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a0585614da72409acfbed262411ea7882}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a0585614da72409acfbed262411ea7882}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!Function@{Function}}
|
||||
\index{Function@{Function}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{Function()}{Function()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} $>$ \&}]{constnts }\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Constructor for \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} class.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em constnts} & An array with the constants for the function (e.\+g 2, 1, 3 = 2x\texorpdfstring{$^\wedge$}{\string^}2 + 1x -\/ 3) size of array MUST be lrgst\+\_\+expo + 1 \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a7216329180e93c93204f4061be9e560b}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a7216329180e93c93204f4061be9e560b}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!Function@{Function}}
|
||||
\index{Function@{Function}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{Function()}{Function()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::\+Function (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} $>$ \&\&}]{constnts }\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Constructor for \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} class.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em constnts} & An array with the constants for the function (e.\+g 2, 1, 3 = 2x\texorpdfstring{$^\wedge$}{\string^}2 + 1x -\/ 3) size of array MUST be lrgst\+\_\+expo + 1 \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
|
||||
|
||||
\doxysubsection{Member Function Documentation}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae43c705b427ac1ef27aed061a63e500e}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ae43c705b427ac1ef27aed061a63e500e}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!differential@{differential}}
|
||||
\index{differential@{differential}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{differential()}{differential()}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} -\/ 1 $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::differential (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}
|
||||
|
||||
|
||||
|
||||
Calculates the differential (dy/dx) of the function.
|
||||
|
||||
\begin{DoxyReturn}{Returns}
|
||||
a function representing the differential (dy/dx) of the calling function object
|
||||
\end{DoxyReturn}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ad090de9f6636094f14f1279615fccbc0}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_ad090de9f6636094f14f1279615fccbc0}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!get\_real\_roots@{get\_real\_roots}}
|
||||
\index{get\_real\_roots@{get\_real\_roots}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{get\_real\_roots()}{get\_real\_roots()}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::get\+\_\+real\+\_\+roots (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}} \&}]{options = {\ttfamily \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}}()} }\end{DoxyParamCaption}) const}
|
||||
|
||||
|
||||
|
||||
\doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that uses a genetic algorithm to find the approximate roots of the function.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em options} & \doxylink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options} object specifying the options to run the algorithm \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A vector containing a n number of approximate root values (n = sample\+\_\+size as defined in options)
|
||||
\end{DoxyReturn}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a46b9671c4a29b2b2b34586048a3b795a}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a46b9671c4a29b2b2b34586048a3b795a}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!solve\_x@{solve\_x}}
|
||||
\index{solve\_x@{solve\_x}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{solve\_x()}{solve\_x()}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::solve\+\_\+x (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \&}]{y\+\_\+val, }\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}} \&}]{options = {\ttfamily \mbox{\hyperlink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options}}()} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}
|
||||
|
||||
|
||||
|
||||
\doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that uses a genetic algorithm to find the values of x where y = user value.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em y\+\_\+val} & The return value that you would like to find the approximate x values needed to solve when entered into the function \\
|
||||
\hline
|
||||
{\em options} & \doxylink{struct_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_g_a___options}{GA\+\_\+\+Options} object specifying the options to run the algorithm \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A vector containing a n number of x values that cause the function to approximately equal the y\+\_\+val (n = sample\+\_\+size as defined in options)
|
||||
\end{DoxyReturn}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5464547daff0c43faccdc40ea480bab4}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a5464547daff0c43faccdc40ea480bab4}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!solve\_y@{solve\_y}}
|
||||
\index{solve\_y@{solve\_y}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{solve\_y()}{solve\_y()}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{JRAMPERSAD\+::\+EXPONENTIAL\+::\+Function}}$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{lrgst\+\_\+expo}} $>$\+::solve\+\_\+y (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} \&}]{x\+\_\+val }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [noexcept]}}
|
||||
|
||||
|
||||
|
||||
\doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} that solves for y when x = user value.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em x\+\_\+val} & the X Value you\textquotesingle{}d like the function to use \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
the Y value the function returns based on the entered X value
|
||||
\end{DoxyReturn}
|
||||
|
||||
|
||||
\doxysubsection{Friends And Related Symbol Documentation}
|
||||
\Hypertarget{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a8f5b8975b6e7318c093a963cd0b43db6}\label{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function_a8f5b8975b6e7318c093a963cd0b43db6}
|
||||
\index{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}!QuadraticSolve@{QuadraticSolve}}
|
||||
\index{QuadraticSolve@{QuadraticSolve}!JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$@{JRAMPERSAD::EXPONENTIAL::Function$<$ lrgst\_expo $>$}}
|
||||
\doxysubsubsection{\texorpdfstring{QuadraticSolve}{QuadraticSolve}}
|
||||
{\footnotesize\ttfamily template$<$\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{int}} lrgst\+\_\+expo$>$ \\
|
||||
std\+::vector$<$ \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{double}} $>$ Quadratic\+Solve (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{const}} \mbox{\hyperlink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function}}$<$ 2 $>$ \&}]{f }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}}
|
||||
|
||||
|
||||
|
||||
Uses the quadratic function to solve the roots of an entered quadratic equation.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em f} & Quadratic function you\textquotesingle{}d like to find the roots of (Quadratic \doxylink{class_j_r_a_m_p_e_r_s_a_d_1_1_e_x_p_o_n_e_n_t_i_a_l_1_1_function}{Function} object is a Function$<$2$>$ object \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
a vector containing the roots
|
||||
\end{DoxyReturn}
|
||||
|
||||
|
||||
The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
Exponential/Exponential.\+h\end{DoxyCompactItemize}
|