forked from digraphs/Digraphs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.g
66 lines (60 loc) · 2.12 KB
/
init.g
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
#############################################################################
##
## init.g
## Copyright (C) 2014 James D. Mitchell
##
## Licensing information can be found in the README file of this package.
##
#############################################################################
##
# load a method for UserHomeExpand if necessary
if not IsBound(UserHomeExpand) then
BindGlobal("UserHomeExpand", USER_HOME_EXPAND);
fi;
# load kernel function if it is installed:
if not IsBound(DIGRAPH_OUT_NBS) and "digraphs" in SHOW_STAT() then
# try static module
LoadStaticModule("digraphs");
fi;
if not IsBound(DIGRAPH_OUT_NBS) and
Filename(DirectoriesPackagePrograms("digraphs"), "digraphs.so") <> fail then
LoadDynamicModule(Filename(DirectoriesPackagePrograms("digraphs"),
"digraphs.so"));
fi;
BindGlobal("DIGRAPHS_IsGrapeLoaded",
{} -> IsPackageMarkedForLoading("grape", "4.8.1"));
# To avoid warnings when GRAPE is not loaded
if not IsBound(IsGraph) then
IsGraph := ReturnFalse;
fi;
if not IsBound(Vertices) then
DeclareOperation("Vertices", [IsRecord]);
fi;
if not IsBound(Adjacency) then
Adjacency := IdFunc;
fi;
# Avoid warnings with GAP 4.10 for use of FlipBlist
# Can be removed once Digraphs requires GAP>=4.11
if not IsBound(FlipBlist) then
FlipBlist := function(BList)
Apply(BList, x -> not x);
end;
fi;
ReadPackage("digraphs", "gap/digraph.gd");
ReadPackage("digraphs", "gap/digraphs.g");
ReadPackage("digraphs", "gap/constructors.gd");
ReadPackage("digraphs", "gap/grape.gd");
ReadPackage("digraphs", "gap/labels.gd");
ReadPackage("digraphs", "gap/attr.gd");
ReadPackage("digraphs", "gap/prop.gd");
ReadPackage("digraphs", "gap/oper.gd");
ReadPackage("digraphs", "gap/display.gd");
ReadPackage("digraphs", "gap/isomorph.gd");
ReadPackage("digraphs", "gap/utils.gd");
ReadPackage("digraphs", "gap/io.gd");
ReadPackage("digraphs", "gap/grahom.gd");
ReadPackage("digraphs", "gap/orbits.gd");
ReadPackage("digraphs", "gap/cliques.gd");
ReadPackage("digraphs", "gap/planar.gd");
ReadPackage("digraphs", "gap/examples.gd");
DeclareInfoClass("InfoDigraphs");