Skip to content

Commit

Permalink
build based on 8561043
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Dec 6, 2023
1 parent 9091d23 commit 30008ba
Show file tree
Hide file tree
Showing 35 changed files with 1,380 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable
2 changes: 1 addition & 1 deletion v0.1
1 change: 1 addition & 0 deletions v0.1.3/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.8.5","generation_timestamp":"2023-12-06T15:48:39","documenter_version":"1.2.1"}}
36 changes: 36 additions & 0 deletions v0.1.3/BellScenario/combinatorics/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Combinatorics · BellScenario.jl</title><meta name="title" content="Combinatorics · BellScenario.jl"/><meta property="og:title" content="Combinatorics · BellScenario.jl"/><meta property="twitter:title" content="Combinatorics · BellScenario.jl"/><meta name="description" content="Documentation for BellScenario.jl."/><meta property="og:description" content="Documentation for BellScenario.jl."/><meta property="twitter:description" content="Documentation for BellScenario.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="BellScenario.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">BellScenario.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../user_guide/">User Guide</a></li><li><span class="tocitem">BellScenario.jl</span><ul><li><a class="tocitem" href="../overview/">Overview</a></li><li><a class="tocitem" href="../scenarios/">Scenarios</a></li><li><a class="tocitem" href="../strategies/">Strategies</a></li><li><a class="tocitem" href="../games/">Games</a></li><li class="is-active"><a class="tocitem" href>Combinatorics</a><ul class="internal"><li><a class="tocitem" href="#Set-Partitions"><span>Set Partitions</span></a></li><li><a class="tocitem" href="#Matrix-Constructions"><span>Matrix Constructions</span></a></li><li><a class="tocitem" href="#Alternative-Number-Bases"><span>Alternative Number Bases</span></a></li></ul></li></ul></li><li><span class="tocitem">LocalPolytope.jl</span><ul><li><a class="tocitem" href="../../LocalPolytope/overview/">Overview</a></li><li><a class="tocitem" href="../../LocalPolytope/vertices/">Vertices</a></li><li><a class="tocitem" href="../../LocalPolytope/facets/">Facets</a></li><li><a class="tocitem" href="../../LocalPolytope/generators/">Generators</a></li><li><a class="tocitem" href="../../LocalPolytope/adjacency_decomposition/">Adjacency Decomposition</a></li><li><a class="tocitem" href="../../LocalPolytope/utils/">Utilities</a></li></ul></li><li><span class="tocitem">Nonlocality.jl</span><ul><li><a class="tocitem" href="../../Nonlocality/overview/">Overview</a></li><li><a class="tocitem" href="../../Nonlocality/optimize_measurements/">Optimize Measurements</a></li></ul></li><li><a class="tocitem" href="../../development_manual/">Development Manual</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">BellScenario.jl</a></li><li class="is-active"><a href>Combinatorics</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Combinatorics</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/ChitambarLab/BellScenario.jl/blob/main/docs/src/BellScenario/combinatorics.md#L" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Combinatorics-Utilities"><a class="docs-heading-anchor" href="#Combinatorics-Utilities">Combinatorics Utilities</a><a id="Combinatorics-Utilities-1"></a><a class="docs-heading-anchor-permalink" href="#Combinatorics-Utilities" title="Permalink"></a></h1><h2 id="Set-Partitions"><a class="docs-heading-anchor" href="#Set-Partitions">Set Partitions</a><a id="Set-Partitions-1"></a><a class="docs-heading-anchor-permalink" href="#Set-Partitions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.stirling2" href="#BellScenario.stirling2"><code>BellScenario.stirling2</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">stirling2( n :: Int64, k :: Int64 ) :: Int64</code></pre><p>Counts the number of ways to partition <code>n</code> items into <code>k</code> unlabelled groups. This quantity is known as Stirling&#39;s number of the 2nd kind:</p><p class="math-container">\[\left\{n \atop k \right\} = \frac{1}{k!}\sum_{i=0}^k (-1)^i\binom{k}{i}(k-i)^n\]</p><p>Throws a <code>DomainError</code> if inputs do not satisfy <code>n ≥ k ≥ 1</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL5-L16">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.stirling2_partitions" href="#BellScenario.stirling2_partitions"><code>BellScenario.stirling2_partitions</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">stirling2_partitions( n :: Int64, k :: Int64 ) :: Vector{Vector{Vector{Int64}}}</code></pre><p>Enumerates the unique partitions of <code>n</code> items into <code>k</code> unlabelled sets. Each partition is a vector containing a set of <code>k</code> vectors designating each group.</p><p>E.g.</p><pre><code class="language-julia-repl hljs">julia&gt; stirling2_partitions(4, 2)
7-element Vector{Vector{Vector{Int64}}}:
[[1, 2, 3], [4]]
[[3], [1, 2, 4]]
[[1, 2], [3, 4]]
[[1, 3], [2, 4]]
[[2], [1, 3, 4]]
[[2, 3], [1, 4]]
[[1], [2, 3, 4]]</code></pre><p>This recursive algorithm was inspired by <a href="https://devblogs.microsoft.com/oldnewthing/20140324-00/?p=1413">this blog</a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL25-L46">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.stirling2_matrices" href="#BellScenario.stirling2_matrices"><code>BellScenario.stirling2_matrices</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">stirling2_matrices( n :: Int64, k :: Int64 ) :: Vector{Matrix{Bool}}</code></pre><p>Generates the set of matrices with <code>k</code> rows and <code>n</code> columns where rows correspond to the groups and columns are the grouped elements. A non-zero element designates that the column id is grouped into the corresponding row.</p><p>E.g.</p><pre><code class="language-julia-repl hljs">julia&gt; stirling2_matrices(4, 2)
7-element Vector{Matrix{Bool}}:
[1 1 1 0; 0 0 0 1]
[0 0 1 0; 1 1 0 1]
[1 1 0 0; 0 0 1 1]
[1 0 1 0; 0 1 0 1]
[0 1 0 0; 1 0 1 1]
[0 1 1 0; 1 0 0 1]
[1 0 0 0; 0 1 1 1]</code></pre><p>A <code>DomainError</code> is thrown if <code>n ≥ k ≥ 1</code> is not satisfied.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL89-L111">source</a></section></article><h2 id="Matrix-Constructions"><a class="docs-heading-anchor" href="#Matrix-Constructions">Matrix Constructions</a><a id="Matrix-Constructions-1"></a><a class="docs-heading-anchor-permalink" href="#Matrix-Constructions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.permutation_matrices" href="#BellScenario.permutation_matrices"><code>BellScenario.permutation_matrices</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">permutation_matrices( dim :: Int64 ) :: Vector{Matrix{Bool}}</code></pre><p>Generates the set of square permutation matrices of dimension <code>dim</code>.</p><p>E.g.</p><pre><code class="language-julia-repl hljs">julia&gt; permutation_matrices(3)
6-element Vector{Matrix{Bool}}:
[1 0 0; 0 1 0; 0 0 1]
[1 0 0; 0 0 1; 0 1 0]
[0 1 0; 1 0 0; 0 0 1]
[0 0 1; 1 0 0; 0 1 0]
[0 1 0; 0 0 1; 1 0 0]
[0 0 1; 0 1 0; 1 0 0]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL130-L147">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.n_choose_k_matrices" href="#BellScenario.n_choose_k_matrices"><code>BellScenario.n_choose_k_matrices</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">n_choose_k_matrices( n :: Int64, k :: Int64 ) :: Vector{Matrix{Bool}}</code></pre><p>Generates a set of <code>n</code> by <code>k</code> matrices which represent all combinations of selecting <code>k</code> columns from <code>n</code> rows. Each column, contains a single non-zero element and <code>k</code> rows contain a non-zero element.</p><p>E.g.</p><pre><code class="language-julia-repl hljs">julia&gt; n_choose_k_matrices( 4, 2 )
6-element Vector{Matrix{Bool}}:
[1 0; 0 1; 0 0; 0 0]
[1 0; 0 0; 0 1; 0 0]
[1 0; 0 0; 0 0; 0 1]
[0 0; 1 0; 0 1; 0 0]
[0 0; 1 0; 0 0; 0 1]
[0 0; 0 0; 1 0; 0 1]</code></pre><p>A <code>DomainError</code> is thrown if <code>n ≥ k ≥ 1</code> is not satisfied.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL152-L173">source</a></section></article><h2 id="Alternative-Number-Bases"><a class="docs-heading-anchor" href="#Alternative-Number-Bases">Alternative Number Bases</a><a id="Alternative-Number-Bases-1"></a><a class="docs-heading-anchor-permalink" href="#Alternative-Number-Bases" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="BellScenario.base_n_val" href="#BellScenario.base_n_val"><code>BellScenario.base_n_val</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">base_n_val(
num_array :: Vector{Int64},
base :: Int64;
big_endian=true :: Bool
) :: Int64</code></pre><p>Given an array representing a number in base-n returns the value of that number in base-10.</p><p>Inputs:</p><ul><li><code>num_array</code> - Vector containing semi-positive integers less than base.</li><li><code>base</code> - The base-n number represented by num_array.</li><li><code>big_endian</code> - <code>true</code> if most significant place is at index 1, else <code>false</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ChitambarLab/BellScenario.jl/blob/8561043c941540207b3a6e641acd97d210ff7a6d/src/combinatorics.jl#LL190-L204">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../games/">« Games</a><a class="docs-footer-nextpage" href="../../LocalPolytope/overview/">Overview »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Wednesday 6 December 2023 15:48">Wednesday 6 December 2023</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 30008ba

Please sign in to comment.