mirror of
https://github.com/rzmk/ladderz.git
synced 2025-12-19 06:59:25 +00:00
deploy: 18d14f145d
This commit is contained in:
parent
5d5c0141d1
commit
e25914b3cd
5 changed files with 6 additions and 6 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -5,4 +5,4 @@
|
|||
<span class="kw">let </span>x: u32 = <span class="number">10</span>;
|
||||
<span class="macro">println!</span>(<span class="string">"The factors of {x} are {:?}."</span>, get_factors(x));</code></pre></div>
|
||||
<div class="example-wrap"><pre class="language-console"><code>The factors of 10 are {1, 5, 2, 10}.
|
||||
</code></pre></div></div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.get_factor_pairs.html" title="fn ladderz::pre_algebra::get_factor_pairs">get_factor_pairs</a></div><div class="desc docblock-short">Finds all factor pairs for a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_factors.html" title="fn ladderz::pre_algebra::get_factors">get_factors</a></div><div class="desc docblock-short">Finds all factors of a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_multiples_in_range.html" title="fn ladderz::pre_algebra::get_multiples_in_range">get_multiples_in_range</a></div><div class="desc docblock-short">Finds all the multiples of a positive integer <code>n</code> up to and including <code>end</code> (in the range [n, end]).</div></li><li><div class="item-name"><a class="fn" href="fn.get_prime_factorization.html" title="fn ladderz::pre_algebra::get_prime_factorization">get_prime_factorization</a></div><div class="desc docblock-short">Write a program that determines the prime factorization of a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_primes_in_range.html" title="fn ladderz::pre_algebra::get_primes_in_range">get_primes_in_range</a></div><div class="desc docblock-short">Write a program that finds all prime numbers in the range [start, end] within the natural numbers.</div></li><li><div class="item-name"><a class="fn" href="fn.is_composite.html" title="fn ladderz::pre_algebra::is_composite">is_composite</a></div><div class="desc docblock-short">Checks if a positive integer <code>n</code> is a composite number.</div></li><li><div class="item-name"><a class="fn" href="fn.is_factor.html" title="fn ladderz::pre_algebra::is_factor">is_factor</a></div><div class="desc docblock-short">Checks if a positive integer <code>x</code> is a factor of another positive integer <code>y</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.is_multiple.html" title="fn ladderz::pre_algebra::is_multiple">is_multiple</a></div><div class="desc docblock-short">Checks if a positive integer <code>x</code> is a multiple of another positive integer <code>y</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.is_prime.html" title="fn ladderz::pre_algebra::is_prime">is_prime</a></div><div class="desc docblock-short">Checks if a positive integer <code>n</code> is a prime number.</div></li></ul></section></div></main></body></html>
|
||||
</code></pre></div></div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.get_factor_pairs.html" title="fn ladderz::pre_algebra::get_factor_pairs">get_factor_pairs</a></div><div class="desc docblock-short">Finds all factor pairs for a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_factors.html" title="fn ladderz::pre_algebra::get_factors">get_factors</a></div><div class="desc docblock-short">Finds all factors of a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_multiples_in_range.html" title="fn ladderz::pre_algebra::get_multiples_in_range">get_multiples_in_range</a></div><div class="desc docblock-short">Finds all the multiples of a positive integer <code>n</code> up to and including <code>end</code> (in the range [n, end]).</div></li><li><div class="item-name"><a class="fn" href="fn.get_prime_factorization.html" title="fn ladderz::pre_algebra::get_prime_factorization">get_prime_factorization</a></div><div class="desc docblock-short">Returns the prime factorization of a positive integer <code>n</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.get_primes_in_range.html" title="fn ladderz::pre_algebra::get_primes_in_range">get_primes_in_range</a></div><div class="desc docblock-short">Returns all prime numbers in the range [start, end].</div></li><li><div class="item-name"><a class="fn" href="fn.is_composite.html" title="fn ladderz::pre_algebra::is_composite">is_composite</a></div><div class="desc docblock-short">Checks if a positive integer <code>n</code> is a composite number.</div></li><li><div class="item-name"><a class="fn" href="fn.is_factor.html" title="fn ladderz::pre_algebra::is_factor">is_factor</a></div><div class="desc docblock-short">Checks if a positive integer <code>x</code> is a factor of another positive integer <code>y</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.is_multiple.html" title="fn ladderz::pre_algebra::is_multiple">is_multiple</a></div><div class="desc docblock-short">Checks if a positive integer <code>x</code> is a multiple of another positive integer <code>y</code>.</div></li><li><div class="item-name"><a class="fn" href="fn.is_prime.html" title="fn ladderz::pre_algebra::is_prime">is_prime</a></div><div class="desc docblock-short">Checks if a positive integer <code>n</code> is a prime number.</div></li></ul></section></div></main></body></html>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
var searchIndex = JSON.parse('{\
|
||||
"ladderz":{"doc":"ladderz","t":"AFFFFFFFFF","n":["pre_algebra","get_factor_pairs","get_factors","get_multiples_in_range","get_prime_factorization","get_primes_in_range","is_composite","is_factor","is_multiple","is_prime"],"q":[[0,"ladderz"],[1,"ladderz::pre_algebra"]],"d":["Various pre-algebra implementations including factor …","Finds all factor pairs for a positive integer <code>n</code>.","Finds all factors of a positive integer <code>n</code>.","Finds all the multiples of a positive integer <code>n</code> up to and …","Write a program that determines the prime factorization of …","Write a program that finds all prime numbers in the range […","Checks if a positive integer <code>n</code> is a composite number.","Checks if a positive integer <code>x</code> is a factor of another …","Checks if a positive integer <code>x</code> is a multiple of another …","Checks if a positive integer <code>n</code> is a prime number."],"i":[0,0,0,0,0,0,0,0,0,0],"f":[0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[1,[[3,[1,1]]]],[[1,1],[[2,[1]]]],[1,4],[[1,1],4],[[1,1],4],[1,4]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[3,"HashMap"],[15,"bool"]]}\
|
||||
"ladderz":{"doc":"ladderz","t":"AFFFFFFFFF","n":["pre_algebra","get_factor_pairs","get_factors","get_multiples_in_range","get_prime_factorization","get_primes_in_range","is_composite","is_factor","is_multiple","is_prime"],"q":[[0,"ladderz"],[1,"ladderz::pre_algebra"]],"d":["Various pre-algebra implementations including factor …","Finds all factor pairs for a positive integer <code>n</code>.","Finds all factors of a positive integer <code>n</code>.","Finds all the multiples of a positive integer <code>n</code> up to and …","Returns the prime factorization of a positive integer <code>n</code>.","Returns all prime numbers in the range [start, end].","Checks if a positive integer <code>n</code> is a composite number.","Checks if a positive integer <code>x</code> is a factor of another …","Checks if a positive integer <code>x</code> is a multiple of another …","Checks if a positive integer <code>n</code> is a prime number."],"i":[0,0,0,0,0,0,0,0,0,0],"f":[0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[1,[[3,[1,1]]]],[[1,1],[[2,[1]]]],[1,4],[[1,1],4],[[1,1],4],[1,4]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[3,"HashMap"],[15,"bool"]]}\
|
||||
}');
|
||||
if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
|
||||
if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@
|
|||
<span class="bool-val">false
|
||||
</span>}
|
||||
|
||||
<span class="doccomment">/// Write a program that finds all prime numbers in the range [start, end] within the natural numbers.
|
||||
<span class="doccomment">/// Returns all prime numbers in the range [start, end].
|
||||
///
|
||||
/// A prime number is a positive integer greater than 1 that is
|
||||
/// not evenly divisible by any positive integer other than 1 and itself.
|
||||
|
|
@ -601,7 +601,7 @@
|
|||
primes
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Write a program that determines the prime factorization of a positive integer `n`.
|
||||
<span class="doccomment">/// Returns the prime factorization of a positive integer `n`.
|
||||
///
|
||||
/// For example the prime factorization of 12 is 2<sup>2</sup> * 3<sup>1</sup>, and the output is a HashMap of the form
|
||||
/// `[(2, 2), (3, 1)]` where the first element of each tuple is the prime factor and the second element is the exponent.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue