Class LinTrendAccumulator


public final class LinTrendAccumulator
extends Object
Maintains the components needed to compute the linear regression on a set of (long, long) pairs. The intermediate results are held in the form of BigInteger and the finished value is a double-valued linear coefficient.
  • Constructor Details

    • LinTrendAccumulator

      public LinTrendAccumulator()
      Constructs a new accumulator with all components at zero.
    • LinTrendAccumulator

      public LinTrendAccumulator​(long n, BigInteger sumX, BigInteger sumY, BigInteger sumXY, BigInteger sumX2)
      Creates a new accumulator with the given components. Intended only for testing and deserialization.
  • Method Details