Skip to content

Commit

Permalink
deploy: 55ae90d
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal committed Jun 27, 2024
1 parent bacc44e commit bdba62e
Show file tree
Hide file tree
Showing 43 changed files with 266 additions and 1,254 deletions.
343 changes: 153 additions & 190 deletions Helper_8h_source.html

Large diffs are not rendered by default.

81 changes: 41 additions & 40 deletions Number_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,47 +110,48 @@
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span>faker::number</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span>{</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">namespace</span>{</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> std::mt19937 pseudoRandomGenerator;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> }</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">template</span> &lt;std::<span class="keywordtype">int</span>egral I&gt;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> I integer(I min, I max)</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">if</span> (min &gt; max)</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;Minimum value must be smaller than maximum value.&quot;</span>);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> std::uniform_int_distribution&lt;I&gt; distribution(min, max);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">return</span> distribution(pseudoRandomGenerator);</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">template</span> &lt;std::<span class="keywordtype">int</span>egral I&gt;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> I integer(I max)</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">return</span> integer&lt;I&gt;(<span class="keyword">static_cast&lt;</span>I<span class="keyword">&gt;</span>(0), max);</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> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">template</span> &lt;std::<span class="keywordtype">float</span>ing_po<span class="keywordtype">int</span> F&gt;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> F decimal(F min, F max)</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">if</span> (min &gt; max)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;Minimum value must be smaller than maximum value.&quot;</span>);</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> std::uniform_real_distribution&lt;F&gt; distribution(min, max);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> distribution(pseudoRandomGenerator);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">template</span> &lt;std::<span class="keywordtype">float</span>ing_po<span class="keywordtype">int</span> F&gt;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> F decimal(F max)</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> decimal&lt;F&gt;(<span class="keyword">static_cast&lt;</span>F<span class="keyword">&gt;</span>(0.), max);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">template</span> &lt;std::<span class="keywordtype">int</span>egral I&gt;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>I integer(I min, I max)</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (min &gt; max)</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;Minimum value must be smaller than maximum value.&quot;</span>);</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> }</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">static</span> std::mt19937 pseudoRandomGenerator{std::random_device{}()};</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> std::uniform_int_distribution&lt;I&gt; distribution(min, max);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> distribution(pseudoRandomGenerator);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>}</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="keyword">template</span> &lt;std::<span class="keywordtype">int</span>egral I&gt;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>I integer(I max)</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="keywordflow">return</span> integer&lt;I&gt;(<span class="keyword">static_cast&lt;</span>I<span class="keyword">&gt;</span>(0), max);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>}</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keyword">template</span> &lt;std::<span class="keywordtype">float</span>ing_po<span class="keywordtype">int</span> F&gt;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>F decimal(F min, F max)</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> <span class="keywordflow">if</span> (min &gt; max)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;Minimum value must be smaller than maximum value.&quot;</span>);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</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> <span class="keyword">static</span> std::mt19937 pseudoRandomGenerator{std::random_device{}()};</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::uniform_real_distribution&lt;F&gt; distribution(min, max);</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> <span class="keywordflow">return</span> distribution(pseudoRandomGenerator);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="keyword">template</span> &lt;std::<span class="keywordtype">float</span>ing_po<span class="keywordtype">int</span> F&gt;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span>F decimal(F max)</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span>{</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">return</span> decimal&lt;F&gt;(<span class="keyword">static_cast&lt;</span>F<span class="keyword">&gt;</span>(0.), max);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>}</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
Expand Down
20 changes: 10 additions & 10 deletions annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@
<tr id="row_0_1_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1finance_1_1Currency.html" target="_self">Currency</a></td><td class="desc"></td></tr>
<tr id="row_0_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_2_" class="arrow" onclick="dynsection.toggleFolder('0_2_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>git</b></td><td class="desc"></td></tr>
<tr id="row_0_2_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1git_1_1Author.html" target="_self">Author</a></td><td class="desc"></td></tr>
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_3_" class="arrow" onclick="dynsection.toggleFolder('0_3_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>internet</b></td><td class="desc"></td></tr>
<tr id="row_0_3_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1internet_1_1PasswordOptions.html" target="_self">PasswordOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_4_" class="arrow" onclick="dynsection.toggleFolder('0_4_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>string</b></td><td class="desc"></td></tr>
<tr id="row_0_4_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1string_1_1CharCount.html" target="_self">CharCount</a></td><td class="desc"></td></tr>
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_5_" class="arrow" onclick="dynsection.toggleFolder('0_5_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>system</b></td><td class="desc"></td></tr>
<tr id="row_0_5_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1CronOptions.html" target="_self">CronOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_5_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1FileOptions.html" target="_self">FileOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_5_2_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1NetworkInterfaceOptions.html" target="_self">NetworkInterfaceOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_6_" class="arrow" onclick="dynsection.toggleFolder('0_6_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classfaker_1_1Helper.html" target="_self">Helper</a></td><td class="desc"></td></tr>
<tr id="row_0_6_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1Helper_1_1WeightedElement.html" target="_self">WeightedElement</a></td><td class="desc"></td></tr>
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_3_" class="arrow" onclick="dynsection.toggleFolder('0_3_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>helper</b></td><td class="desc"></td></tr>
<tr id="row_0_3_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1helper_1_1WeightedElement.html" target="_self">WeightedElement</a></td><td class="desc"></td></tr>
<tr id="row_0_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_4_" class="arrow" onclick="dynsection.toggleFolder('0_4_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>internet</b></td><td class="desc"></td></tr>
<tr id="row_0_4_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1internet_1_1PasswordOptions.html" target="_self">PasswordOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_5_" class="arrow" onclick="dynsection.toggleFolder('0_5_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>string</b></td><td class="desc"></td></tr>
<tr id="row_0_5_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1string_1_1CharCount.html" target="_self">CharCount</a></td><td class="desc"></td></tr>
<tr id="row_0_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_6_" class="arrow" onclick="dynsection.toggleFolder('0_6_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>system</b></td><td class="desc"></td></tr>
<tr id="row_0_6_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1CronOptions.html" target="_self">CronOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_6_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1FileOptions.html" target="_self">FileOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_6_2_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1system_1_1NetworkInterfaceOptions.html" target="_self">NetworkInterfaceOptions</a></td><td class="desc"></td></tr>
<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classfaker_1_1RandomGenerator.html" target="_self">RandomGenerator</a></td><td class="desc"></td></tr>
<tr id="row_0_8_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_8_" class="arrow" onclick="dynsection.toggleFolder('0_8_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classfaker_1_1Science.html" target="_self">Science</a></td><td class="desc"></td></tr>
<tr id="row_0_8_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structfaker_1_1Science_1_1ChemicalElement.html" target="_self">ChemicalElement</a></td><td class="desc"></td></tr>
Expand Down
4 changes: 3 additions & 1 deletion annotated_dup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var annotated_dup =
[ "git", null, [
[ "Author", "structfaker_1_1git_1_1Author.html", null ]
] ],
[ "helper", null, [
[ "WeightedElement", "structfaker_1_1helper_1_1WeightedElement.html", null ]
] ],
[ "internet", null, [
[ "PasswordOptions", "structfaker_1_1internet_1_1PasswordOptions.html", null ]
] ],
Expand All @@ -24,7 +27,6 @@ var annotated_dup =
[ "FileOptions", "structfaker_1_1system_1_1FileOptions.html", null ],
[ "NetworkInterfaceOptions", "structfaker_1_1system_1_1NetworkInterfaceOptions.html", null ]
] ],
[ "Helper", "classfaker_1_1Helper.html", "classfaker_1_1Helper" ],
[ "RandomGenerator", "classfaker_1_1RandomGenerator.html", null ],
[ "Science", "classfaker_1_1Science.html", "classfaker_1_1Science" ]
] ]
Expand Down
Loading

0 comments on commit bdba62e

Please sign in to comment.