Package jline
Class GlobalConstants
java.lang.Object
jline.GlobalConstants
Global constants for tolerances and solver configuration.
This class defines system-wide constants used throughout the LINE solver including:
- Numerical tolerances for convergence checks
- Special values (infinity, zero threshold)
- Version information
- Verbosity settings
The class follows a singleton pattern to ensure consistent configuration across all solver components.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleCoarse tolerance for approximate comparisons (1e-3)static final booleanDebug mode flagstatic final doubleFine tolerance for precise comparisons (1e-8)static final doubleValue representing immediate service (1/FineTol)static final doublePositive infinity constantstatic final intMaximum integer valuestatic final doubleNegative infinity constantstatic VerboseLevelGlobal verbosity level for solver outputstatic final StringLINE solver versionstatic final doubleThreshold below which values are considered zero (1e-14) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleGets the coarse tolerance value.static doubleGets the fine tolerance value.static GlobalConstantsReturns the singleton instance of GlobalConstants.static intGets the maximum integer value.static VerboseLevelGets the current verbosity level.static StringGets the LINE solver version.static doublegetZero()Gets the zero threshold value.static voidsetVerbose(VerboseLevel verbosity) Sets the verbosity level for solver output.
-
Field Details
-
CoarseTol
public static final double CoarseTolCoarse tolerance for approximate comparisons (1e-3)- See Also:
-
DummyMode
public static final boolean DummyModeDebug mode flag- See Also:
-
FineTol
public static final double FineTolFine tolerance for precise comparisons (1e-8)- See Also:
-
Immediate
public static final double ImmediateValue representing immediate service (1/FineTol)- See Also:
-
Inf
public static final double InfPositive infinity constant- See Also:
-
MaxInt
public static final int MaxIntMaximum integer value- See Also:
-
NegInf
public static final double NegInfNegative infinity constant- See Also:
-
Version
LINE solver version- See Also:
-
Zero
public static final double ZeroThreshold below which values are considered zero (1e-14)- See Also:
-
Verbose
Global verbosity level for solver output
-
-
Constructor Details
-
GlobalConstants
public GlobalConstants()
-
-
Method Details
-
getInstance
Returns the singleton instance of GlobalConstants. Creates the instance if it doesn't exist.- Returns:
- the singleton GlobalConstants instance
-
getVerbose
Gets the current verbosity level.- Returns:
- the current VerboseLevel setting
-
setVerbose
Sets the verbosity level for solver output.- Parameters:
verbosity- the desired verbosity level
-
getCoarseTol
public static double getCoarseTol()Gets the coarse tolerance value.- Returns:
- coarse tolerance (1e-3)
-
getFineTol
public static double getFineTol()Gets the fine tolerance value.- Returns:
- fine tolerance (1e-8)
-
getZero
public static double getZero()Gets the zero threshold value.- Returns:
- zero threshold (1e-14)
-
getMaxInt
public static int getMaxInt()Gets the maximum integer value.- Returns:
- maximum integer value
-
getVersion
Gets the LINE solver version.- Returns:
- version string
-