From d3d93ebaf723d1c14faaac1062240c8ec7c1bc25 Mon Sep 17 00:00:00 2001 From: Ulli Kehrle Date: Thu, 8 Nov 2018 11:58:26 +0100 Subject: make this a gap package. --- tst/test01.tst | 31 +++++++++++++++++++++++++++++++ tst/testall.g | 10 ++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tst/test01.tst create mode 100644 tst/testall.g (limited to 'tst') diff --git a/tst/test01.tst b/tst/test01.tst new file mode 100644 index 0000000..56cf0a8 --- /dev/null +++ b/tst/test01.tst @@ -0,0 +1,31 @@ +gap> TestRandom := function(n) +> local +> p, +> g, +> l, +> i; +> p := RandomPartialPerm(n); +> p := ComponentsOfPartialPerm(p); +> g := YoungGroupFromPartition(p); +> l := SubgroupLadder(g); +> for i in [2..Length(l)] do +> if Order(l[i]) < Order(l[i-1]) then +> if not (IsSubgroup(l[i-1],l[i]) and Index(l[i-1],l[i]) <= n) then +> return false; +> fi; +> else +> if not (IsSubgroup(l[i],l[i-1]) and Index(l[i],l[i-1]) <= n) then +> return false; +> fi; +> fi; +> od; +> return true; +> end;; + +# +gap> TestRandom(20); +true +gap> TestRandom(30); +true +gap> TestRandom(40); +true diff --git a/tst/testall.g b/tst/testall.g new file mode 100644 index 0000000..7a8c927 --- /dev/null +++ b/tst/testall.g @@ -0,0 +1,10 @@ +# +# subgroupladders: This package provides an algorithm that computes a subgroup ladder from a permutation group up to the parent symmetric group. +# +# This file runs package tests. It is also referenced in the package +# metadata in PackageInfo.g. +# +LoadPackage( "subgroupladders" ); + +TestDirectory(DirectoriesPackageLibrary( "subgroupladders", "tst" ), rec(exitGAP := true)); +FORCE_QUIT_GAP(1); -- cgit v1.2.3-24-g4f1b