Package jline

Class GlobalConstants

java.lang.Object
jline.GlobalConstants

public class GlobalConstants extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Coarse tolerance for approximate comparisons (1e-3)
    static final boolean
    Debug mode flag
    static final double
    Fine tolerance for precise comparisons (1e-8)
    static final double
    Value representing immediate service (1/FineTol)
    static final double
    Positive infinity constant
    static final int
    Maximum integer value
    static final double
    Negative infinity constant
    Global verbosity level for solver output
    static final String
    LINE solver version
    static final double
    Threshold below which values are considered zero (1e-14)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    Gets the coarse tolerance value.
    static double
    Gets the fine tolerance value.
    Returns the singleton instance of GlobalConstants.
    static int
    Gets the maximum integer value.
    Gets the current verbosity level.
    static String
    Gets the LINE solver version.
    static double
    Gets the zero threshold value.
    static void
    Sets the verbosity level for solver output.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CoarseTol

      public static final double CoarseTol
      Coarse tolerance for approximate comparisons (1e-3)
      See Also:
    • DummyMode

      public static final boolean DummyMode
      Debug mode flag
      See Also:
    • FineTol

      public static final double FineTol
      Fine tolerance for precise comparisons (1e-8)
      See Also:
    • Immediate

      public static final double Immediate
      Value representing immediate service (1/FineTol)
      See Also:
    • Inf

      public static final double Inf
      Positive infinity constant
      See Also:
    • MaxInt

      public static final int MaxInt
      Maximum integer value
      See Also:
    • NegInf

      public static final double NegInf
      Negative infinity constant
      See Also:
    • Version

      public static final String Version
      LINE solver version
      See Also:
    • Zero

      public static final double Zero
      Threshold below which values are considered zero (1e-14)
      See Also:
    • Verbose

      public static VerboseLevel Verbose
      Global verbosity level for solver output
  • Constructor Details

    • GlobalConstants

      public GlobalConstants()
  • Method Details

    • getInstance

      public static GlobalConstants getInstance()
      Returns the singleton instance of GlobalConstants. Creates the instance if it doesn't exist.
      Returns:
      the singleton GlobalConstants instance
    • getVerbose

      public static VerboseLevel getVerbose()
      Gets the current verbosity level.
      Returns:
      the current VerboseLevel setting
    • setVerbose

      public static void setVerbose(VerboseLevel verbosity)
      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

      public static String getVersion()
      Gets the LINE solver version.
      Returns:
      version string