public final class LinTrendAccumulator extends Object
(long, long)
pairs. The intermediate results are held in
the form of BigInteger
and the finished value is a double
-valued linear coefficient.Constructor and Description |
---|
LinTrendAccumulator()
Constructs a new accumulator with all components at zero.
|
LinTrendAccumulator(long n,
BigInteger sumX,
BigInteger sumY,
BigInteger sumXY,
BigInteger sumX2)
Creates a new accumulator with the given components.
|
Modifier and Type | Method and Description |
---|---|
LinTrendAccumulator |
accumulate(long x,
long y)
Accumulates a new sample.
|
LinTrendAccumulator |
combine(LinTrendAccumulator that)
Combines this accumulator with the supplied one.
|
LinTrendAccumulator |
deduct(LinTrendAccumulator that)
Deducts the supplied accumulator from this one.
|
boolean |
equals(Object obj) |
double |
export()
Computes the linear coefficient of the linear regression of the
accumulated samples.
|
int |
hashCode() |
void |
writeObject(ObjectDataOutput out)
Serializes this accumulator.
|
public LinTrendAccumulator()
public LinTrendAccumulator(long n, BigInteger sumX, BigInteger sumY, BigInteger sumXY, BigInteger sumX2)
public LinTrendAccumulator accumulate(long x, long y)
public LinTrendAccumulator combine(LinTrendAccumulator that)
public LinTrendAccumulator deduct(LinTrendAccumulator that)
public double export()
public void writeObject(ObjectDataOutput out) throws IOException
IOException
Copyright © 2024 Hazelcast, Inc.. All rights reserved.