java.lang.Object
org.rrd4j.graph.LogService

class LogServiceextends Object
Utility service for logarithmic scaling operations in RRD graphs. Provides appropriate logarithmic functions based on data ranges and characteristics.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Utility class, not intended for instantiation.
  • Method Summary

    Private Methods
    Modifier and Type
    Method
    Description
    private static double
    log10(double v)
    Compute base-10 logarithm with zero-crossing protection
    private static double
    log10(double v, double correction, double minval)
    Compute logarithm for the purposes of y-axis.
    (package private) static java.util.function.DoubleUnaryOperator
    Resolve the appropriate logarithmic function for the data range

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogService

      private LogService()
      Utility class, not intended for instantiation.
  • Method Details

    • resolve

      static java.util.function.DoubleUnaryOperator resolve(ImageParameters im)
      Resolve the appropriate logarithmic function for the data range
      Parameters:
      im - the image parameters whose minimum and maximum define the data range
      Returns:
      the operator mapping a value to its log-scaled y-axis position
    • log10

      private static double log10(double v, double correction, double minval)
      Compute logarithm for the purposes of y-axis.
      Parameters:
      v - the data value to scale
      correction - multiplicative factor bringing the value into log range
      minval - the axis minimum, mapped to zero
      Returns:
      the log-scaled value carrying the sign of v, never negative
    • log10

      private static double log10(double v)
      Compute base-10 logarithm with zero-crossing protection
      Parameters:
      v - the data value to scale
      Returns:
      the log-scaled value carrying the sign of v, never negative