Class LinTrendAccumulator

java.lang.Object
com.hazelcast.jet.accumulator.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.
Since:
Jet 3.0
  • 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