Skip to content

Commit

Permalink
Test relation deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
scheinerman committed Aug 7, 2024
1 parent d2e2ce8 commit bed39f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@
{5, 10} Int64 poset

julia> p ∩ reverse(p)
{5, 0} Int64 poset</code></pre><h3 id="Linear-extension"><a class="docs-heading-anchor" href="#Linear-extension">Linear extension</a><a id="Linear-extension-1"></a><a class="docs-heading-anchor-permalink" href="#Linear-extension" title="Permalink"></a></h3><p>Use <code>linear_extension(p)</code> to create a linear extension of <code>p</code>. This is a total order <code>q</code> with the same elements as <code>p</code> and with <code>p ⊆ q</code>. </p><h2 id="See-Also"><a class="docs-heading-anchor" href="#See-Also">See Also</a><a id="See-Also-1"></a><a class="docs-heading-anchor-permalink" href="#See-Also" title="Permalink"></a></h2><p>The <code>extras</code> folder includes additional code that may be useful in working with <code>Posets</code>. See the <code>README</code> in that directory. </p></article><nav class="docs-footer"><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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Wednesday 7 August 2024 09:33">Wednesday 7 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
{5, 0} Int64 poset</code></pre><h3 id="Linear-extension"><a class="docs-heading-anchor" href="#Linear-extension">Linear extension</a><a id="Linear-extension-1"></a><a class="docs-heading-anchor-permalink" href="#Linear-extension" title="Permalink"></a></h3><p>Use <code>linear_extension(p)</code> to create a linear extension of <code>p</code>. This is a total order <code>q</code> with the same elements as <code>p</code> and with <code>p ⊆ q</code>. </p><h2 id="See-Also"><a class="docs-heading-anchor" href="#See-Also">See Also</a><a id="See-Also-1"></a><a class="docs-heading-anchor-permalink" href="#See-Also" title="Permalink"></a></h2><p>The <code>extras</code> folder includes additional code that may be useful in working with <code>Posets</code>. See the <code>README</code> in that directory. </p></article><nav class="docs-footer"><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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Wednesday 7 August 2024 09:39">Wednesday 7 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
9 changes: 9 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ using LinearAlgebra
@test p[3] >= p[1]

@test length(relations(p)) == ne(p.d)

p = chain(5)
@test nr(p) == binomial(5, 2)
rem_relation!(p, 2, 3)
@test nr(p) == binomial(5, 2) - 1

p = chain(5)
rem_relation!(p, 2, 4)
@test width(p) == 3
end

@testset "Above/Below/Between" begin
Expand Down

0 comments on commit bed39f0

Please sign in to comment.