From bed39f0e0f680b74e720aa070f37a912cd4fe22a Mon Sep 17 00:00:00 2001 From: Ed Scheinerman Date: Wed, 7 Aug 2024 09:42:50 -0400 Subject: [PATCH] Test relation deletion --- docs/build/index.html | 2 +- test/runtests.jl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/build/index.html b/docs/build/index.html index 22aae6b..616c16f 100644 --- a/docs/build/index.html +++ b/docs/build/index.html @@ -161,4 +161,4 @@ {5, 10} Int64 poset julia> p ∩ reverse(p) -{5, 0} Int64 poset

Linear extension

Use linear_extension(p) to create a linear extension of p. This is a total order q with the same elements as p and with p ⊆ q.

See Also

The extras folder includes additional code that may be useful in working with Posets. See the README in that directory.

+{5, 0} Int64 poset

Linear extension

Use linear_extension(p) to create a linear extension of p. This is a total order q with the same elements as p and with p ⊆ q.

See Also

The extras folder includes additional code that may be useful in working with Posets. See the README in that directory.

diff --git a/test/runtests.jl b/test/runtests.jl index 4e8fef8..35b6fe8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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