public final class com.google.common.math.PairedStatsAccumulator extends java.lang.Object
{
private final com.google.common.math.StatsAccumulator xStats;
private final com.google.common.math.StatsAccumulator yStats;
private double sumOfProductsOfDeltas;
public void <init>()
{
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new com.google.common.math.StatsAccumulator;
specialinvoke v.<com.google.common.math.StatsAccumulator: void <init>()>();
v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats> = v;
v = new com.google.common.math.StatsAccumulator;
specialinvoke v.<com.google.common.math.StatsAccumulator: void <init>()>();
v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats> = v;
v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas> = 0.0;
return;
}
public void add(double, double)
{
long v;
byte v;
boolean v, v;
double v, v, v, v, v, v, v, v, v;
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v, v, v, v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v := @parameter: double;
v := @parameter: double;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
virtualinvoke v.<com.google.common.math.StatsAccumulator: void add(double)>(v);
v = staticinvoke <com.google.common.primitives.Doubles: boolean isFinite(double)>(v);
if v == 0 goto label;
v = staticinvoke <com.google.common.primitives.Doubles: boolean isFinite(double)>(v);
if v == 0 goto label;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: long count()>();
v = v cmp 1L;
if v <= 0 goto label;
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = v - v;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = v - v;
v = v * v;
v = v + v;
v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas> = v;
goto label;
label:
v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas> = #NaN;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
virtualinvoke v.<com.google.common.math.StatsAccumulator: void add(double)>(v);
return;
}
public void addAll(com.google.common.math.PairedStats)
{
long v, v, v;
byte v, v;
double v, v, v, v, v, v, v, v, v, v, v, v, v;
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v, v, v, v, v;
com.google.common.math.Stats v, v, v, v;
com.google.common.math.PairedStats v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v := @parameter: com.google.common.math.PairedStats;
v = virtualinvoke v.<com.google.common.math.PairedStats: long count()>();
v = v cmp 0L;
if v != 0 goto label;
return;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.PairedStats: com.google.common.math.Stats xStats()>();
virtualinvoke v.<com.google.common.math.StatsAccumulator: void addAll(com.google.common.math.Stats)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: long count()>();
v = v cmp 0L;
if v != 0 goto label;
v = virtualinvoke v.<com.google.common.math.PairedStats: double sumOfProductsOfDeltas()>();
v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas> = v;
goto label;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = virtualinvoke v.<com.google.common.math.PairedStats: double sumOfProductsOfDeltas()>();
v = virtualinvoke v.<com.google.common.math.PairedStats: com.google.common.math.Stats xStats()>();
v = virtualinvoke v.<com.google.common.math.Stats: double mean()>();
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = v - v;
v = virtualinvoke v.<com.google.common.math.PairedStats: com.google.common.math.Stats yStats()>();
v = virtualinvoke v.<com.google.common.math.Stats: double mean()>();
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = v - v;
v = v * v;
v = virtualinvoke v.<com.google.common.math.PairedStats: long count()>();
v = v * v;
v = v + v;
v = v + v;
v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas> = v;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.PairedStats: com.google.common.math.Stats yStats()>();
virtualinvoke v.<com.google.common.math.StatsAccumulator: void addAll(com.google.common.math.Stats)>(v);
return;
}
public com.google.common.math.PairedStats snapshot()
{
com.google.common.math.Stats v, v;
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.PairedStats v;
com.google.common.math.StatsAccumulator v, v;
double v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = new com.google.common.math.PairedStats;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: com.google.common.math.Stats snapshot()>();
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: com.google.common.math.Stats snapshot()>();
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
specialinvoke v.<com.google.common.math.PairedStats: void <init>(com.google.common.math.Stats,com.google.common.math.Stats,double)>(v, v, v);
return v;
}
public long count()
{
com.google.common.math.PairedStatsAccumulator v;
long v;
com.google.common.math.StatsAccumulator v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: long count()>();
return v;
}
public com.google.common.math.Stats xStats()
{
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v;
com.google.common.math.Stats v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: com.google.common.math.Stats snapshot()>();
return v;
}
public com.google.common.math.Stats yStats()
{
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v;
com.google.common.math.Stats v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: com.google.common.math.Stats snapshot()>();
return v;
}
public double populationCovariance()
{
byte v;
com.google.common.math.PairedStatsAccumulator v;
long v, v;
boolean v;
double v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v cmp 0L;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v / v;
return v;
}
public final double sampleCovariance()
{
com.google.common.math.PairedStatsAccumulator v;
long v, v, v;
byte v;
boolean v;
double v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v cmp 1L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v - 1L;
v = v / v;
return v;
}
public final double pearsonsCorrelationCoefficient()
{
long v;
byte v, v, v;
boolean v, v, v, v;
double v, v, v, v, v, v, v, v, v;
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v cmp 1L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = staticinvoke <java.lang.Double: boolean isNaN(double)>(v);
if v == 0 goto label;
return #NaN;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double sumOfSquaresOfDeltas()>();
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double sumOfSquaresOfDeltas()>();
v = v cmpl 0.0;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v cmpl 0.0;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v * v;
v = specialinvoke v.<com.google.common.math.PairedStatsAccumulator: double ensurePositive(double)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = staticinvoke <java.lang.Math: double sqrt(double)>(v);
v = v / v;
v = staticinvoke <com.google.common.math.PairedStatsAccumulator: double ensureInUnitRange(double)>(v);
return v;
}
public final com.google.common.math.LinearTransformation leastSquaresFit()
{
long v;
com.google.common.math.LinearTransformation$LinearTransformationBuilder v;
byte v, v, v, v;
boolean v, v, v;
double v, v, v, v, v, v, v, v, v, v;
com.google.common.math.PairedStatsAccumulator v;
com.google.common.math.StatsAccumulator v, v, v, v, v, v, v;
com.google.common.math.LinearTransformation v, v, v, v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v = virtualinvoke v.<com.google.common.math.PairedStatsAccumulator: long count()>();
v = v cmp 1L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = staticinvoke <java.lang.Double: boolean isNaN(double)>(v);
if v == 0 goto label;
v = staticinvoke <com.google.common.math.LinearTransformation: com.google.common.math.LinearTransformation forNaN()>();
return v;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double sumOfSquaresOfDeltas()>();
v = v cmpl 0.0;
if v <= 0 goto label;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double sumOfSquaresOfDeltas()>();
v = v cmpl 0.0;
if v <= 0 goto label;
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = staticinvoke <com.google.common.math.LinearTransformation: com.google.common.math.LinearTransformation$LinearTransformationBuilder mapping(double,double)>(v, v);
v = v.<com.google.common.math.PairedStatsAccumulator: double sumOfProductsOfDeltas>;
v = v / v;
v = virtualinvoke v.<com.google.common.math.LinearTransformation$LinearTransformationBuilder: com.google.common.math.LinearTransformation withSlope(double)>(v);
return v;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = staticinvoke <com.google.common.math.LinearTransformation: com.google.common.math.LinearTransformation horizontal(double)>(v);
return v;
label:
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator yStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double sumOfSquaresOfDeltas()>();
v = v cmpl 0.0;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean)>(v);
v = v.<com.google.common.math.PairedStatsAccumulator: com.google.common.math.StatsAccumulator xStats>;
v = virtualinvoke v.<com.google.common.math.StatsAccumulator: double mean()>();
v = staticinvoke <com.google.common.math.LinearTransformation: com.google.common.math.LinearTransformation vertical(double)>(v);
return v;
}
private double ensurePositive(double)
{
com.google.common.math.PairedStatsAccumulator v;
byte v;
double v;
v := @this: com.google.common.math.PairedStatsAccumulator;
v := @parameter: double;
v = v cmpl 0.0;
if v <= 0 goto label;
return v;
label:
return 4.9E-324;
}
private static double ensureInUnitRange(double)
{
double v, v;
v := @parameter: double;
v = staticinvoke <com.google.common.primitives.Doubles: double constrainToRange(double,double,double)>(v, -1.0, 1.0);
return v;
}
}