Repository navigation
Expand file tree
/
Copy pathinit.g
More file actions
92 lines (84 loc) · 3.68 KB
/
Copy pathinit.g
File metadata and controls
92 lines (84 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#############################################################################
##
#W init.g Laurent Bartholdi
##
#Y Copyright (C) 2012, Laurent Bartholdi
##
#############################################################################
##
## This file reads the declarations of the packages' new objects
##
#############################################################################
POSTHOOK@img := []; # to be processed at the end
BindGlobal("@", rec()); # a record to store locals in the package
# the NC variants exist from GAP 4.17 on; before that nothing was checked
if not IsBound(PreImagesNC) then
BindGlobal("PreImagesNC", PreImages);
fi;
if not IsBound(PreImagesElmNC) then
BindGlobal("PreImagesElmNC", PreImagesElm);
fi;
if not IsBound(PreImagesSetNC) then
BindGlobal("PreImagesSetNC", PreImagesSet);
fi;
if not IsBound(PreImagesRepresentativeNC) then
BindGlobal("PreImagesRepresentativeNC", PreImagesRepresentative);
fi;
#############################################################################
##
#I Create info class to be able to debug loading
##
InfoIMG := NewInfoClass("InfoIMG");
SetInfoLevel(InfoIMG, 1);
#############################################################################
#############################################################################
##
#R Read the declaration files.
##
ReadPackage("img", "gap/helpers.gd");
ReadPackage("img", "gap/complex.gd");
ReadPackage("img", "gap/p1.gd");
ReadPackage("img", "gap/sphere.gd");
ReadPackage("img", "gap/triangulations.gd");
ReadPackage("img", "gap/machine.gd");
ReadPackage("img", "gap/markedsphere.gd");
ReadPackage("img", "gap/hurwitz.gd");
ReadPackage("img", "gap/thurston.gd");
ReadPackage("img", "gap/examples.gd");
CallFuncList(function()
local dirs, dll, w;
dirs := DirectoriesPackagePrograms("img");
dll := Filename(dirs,"img.so");
if dll=fail then
Info(InfoPackageLoading,1,"img.so not found -- you may want to compile it with './configure && make' in ",PackageInfo("img")[1].InstallationPath,"\n...");
dll := Filename(dirs[1],"img.so");
for w in ["FIND_BARYCENTER","FIND_RATIONALFUNCTION",
"C22P1POINT","P1POINT2C2","P1POINT2STRING","EQ_P1POINT",
"P1SPHERE","SPHEREP1","SPHEREP1Y","P1BARYCENTRE",
"P1ANTIPODE","P1MIDPOINT","P1DISTANCE","XRATIO","P1XRATIO",
"CLEANEDP1POINT","P1CIRCUMCENTRE","LT_P1POINT",
"P1MAPBYCOEFFICIENTS_IEEE754","P1INTERSECT_IEEE754",
"MAT2P1MAP","P1MAP2MAT","P1MAP3","P1MAP2","P1MAP1","P1PATH",
"CLEANEDP1MAP","INVERSEP1MAP","COMPOSEP1MAP","P1IMAGE",
"P1ISPOLYNOMIAL","P1PREIMAGE","NFFUNCTION_FR",
"P1PREIMAGES","P1MAPCRITICALPOINTS","P1MAPCONJUGATE",
"P1MAPBYZEROSPOLES","P1MAPPRIMITIVE","P1MAPDERIVATIVE",
"P1MAPNUMER","P1ROTATION_IEEE754","P1MAPDENOM",
"P1MAPISPOLYNOMIAL","STRINGS2P1POINT","DEGREEOFP1MAP",
"P1MAPNUMERATOR","P1MAPDENOMINATOR","P1MAP_SUM","P1MAP_DIFF",
"P1MAP_PROD","P1MAP_QUO","P1MAP_INV","P1MAP_AINV",
"P1MAPSCALING"] do
CallFuncList(function(w)
BindGlobal(w, function(arg)
Error("You need to compile ",dll," before using ",w,"\nYou may compile it with './configure && make' in ",PackageInfo("img")[1].InstallationPath,"\n...");
end);
end,[w]);
od;
@.dll := false;
else
LoadDynamicModule(dll);
@.dll := true;
fi;
end,[]);
#############################################################################
#E init.g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here