mirror of
https://github.com/rzmk/ladderz.git
synced 2025-12-19 06:59:25 +00:00
deploy: c63e973140
This commit is contained in:
parent
78c9ee1c67
commit
5d00665ae7
22 changed files with 163 additions and 319 deletions
|
|
@ -1 +1 @@
|
||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../ladderz/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../ladderz/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate ladderz</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="pre_algebra/unit1/fn.get_factor_pairs.html">pre_algebra::unit1::get_factor_pairs</a></li><li><a href="pre_algebra/unit1/fn.get_factors.html">pre_algebra::unit1::get_factors</a></li><li><a href="pre_algebra/unit1/fn.get_multiples_in_range.html">pre_algebra::unit1::get_multiples_in_range</a></li><li><a href="pre_algebra/unit1/fn.is_factor.html">pre_algebra::unit1::is_factor</a></li><li><a href="pre_algebra/unit1/fn.is_multiple.html">pre_algebra::unit1::is_multiple</a></li></ul></section></div></main></body></html>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../ladderz/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../ladderz/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate ladderz</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="pre_algebra/fn.get_factor_pairs.html">pre_algebra::get_factor_pairs</a></li><li><a href="pre_algebra/fn.get_factors.html">pre_algebra::get_factors</a></li><li><a href="pre_algebra/fn.get_multiples_in_range.html">pre_algebra::get_multiples_in_range</a></li><li><a href="pre_algebra/fn.is_factor.html">pre_algebra::is_factor</a></li><li><a href="pre_algebra/fn.is_multiple.html">pre_algebra::is_multiple</a></li></ul></section></div></main></body></html>
|
||||||
|
|
@ -13,7 +13,7 @@ cd my_ladderz_project
|
||||||
</code></pre></div>
|
</code></pre></div>
|
||||||
<p>Now in <code>src/main.rs</code> let’s replace the contents with the following code:</p>
|
<p>Now in <code>src/main.rs</code> let’s replace the contents with the following code:</p>
|
||||||
|
|
||||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ladderz::pre_algebra::unit1::{get_factor_pairs, get_factors};
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ladderz::pre_algebra::{get_factors, get_factor_pairs};
|
||||||
<span class="kw">use </span>std::env;
|
<span class="kw">use </span>std::env;
|
||||||
|
|
||||||
<span class="kw">fn </span>main() {
|
<span class="kw">fn </span>main() {
|
||||||
|
|
@ -57,8 +57,8 @@ cd my_ladderz_project
|
||||||
<div class="example-wrap"><pre class="language-bash"><code>./target/release/my_ladderz_project.exe 12
|
<div class="example-wrap"><pre class="language-bash"><code>./target/release/my_ladderz_project.exe 12
|
||||||
</code></pre></div>
|
</code></pre></div>
|
||||||
<p>The printed output should be:</p>
|
<p>The printed output should be:</p>
|
||||||
|
<div class="example-wrap"><pre class="language-console"><code>List of factors of 12: [1, 2, 3, 4, 6, 12]
|
||||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>List of factors of <span class="number">12</span>: [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">12</span>]
|
List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)]
|
||||||
List of factor pairs of <span class="number">12</span>: [(<span class="number">1</span>, <span class="number">12</span>), (<span class="number">2</span>, <span class="number">6</span>), (<span class="number">3</span>, <span class="number">4</span>)]</code></pre></div>
|
</code></pre></div>
|
||||||
<p>Great! We’ve successfully used the <code>ladderz</code> crate to get the factors and factor pairs of a positive integer in sorted order.</p>
|
<p>Great! We’ve successfully used the <code>ladderz</code> crate to get the factors and factor pairs of a positive integer in sorted order.</p>
|
||||||
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="pre_algebra/index.html" title="mod ladderz::pre_algebra">pre_algebra</a></div><div class="desc docblock-short">Various pre-algebra implementations including factor pairs, factors, multiples, and more.</div></li></ul></section></div></main></body></html>
|
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="pre_algebra/index.html" title="mod ladderz::pre_algebra">pre_algebra</a></div><div class="desc docblock-short">Various pre-algebra implementations including factor pairs, factors, multiples, and more.</div></li></ul></section></div></main></body></html>
|
||||||
19
ladderz/pre_algebra/fn.get_factor_pairs.html
Normal file
19
ladderz/pre_algebra/fn.get_factor_pairs.html
Normal file
File diff suppressed because one or more lines are too long
18
ladderz/pre_algebra/fn.get_factors.html
Normal file
18
ladderz/pre_algebra/fn.get_factors.html
Normal file
File diff suppressed because one or more lines are too long
17
ladderz/pre_algebra/fn.get_multiples_in_range.html
Normal file
17
ladderz/pre_algebra/fn.get_multiples_in_range.html
Normal file
File diff suppressed because one or more lines are too long
13
ladderz/pre_algebra/fn.is_factor.html
Normal file
13
ladderz/pre_algebra/fn.is_factor.html
Normal file
File diff suppressed because one or more lines are too long
10
ladderz/pre_algebra/fn.is_multiple.html
Normal file
10
ladderz/pre_algebra/fn.is_multiple.html
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Various pre-algebra implementations including factor pairs, factors, multiples, and more."><title>ladderz::pre_algebra - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../ladderz/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../ladderz/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module pre_algebra</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ladderz</a>::<wbr><a class="mod" href="#">pre_algebra</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/ladderz/pre_algebra.rs.html#1-2">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Various pre-algebra implementations including factor pairs, factors, multiples, and more.</p>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Various pre-algebra implementations including factor pairs, factors, multiples, and more."><title>ladderz::pre_algebra - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../ladderz/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../ladderz/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module pre_algebra</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ladderz</a>::<wbr><a class="mod" href="#">pre_algebra</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/ladderz/pre_algebra/mod.rs.html#1-5">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Various pre-algebra implementations including factor pairs, factors, multiples, and more.</p>
|
||||||
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="unit1/index.html" title="mod ladderz::pre_algebra::unit1">unit1</a></div><div class="desc docblock-short">Factors and multiples</div></li></ul></section></div></main></body></html>
|
</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.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></ul></section></div></main></body></html>
|
||||||
|
|
@ -1 +1 @@
|
||||||
window.SIDEBAR_ITEMS = {"mod":["unit1"]};
|
window.SIDEBAR_ITEMS = {"fn":["get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"]};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Factors and multiples"><title>ladderz::pre_algebra::unit1 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../../../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="logo-container" href="../../../ladderz/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../ladderz/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Module unit1</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">ladderz</a>::<wbr><a href="../index.html">pre_algebra</a>::<wbr><a class="mod" href="#">unit1</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/ladderz/pre_algebra/unit1.rs.html#1-292">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Factors and multiples</p>
|
|
||||||
</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::unit1::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::unit1::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::unit1::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.is_factor.html" title="fn ladderz::pre_algebra::unit1::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::unit1::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></ul></section></div></main></body></html>
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
window.SIDEBAR_ITEMS = {"fn":["get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"]};
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
var searchIndex = JSON.parse('{\
|
var searchIndex = JSON.parse('{\
|
||||||
"ladderz":{"doc":"ladderz","t":"AAFFFFF","n":["pre_algebra","unit1","get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"],"q":[[0,"ladderz"],[1,"ladderz::pre_algebra"],[2,"ladderz::pre_algebra::unit1"]],"d":["Various pre-algebra implementations including factor …","Factors and multiples","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 …","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 …"],"i":[0,0,0,0,0,0,0],"f":[0,0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[[1,1],3],[[1,1],3]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[15,"bool"]]}\
|
"ladderz":{"doc":"ladderz","t":"AFFFFF","n":["pre_algebra","get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"],"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 …","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 …"],"i":[0,0,0,0,0,0],"f":[0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[[1,1],3],[[1,1],3]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[15,"bool"]]}\
|
||||||
}');
|
}');
|
||||||
if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
|
if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
|
||||||
if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
|
if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
var sourcesIndex = JSON.parse('{\
|
var sourcesIndex = JSON.parse('{\
|
||||||
"ladderz":["",[["pre_algebra",[],["unit1.rs"]]],["lib.rs","pre_algebra.rs"]]\
|
"ladderz":["",[["pre_algebra",[],["mod.rs","unit1.rs"]]],["lib.rs"]]\
|
||||||
}');
|
}');
|
||||||
createSourceSidebar();
|
createSourceSidebar();
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
//! Now in `src/main.rs` let's replace the contents with the following code:
|
//! Now in `src/main.rs` let's replace the contents with the following code:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use ladderz::pre_algebra::unit1::{get_factor_pairs, get_factors};
|
//! use ladderz::pre_algebra::{get_factors, get_factor_pairs};
|
||||||
//! use std::env;
|
//! use std::env;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! fn main() {
|
||||||
|
|
@ -173,7 +173,7 @@
|
||||||
//!
|
//!
|
||||||
//! The printed output should be:
|
//! The printed output should be:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```console
|
||||||
//! List of factors of 12: [1, 2, 3, 4, 6, 12]
|
//! List of factors of 12: [1, 2, 3, 4, 6, 12]
|
||||||
//! List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)]
|
//! List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)]
|
||||||
//! ```
|
//! ```
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/pre_algebra.rs`."><title>pre_algebra.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../../static.files/source-script-106908c7a7964ba4.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../ladderz/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a>
|
|
||||||
<a href="#2" id="2">2</a>
|
|
||||||
</pre></div><pre class="rust"><code><span class="doccomment">/// Factors and multiples
|
|
||||||
</span><span class="kw">pub mod </span>unit1;
|
|
||||||
</code></pre></div></section></main></body></html>
|
|
||||||
11
src/ladderz/pre_algebra/mod.rs.html
Normal file
11
src/ladderz/pre_algebra/mod.rs.html
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/pre_algebra/mod.rs`."><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-9bb858ba049f1f21.css" id="mainThemeStyle"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ladderz" data-themes="" data-resource-suffix="" data-rustdoc-version="1.72.1 (d5c2e9c34 2023-09-13)" data-channel="1.72.1" data-search-js="search-f6292fe389d70017.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ><script src="../../../static.files/storage-59fd9b8ccb335783.js"></script><script defer src="../../../static.files/source-script-106908c7a7964ba4.js"></script><script defer src="../../../source-files.js"></script><script defer src="../../../static.files/main-0795b7d26be81095.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../../ladderz/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a>
|
||||||
|
<a href="#2" id="2">2</a>
|
||||||
|
<a href="#3" id="3">3</a>
|
||||||
|
<a href="#4" id="4">4</a>
|
||||||
|
<a href="#5" id="5">5</a>
|
||||||
|
</pre></div><pre class="rust"><code><span class="doccomment">/// Factors and multiples
|
||||||
|
</span><span class="kw">mod </span>unit1;
|
||||||
|
|
||||||
|
<span class="attr">#[doc(inline)]
|
||||||
|
</span><span class="kw">pub use </span>unit1::<span class="kw-2">*</span>;
|
||||||
|
</code></pre></div></section></main></body></html>
|
||||||
|
|
@ -209,116 +209,19 @@
|
||||||
<a href="#209" id="209">209</a>
|
<a href="#209" id="209">209</a>
|
||||||
<a href="#210" id="210">210</a>
|
<a href="#210" id="210">210</a>
|
||||||
<a href="#211" id="211">211</a>
|
<a href="#211" id="211">211</a>
|
||||||
<a href="#212" id="212">212</a>
|
|
||||||
<a href="#213" id="213">213</a>
|
|
||||||
<a href="#214" id="214">214</a>
|
|
||||||
<a href="#215" id="215">215</a>
|
|
||||||
<a href="#216" id="216">216</a>
|
|
||||||
<a href="#217" id="217">217</a>
|
|
||||||
<a href="#218" id="218">218</a>
|
|
||||||
<a href="#219" id="219">219</a>
|
|
||||||
<a href="#220" id="220">220</a>
|
|
||||||
<a href="#221" id="221">221</a>
|
|
||||||
<a href="#222" id="222">222</a>
|
|
||||||
<a href="#223" id="223">223</a>
|
|
||||||
<a href="#224" id="224">224</a>
|
|
||||||
<a href="#225" id="225">225</a>
|
|
||||||
<a href="#226" id="226">226</a>
|
|
||||||
<a href="#227" id="227">227</a>
|
|
||||||
<a href="#228" id="228">228</a>
|
|
||||||
<a href="#229" id="229">229</a>
|
|
||||||
<a href="#230" id="230">230</a>
|
|
||||||
<a href="#231" id="231">231</a>
|
|
||||||
<a href="#232" id="232">232</a>
|
|
||||||
<a href="#233" id="233">233</a>
|
|
||||||
<a href="#234" id="234">234</a>
|
|
||||||
<a href="#235" id="235">235</a>
|
|
||||||
<a href="#236" id="236">236</a>
|
|
||||||
<a href="#237" id="237">237</a>
|
|
||||||
<a href="#238" id="238">238</a>
|
|
||||||
<a href="#239" id="239">239</a>
|
|
||||||
<a href="#240" id="240">240</a>
|
|
||||||
<a href="#241" id="241">241</a>
|
|
||||||
<a href="#242" id="242">242</a>
|
|
||||||
<a href="#243" id="243">243</a>
|
|
||||||
<a href="#244" id="244">244</a>
|
|
||||||
<a href="#245" id="245">245</a>
|
|
||||||
<a href="#246" id="246">246</a>
|
|
||||||
<a href="#247" id="247">247</a>
|
|
||||||
<a href="#248" id="248">248</a>
|
|
||||||
<a href="#249" id="249">249</a>
|
|
||||||
<a href="#250" id="250">250</a>
|
|
||||||
<a href="#251" id="251">251</a>
|
|
||||||
<a href="#252" id="252">252</a>
|
|
||||||
<a href="#253" id="253">253</a>
|
|
||||||
<a href="#254" id="254">254</a>
|
|
||||||
<a href="#255" id="255">255</a>
|
|
||||||
<a href="#256" id="256">256</a>
|
|
||||||
<a href="#257" id="257">257</a>
|
|
||||||
<a href="#258" id="258">258</a>
|
|
||||||
<a href="#259" id="259">259</a>
|
|
||||||
<a href="#260" id="260">260</a>
|
|
||||||
<a href="#261" id="261">261</a>
|
|
||||||
<a href="#262" id="262">262</a>
|
|
||||||
<a href="#263" id="263">263</a>
|
|
||||||
<a href="#264" id="264">264</a>
|
|
||||||
<a href="#265" id="265">265</a>
|
|
||||||
<a href="#266" id="266">266</a>
|
|
||||||
<a href="#267" id="267">267</a>
|
|
||||||
<a href="#268" id="268">268</a>
|
|
||||||
<a href="#269" id="269">269</a>
|
|
||||||
<a href="#270" id="270">270</a>
|
|
||||||
<a href="#271" id="271">271</a>
|
|
||||||
<a href="#272" id="272">272</a>
|
|
||||||
<a href="#273" id="273">273</a>
|
|
||||||
<a href="#274" id="274">274</a>
|
|
||||||
<a href="#275" id="275">275</a>
|
|
||||||
<a href="#276" id="276">276</a>
|
|
||||||
<a href="#277" id="277">277</a>
|
|
||||||
<a href="#278" id="278">278</a>
|
|
||||||
<a href="#279" id="279">279</a>
|
|
||||||
<a href="#280" id="280">280</a>
|
|
||||||
<a href="#281" id="281">281</a>
|
|
||||||
<a href="#282" id="282">282</a>
|
|
||||||
<a href="#283" id="283">283</a>
|
|
||||||
<a href="#284" id="284">284</a>
|
|
||||||
<a href="#285" id="285">285</a>
|
|
||||||
<a href="#286" id="286">286</a>
|
|
||||||
<a href="#287" id="287">287</a>
|
|
||||||
<a href="#288" id="288">288</a>
|
|
||||||
<a href="#289" id="289">289</a>
|
|
||||||
<a href="#290" id="290">290</a>
|
|
||||||
<a href="#291" id="291">291</a>
|
|
||||||
<a href="#292" id="292">292</a>
|
|
||||||
</pre></div><pre class="rust"><code><span class="kw">use </span>std::collections::HashSet;
|
</pre></div><pre class="rust"><code><span class="kw">use </span>std::collections::HashSet;
|
||||||
|
|
||||||
<span class="doccomment">/// Finds all factor pairs for a positive integer `n`.
|
<span class="doccomment">/// Finds all factor pairs for a positive integer `n`.
|
||||||
///
|
///
|
||||||
/// # Challenge
|
/// This function calculates and returns a `HashSet<(u32, u32)>` containing all unique factor pairs
|
||||||
///
|
|
||||||
/// Write a program that finds all the factor pairs for a number `n`.
|
|
||||||
///
|
|
||||||
/// # Description
|
|
||||||
///
|
|
||||||
/// Generates a `HashSet` of factor pairs for a positive integer `n`.
|
|
||||||
///
|
|
||||||
/// This function calculates and returns a `HashSet` containing all unique factor pairs
|
|
||||||
/// of the input positive integer `n`. A factor pair is a pair of positive integers
|
/// of the input positive integer `n`. A factor pair is a pair of positive integers
|
||||||
/// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
|
/// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
|
||||||
///
|
///
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `n` - The positive integer for which factor pairs are to be calculated.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// A `HashSet` containing all unique factor pairs of the input integer `n`.
|
|
||||||
///
|
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use std::collections::HashSet;
|
/// use std::collections::HashSet;
|
||||||
/// use ladderz::pre_algebra::unit1::get_factor_pairs;
|
/// use ladderz::pre_algebra::get_factor_pairs;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let result_pairs = get_factor_pairs(12);
|
/// let result_pairs = get_factor_pairs(12);
|
||||||
|
|
@ -351,31 +254,15 @@
|
||||||
|
|
||||||
<span class="doccomment">/// Finds all factors of a positive integer `n`.
|
<span class="doccomment">/// Finds all factors of a positive integer `n`.
|
||||||
///
|
///
|
||||||
/// # Challenge
|
/// This function calculates and returns a `HashSet<u32>` containing all unique factors
|
||||||
///
|
|
||||||
/// Write a program that finds all the factors of a number. Assume that `n` is a positive integer greater than or equal to 1.
|
|
||||||
///
|
|
||||||
/// # Description
|
|
||||||
///
|
|
||||||
/// Generates a `HashSet` of factors for a positive integer `n`.
|
|
||||||
///
|
|
||||||
/// This function calculates and returns a `HashSet` containing all unique factors
|
|
||||||
/// of the input positive integer `n`. A factor of `n` is a positive integer `a` where
|
/// of the input positive integer `n`. A factor of `n` is a positive integer `a` where
|
||||||
/// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
|
/// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
|
||||||
///
|
///
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `n` - The positive integer for which factors are to be calculated.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// A `HashSet` containing all unique factors of the input integer `n`.
|
|
||||||
///
|
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use std::collections::HashSet;
|
/// use std::collections::HashSet;
|
||||||
/// use ladderz::pre_algebra::unit1::get_factors;
|
/// use ladderz::pre_algebra::get_factors;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let result_factors = get_factors(16);
|
/// let result_factors = get_factors(16);
|
||||||
|
|
@ -402,29 +289,12 @@
|
||||||
|
|
||||||
<span class="doccomment">/// Checks if a positive integer `x` is a factor of another positive integer `y`.
|
<span class="doccomment">/// Checks if a positive integer `x` is a factor of another positive integer `y`.
|
||||||
///
|
///
|
||||||
/// # Challenge
|
|
||||||
///
|
|
||||||
/// Write a program that determines whether one positive integer is a factor of another.
|
|
||||||
///
|
|
||||||
/// # Description
|
|
||||||
///
|
|
||||||
/// Checks if a positive integer `x` is a factor of another positive integer `y`.
|
|
||||||
///
|
|
||||||
/// A factor of `y` is a positive integer `x` where `y` is evenly divisible by `x` (i.e., `y % x == 0`).
|
/// A factor of `y` is a positive integer `x` where `y` is evenly divisible by `x` (i.e., `y % x == 0`).
|
||||||
///
|
///
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `x` - The positive integer to determine whether it is a factor of `y` or not.
|
|
||||||
/// * `y` - The positive integer for which the factor check of `x` is performed.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// `true` if `x` is a factor of `y`, `false` otherwise.
|
|
||||||
///
|
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use ladderz::pre_algebra::unit1::is_factor;
|
/// use ladderz::pre_algebra::is_factor;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// assert!(is_factor(2, 16)); // 2 is a factor of 16
|
/// assert!(is_factor(2, 16)); // 2 is a factor of 16
|
||||||
|
|
@ -442,29 +312,12 @@
|
||||||
|
|
||||||
<span class="doccomment">/// Checks if a positive integer `x` is a multiple of another positive integer `y`.
|
<span class="doccomment">/// Checks if a positive integer `x` is a multiple of another positive integer `y`.
|
||||||
///
|
///
|
||||||
/// # Challenge
|
|
||||||
///
|
|
||||||
/// Write a program that determines whether one positive integer is a multiple of another.
|
|
||||||
///
|
|
||||||
/// # Description
|
|
||||||
///
|
|
||||||
/// Checks if a positive integer `x` is a multiple of another positive integer `y`.
|
|
||||||
///
|
|
||||||
/// A multiple of `y` is a positive integer `x` where `x` is evenly divisible by `y` (i.e., `x % y == 0`).
|
/// A multiple of `y` is a positive integer `x` where `x` is evenly divisible by `y` (i.e., `x % y == 0`).
|
||||||
///
|
///
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `x` - The positive integer to determine whether it is a multiple of `y` or not.
|
|
||||||
/// * `y` - The positive integer for which the multiple check of `x` is performed.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// `true` if `x` is a multiple of `y`, `false` otherwise.
|
|
||||||
///
|
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use ladderz::pre_algebra::unit1::is_multiple;
|
/// use ladderz::pre_algebra::is_multiple;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// assert!(is_multiple(16, 2)); // 16 is a multiple of 2
|
/// assert!(is_multiple(16, 2)); // 16 is a multiple of 2
|
||||||
|
|
@ -477,29 +330,14 @@
|
||||||
|
|
||||||
<span class="doccomment">/// Finds all the multiples of a positive integer `n` up to and including `end` (in the range [n, end]).
|
<span class="doccomment">/// Finds all the multiples of a positive integer `n` up to and including `end` (in the range [n, end]).
|
||||||
///
|
///
|
||||||
/// # Challenge
|
/// Returns a `HashSet<u32>` containing all the multiples of a positive integer `n` in the range [n, end].
|
||||||
///
|
|
||||||
/// Write a program that finds all the multiples of a positive integer `n` in a given range.
|
|
||||||
///
|
|
||||||
/// # Description
|
|
||||||
///
|
|
||||||
/// Returns a HashSet containing all the multiples of a positive integer `n` in the range [n, end].
|
|
||||||
///
|
///
|
||||||
/// A multiple of `n` is a positive integer `num` where `num` is evenly divisible by `n` (i.e., `num % n == 0`).
|
/// A multiple of `n` is a positive integer `num` where `num` is evenly divisible by `n` (i.e., `num % n == 0`).
|
||||||
///
|
///
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// * `n` - The positive integer for which multiples are to be found.
|
|
||||||
/// * `end` - The upper limit of the range for finding multiples.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
///
|
|
||||||
/// A HashSet containing all the multiples of `n` in the range [n, end].
|
|
||||||
///
|
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use ladderz::pre_algebra::unit1::get_multiples_in_range;
|
/// use ladderz::pre_algebra::get_multiples_in_range;
|
||||||
/// use std::collections::HashSet;
|
/// use std::collections::HashSet;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue