Skip to content

Commit

Permalink
merging changes in PackageInfo.g
Browse files Browse the repository at this point in the history
  • Loading branch information
egri-nagy committed Aug 3, 2017
2 parents 1c7e6ea + 0da8afe commit f5f0981
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
8 changes: 4 additions & 4 deletions PackageInfo.g
Expand Up @@ -11,8 +11,8 @@
SetPackageInfo( rec(
PackageName := "biogap",
Subtitle := "Algebraic Tools for Bacterial Genomics",
Version := "0.2.5",
Date := "27/02/2016",
Version := "0.3-dev",
Date := "03/08/2017",
ArchiveURL := "https://github.com/gap-packages/biogap/releases",
ArchiveFormats := ".tar.gz",
Persons := [
Expand Down Expand Up @@ -47,8 +47,8 @@ README_URL :=
PackageInfoURL :=
"na",

SourceRepository := rec(
Type := "git",
SourceRepository := rec(
Type := "git",
URL := "https://github.com/gap-packages/biogap"
),
IssueTrackerURL := Concatenation( ~.SourceRepository.URL, "/issues" ),
Expand Down
3 changes: 2 additions & 1 deletion lib/geometry.gd
@@ -1,8 +1,9 @@
################################################################################
# Geometry on Cayley graphs. #
# (C) Copyright 2011-2015 Attila Egri-Nagy, Andrew Francis #
# (C) Copyright 2011-2017 Attila Egri-Nagy, Andrew Francis #
################################################################################

DeclareGlobalFunction("Circle");
DeclareGlobalFunction("Ball");
DeclareGlobalFunction("DistanceToSet");
DeclareGlobalFunction("DistanceFromSet");
24 changes: 19 additions & 5 deletions lib/geometry.gi
@@ -1,32 +1,46 @@
################################################################################
# Geometry on Cayley graphs. #
# (C) Copyright 2011-2015 Attila Egri-Nagy, Andrew Francis #
# Using a distance function we compute 'geometric' objects in the Cayley graph.#
# (C) Copyright 2011-2017 Attila Egri-Nagy, Andrew Francis #
################################################################################

# DistanceFunction is an attribute, so it is stored for subsequent calls

# G - group with distance function
# g - an element of G, the origo
# g - an element of G, the centre of the circle
# r - radius
# brute force filtering of the elements exactly r away from g
InstallGlobalFunction(Circle,
function(g, r, G)
local d;
d := DistanceFunction(G);
return Set(Filtered(G, x -> d(g,x) = r));
return Filtered(G, x -> d(g,x) = r);
end);

InstallGlobalFunction(Ball,
function(g, r, G)
local d;
d := DistanceFunction(G);
return Set(Filtered(G, x -> d(g,x)<= r));
return Filtered(G, x -> d(g,x)<= r);
end);

# unless the generating set is symmetric, we have different to and from
# distances
InstallGlobalFunction(DistanceToSet,
function(g, A, G)
local d;
d := DistanceFunction(G);
return Minimum(List(A, x-> d(g,x)));
end);

InstallGlobalFunction(DistanceFromSet,
function(g, A, G)
local d;
d := DistanceFunction(G);
return Minimum(List(A, x-> d(g,x)));#TODO how about non-symmetric generating sets?
return Minimum(List(A, x-> d(x,g)));
end);


Interior := function(a,b,c,G)
local ab, ac, bc ,d;
d := DistanceFunction(G);
Expand Down
4 changes: 2 additions & 2 deletions tst/signedperm.tst
Expand Up @@ -12,7 +12,7 @@ gap> PaddedImageListOfSignedPerm(s,13);
[ -5, 2, -3, -1, 4, 6, 7, 8, 9, 10, 11, 12, 13 ]
gap> HO4 := Group(List(HyperOctahedralAlgebraicGens(4), AsPermutation));;
gap> ForAll(Tuples(HO4,2),
> p -> p[1]*p[2] = AsPermutation(AsSignedPermutation(p[1])
> *AsSignedPermutation(p[2])));
> p -> p[1]*p[2] = AsPermutation(AsSignedPermutation(p[2]) # antimorphism? why?
> *AsSignedPermutation(p[1])));
true
gap> STOP_TEST("biogap package: signedperm.tst", 10000);

0 comments on commit f5f0981

Please sign in to comment.