-
Notifications
You must be signed in to change notification settings - Fork 24
/
init.m
71 lines (54 loc) · 2.14 KB
/
init.m
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
(*
Allows accessing NCAlgebra and NCGB from anywhere through
<< NC`
Done by M. de Oliveira 2004, Updated 2017, 2022
*)
BeginPackage["NC`"];
NC::Directory = "You are using the version of NCAlgebra which is found in: \"`1`\".";
Begin["`Private`"];
verbose = If[ValueQ[$NC$Loaded], False, $NC$Loaded=True];
$NC$Dir = DirectoryName[FindFile["NC`"]];
If[ $NC$Dir =!= {}
,
(* Setup Path *)
Message[NC::Directory, $NC$Dir];
(* Setting NCAlgebra Path *)
AppendTo[$Path, $NC$Dir];
AppendTo[$Path,ToFileName[{$NC$Dir, "NCAlgebra" }]];
AppendTo[$Path,ToFileName[{$NC$Dir, "NCAlgebra", "Systems" }]];
(* Setting NCGB Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "MmaSource"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "Testing"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "Testing", "C++TestFiles"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "Testing", "MmaTestFiles"}]];
(* Additional Path for NCGB Binaries *)
If[ StringPosition[ $OperatingSystem, "indows" ] == {},
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "Binary"}]];
,
AppendTo[$Path,ToFileName[{$NC$Dir, "NCGB", "Binary", "p9c", "Windows"}]];
];
(* Setting NCExtras Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "NCExtras" }]];
(* Setting NCTeX Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "NCTeX" }]];
(* Setting NCSDP Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "NCSDP" }]];
(* Setting NCPoly Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "NCPoly" }]];
(* Setting TESTING Path *)
AppendTo[$Path,ToFileName[{$NC$Dir, "TESTING"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "TESTING", "NCAlgebra"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "TESTING", "NCSDP"}]];
AppendTo[$Path,ToFileName[{$NC$Dir, "TESTING", "NCPoly"}]];
(*
If[ verbose
,
Print["You can now use \"<< NCAlgebra`\" to load NCAlgebra."];
];
*)
,
(* Did not find NC` *)
Print["ERROR: Could not find NC directory. See documentation for installation information."];
];
End[]
EndPackage[];