LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
GlobalConstants.m
1classdef GlobalConstants
2 % GlobalConstants System-wide constants and configuration parameters
3 %
4 % GlobalConstants provides centralized access to global constants, tolerances,
5 % and configuration parameters used throughout the LINE framework. It manages
6 % numerical tolerances, verbosity levels, version information, and other
7 % system-wide settings through static methods and global variables.
8 %
9 % @brief Centralized global constants and configuration management
10 %
11 % Key characteristics:
12 % - Centralized constant management
13 % - Numerical tolerance configuration
14 % - System-wide parameter access
15 % - Version and build information
16 % - Debugging and verbosity controls
17 %
18 % Global constants include:
19 % - Numerical tolerances (FineTol, CoarseTol)
20 % - Special values (Zero, MaxInt, Immediate)
21 % - System configuration (Verbose, DummyMode)
22 % - Version information and build details
23 % - Output stream redirection (StdOut)
24 %
25 % GlobalConstants is used for:
26 % - Consistent numerical precision across LINE
27 % - Global configuration management
28 % - Debugging and verbosity control
29 % - Version compatibility checking
30 % - System-wide parameter standardization
31 %
32 % Example:
33 % @code
34 % if abs(value) < GlobalConstants.FineTol()
35 % % Handle near-zero values
36 % end
37 % if GlobalConstants.Verbose() > 1
38 % fprintf('Debug information\n');
39 % end
40 % @endcode
41 %
42 % Copyright (c) 2012-2026, Imperial College London
43 % All rights reserved.
44
45 methods (Static)
46 function can=DummyMode()
47 global LINEDummyMode
48 can = LINEDummyMode;
49 end
50
51 function stdo=StdOut()
52 global LINEStdOut
53 stdo = LINEStdOut;
54 end
55
56 function tol=Immediate()
57 global LINEImmediate
58 tol = LINEImmediate;
59 end
60
61 function tol=MaxInt()
62 global LINEMaxInt
63 tol = LINEMaxInt;
64 end
65
66 function tol=Zero()
67 global LINEZero
68 tol = LINEZero;
69 end
70
71 function tol=CoarseTol()
72 global LINECoarseTol
73 tol = LINECoarseTol;
74 end
75
76 function tol=FineTol()
77 global LINEFineTol
78 tol = LINEFineTol;
79 end
80
81 function verbose=Verbose()
82 global LINEVerbose
83 verbose = LINEVerbose;
84 end
85
86 function ver=Version()
87 global LINEVersion
88 ver = LINEVersion;
89 end
90
91 function setChecks(val)
92 global LINEChecks
93 LINEChecks = val;
94 end
95
96 function setStdOut(val)
97 global LINEStdOut
98 LINEStdOut = val;
99 end
100
101 function setImmediate(val)
102 global LINEImmediate
103 LINEImmediate = val;
104 end
105
106 function setDummyMode(val)
107 global LINEDummyMode
108 LINEDummyMode = val;
109 end
110
111 function setMaxInt(val)
112 global LINEMaxInt
113 LINEMaxInt = val;
114 end
115
116 function setZero(val)
117 global LINEZero
118 LINEZero = val;
119 end
120
121 function setCoarseTol(val)
122 global LINECoarseTol
123 LINECoarseTol = val;
124 end
125
126 function setFineTol(val)
127 global LINEFineTol
128 LINEFineTol = val;
129 end
130
131 function setVerbose(val)
132 global LINEVerbose
133 LINEVerbose = val;
134 end
135
136 function verbose = getVerbose()
137 global LINEVerbose
138 verbose = LINEVerbose;
139 end
140
141 function setVersion(val)
142 global LINEVersion
143 LINEVersion = val;
144 end
145 end
146end