This commit is contained in:
2022-06-10 21:38:30 +09:00
commit 27f5152838
51323 changed files with 12934539 additions and 0 deletions
@@ -0,0 +1,148 @@
.class Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
.super Lcom/google/common/math/ToDoubleRounder;
.source "BigDecimalMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/BigDecimalMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "BigDecimalToDoubleRounder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/math/ToDoubleRounder<",
"Ljava/math/BigDecimal;",
">;"
}
.end annotation
# static fields
.field public static final INSTANCE:Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
invoke-direct {v0}, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;-><init>()V
sput-object v0, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->INSTANCE:Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/math/ToDoubleRounder;-><init>()V
return-void
.end method
# virtual methods
.method public bridge synthetic minus(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
.locals 0
.line 1
check-cast p1, Ljava/math/BigDecimal;
check-cast p2, Ljava/math/BigDecimal;
invoke-virtual {p0, p1, p2}, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->minus(Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
move-result-object p1
return-object p1
.end method
.method public minus(Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
.locals 0
.line 2
invoke-virtual {p1, p2}, Ljava/math/BigDecimal;->subtract(Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic roundToDoubleArbitrarily(Ljava/lang/Number;)D
.locals 2
.line 1
check-cast p1, Ljava/math/BigDecimal;
invoke-virtual {p0, p1}, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->roundToDoubleArbitrarily(Ljava/math/BigDecimal;)D
move-result-wide v0
return-wide v0
.end method
.method public roundToDoubleArbitrarily(Ljava/math/BigDecimal;)D
.locals 2
.line 2
invoke-virtual {p1}, Ljava/math/BigDecimal;->doubleValue()D
move-result-wide v0
return-wide v0
.end method
.method public bridge synthetic sign(Ljava/lang/Number;)I
.locals 0
.line 1
check-cast p1, Ljava/math/BigDecimal;
invoke-virtual {p0, p1}, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->sign(Ljava/math/BigDecimal;)I
move-result p1
return p1
.end method
.method public sign(Ljava/math/BigDecimal;)I
.locals 0
.line 2
invoke-virtual {p1}, Ljava/math/BigDecimal;->signum()I
move-result p1
return p1
.end method
.method public bridge synthetic toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
.locals 0
.line 1
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->toX(DLjava/math/RoundingMode;)Ljava/math/BigDecimal;
move-result-object p1
return-object p1
.end method
.method public toX(DLjava/math/RoundingMode;)Ljava/math/BigDecimal;
.locals 0
.line 2
new-instance p3, Ljava/math/BigDecimal;
invoke-direct {p3, p1, p2}, Ljava/math/BigDecimal;-><init>(D)V
return-object p3
.end method
@@ -0,0 +1,41 @@
.class public Lcom/google/common/math/BigDecimalMath;
.super Ljava/lang/Object;
.source "BigDecimalMath.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static roundToDouble(Ljava/math/BigDecimal;Ljava/math/RoundingMode;)D
.locals 1
.line 1
sget-object v0, Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;->INSTANCE:Lcom/google/common/math/BigDecimalMath$BigDecimalToDoubleRounder;
invoke-virtual {v0, p0, p1}, Lcom/google/common/math/ToDoubleRounder;->roundToDouble(Ljava/lang/Number;Ljava/math/RoundingMode;)D
move-result-wide p0
return-wide p0
.end method
@@ -0,0 +1,163 @@
.class synthetic Lcom/google/common/math/BigIntegerMath$1;
.super Ljava/lang/Object;
.source "BigIntegerMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/BigIntegerMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$java$math$RoundingMode:[I
# direct methods
.method public static constructor <clinit>()V
.locals 3
.line 1
invoke-static {}, Ljava/math/RoundingMode;->values()[Ljava/math/RoundingMode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
:try_start_0
sget-object v1, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v0, Lcom/google/common/math/BigIntegerMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_EVEN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
return-void
.end method
@@ -0,0 +1,151 @@
.class Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;
.super Lcom/google/common/math/ToDoubleRounder;
.source "BigIntegerMath.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/BigIntegerMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "BigIntegerToDoubleRounder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/math/ToDoubleRounder<",
"Ljava/math/BigInteger;",
">;"
}
.end annotation
# static fields
.field public static final INSTANCE:Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;
invoke-direct {v0}, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;-><init>()V
sput-object v0, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;->INSTANCE:Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/math/ToDoubleRounder;-><init>()V
return-void
.end method
# virtual methods
.method public bridge synthetic minus(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
.locals 0
.line 1
check-cast p1, Ljava/math/BigInteger;
check-cast p2, Ljava/math/BigInteger;
invoke-virtual {p0, p1, p2}, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;->minus(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object p1
return-object p1
.end method
.method public minus(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
.locals 0
.line 2
invoke-virtual {p1, p2}, Ljava/math/BigInteger;->subtract(Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic roundToDoubleArbitrarily(Ljava/lang/Number;)D
.locals 2
.line 1
check-cast p1, Ljava/math/BigInteger;
invoke-virtual {p0, p1}, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;->roundToDoubleArbitrarily(Ljava/math/BigInteger;)D
move-result-wide v0
return-wide v0
.end method
.method public roundToDoubleArbitrarily(Ljava/math/BigInteger;)D
.locals 2
.line 2
invoke-static {p1}, Lcom/google/common/math/DoubleUtils;->bigToDouble(Ljava/math/BigInteger;)D
move-result-wide v0
return-wide v0
.end method
.method public bridge synthetic sign(Ljava/lang/Number;)I
.locals 0
.line 1
check-cast p1, Ljava/math/BigInteger;
invoke-virtual {p0, p1}, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;->sign(Ljava/math/BigInteger;)I
move-result p1
return p1
.end method
.method public sign(Ljava/math/BigInteger;)I
.locals 0
.line 2
invoke-virtual {p1}, Ljava/math/BigInteger;->signum()I
move-result p1
return p1
.end method
.method public bridge synthetic toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
.locals 0
.line 1
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder;->toX(DLjava/math/RoundingMode;)Ljava/math/BigInteger;
move-result-object p1
return-object p1
.end method
.method public toX(DLjava/math/RoundingMode;)Ljava/math/BigInteger;
.locals 0
.line 2
invoke-static {p1, p2, p3}, Lcom/google/common/math/DoubleMath;->roundToBigInteger(DLjava/math/RoundingMode;)Ljava/math/BigInteger;
move-result-object p1
return-object p1
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,163 @@
.class synthetic Lcom/google/common/math/DoubleMath$1;
.super Ljava/lang/Object;
.source "DoubleMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/DoubleMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$java$math$RoundingMode:[I
# direct methods
.method public static constructor <clinit>()V
.locals 3
.line 1
invoke-static {}, Ljava/math/RoundingMode;->values()[Ljava/math/RoundingMode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
:try_start_0
sget-object v1, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_EVEN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v0, Lcom/google/common/math/DoubleMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
return-void
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,327 @@
.class final Lcom/google/common/math/DoubleUtils;
.super Ljava/lang/Object;
.source "DoubleUtils.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
# static fields
.field public static final EXPONENT_BIAS:I = 0x3ff
.field public static final EXPONENT_MASK:J = 0x7ff0000000000000L
.field public static final IMPLICIT_BIT:J = 0x10000000000000L
.field public static final ONE_BITS:J = 0x3ff0000000000000L
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.end field
.field public static final SIGNIFICAND_BITS:I = 0x34
.field public static final SIGNIFICAND_MASK:J = 0xfffffffffffffL
.field public static final SIGN_MASK:J = -0x8000000000000000L
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static bigToDouble(Ljava/math/BigInteger;)D
.locals 13
.line 1
invoke-virtual {p0}, Ljava/math/BigInteger;->abs()Ljava/math/BigInteger;
move-result-object v0
.line 2
invoke-virtual {v0}, Ljava/math/BigInteger;->bitLength()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
const/16 v3, 0x3f
if-ge v1, v3, :cond_0
.line 3
invoke-virtual {p0}, Ljava/math/BigInteger;->longValue()J
move-result-wide v0
long-to-double v0, v0
return-wide v0
:cond_0
const/16 v3, 0x3ff
if-le v1, v3, :cond_1
.line 4
invoke-virtual {p0}, Ljava/math/BigInteger;->signum()I
move-result p0
int-to-double v0, p0
const-wide/high16 v2, 0x7ff0000000000000L # Double.POSITIVE_INFINITY
mul-double/2addr v0, v2
return-wide v0
:cond_1
add-int/lit8 v4, v1, -0x34
sub-int/2addr v4, v2
.line 5
invoke-virtual {v0, v4}, Ljava/math/BigInteger;->shiftRight(I)Ljava/math/BigInteger;
move-result-object v5
invoke-virtual {v5}, Ljava/math/BigInteger;->longValue()J
move-result-wide v5
shr-long v7, v5, v2
const-wide v9, 0xfffffffffffffL
and-long/2addr v7, v9
const-wide/16 v9, 0x1
and-long/2addr v5, v9
const-wide/16 v11, 0x0
cmp-long v5, v5, v11
if-eqz v5, :cond_2
and-long v5, v7, v9
cmp-long v5, v5, v11
if-nez v5, :cond_3
.line 6
invoke-virtual {v0}, Ljava/math/BigInteger;->getLowestSetBit()I
move-result v0
if-ge v0, v4, :cond_2
goto :goto_0
:cond_2
const/4 v2, 0x0
:cond_3
:goto_0
if-eqz v2, :cond_4
add-long/2addr v7, v9
:cond_4
add-int/2addr v1, v3
int-to-long v0, v1
const/16 v2, 0x34
shl-long/2addr v0, v2
add-long/2addr v0, v7
.line 7
invoke-virtual {p0}, Ljava/math/BigInteger;->signum()I
move-result p0
int-to-long v2, p0
const-wide/high16 v4, -0x8000000000000000L
and-long/2addr v2, v4
or-long/2addr v0, v2
.line 8
invoke-static {v0, v1}, Ljava/lang/Double;->longBitsToDouble(J)D
move-result-wide v0
return-wide v0
.end method
.method public static ensureNonNegative(D)D
.locals 2
.line 1
invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
xor-int/lit8 v0, v0, 0x1
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
const-wide/16 v0, 0x0
.line 2
invoke-static {p0, p1, v0, v1}, Ljava/lang/Math;->max(DD)D
move-result-wide p0
return-wide p0
.end method
.method public static getSignificand(D)J
.locals 3
.line 1
invoke-static {p0, p1}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
const-string v1, "not a normal value"
invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 2
invoke-static {p0, p1}, Ljava/lang/Math;->getExponent(D)I
move-result v0
.line 3
invoke-static {p0, p1}, Ljava/lang/Double;->doubleToRawLongBits(D)J
move-result-wide p0
const-wide v1, 0xfffffffffffffL
and-long/2addr p0, v1
const/16 v1, -0x3ff
if-ne v0, v1, :cond_0
const/4 v0, 0x1
shl-long/2addr p0, v0
goto :goto_0
:cond_0
const-wide/high16 v0, 0x10000000000000L
or-long/2addr p0, v0
:goto_0
return-wide p0
.end method
.method public static isFinite(D)Z
.locals 0
.line 1
invoke-static {p0, p1}, Ljava/lang/Math;->getExponent(D)I
move-result p0
const/16 p1, 0x3ff
if-gt p0, p1, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public static isNormal(D)Z
.locals 0
.line 1
invoke-static {p0, p1}, Ljava/lang/Math;->getExponent(D)I
move-result p0
const/16 p1, -0x3fe
if-lt p0, p1, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public static nextDown(D)D
.locals 0
neg-double p0, p0
.line 1
invoke-static {p0, p1}, Ljava/lang/Math;->nextUp(D)D
move-result-wide p0
neg-double p0, p0
return-wide p0
.end method
.method public static scaleNormalize(D)D
.locals 2
.line 1
invoke-static {p0, p1}, Ljava/lang/Double;->doubleToRawLongBits(D)J
move-result-wide p0
const-wide v0, 0xfffffffffffffL
and-long/2addr p0, v0
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
or-long/2addr p0, v0
.line 2
invoke-static {p0, p1}, Ljava/lang/Double;->longBitsToDouble(J)D
move-result-wide p0
return-wide p0
.end method
@@ -0,0 +1,32 @@
.class interface abstract annotation Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.super Ljava/lang/Object;
.source "ElementTypesAreNonnullByDefault.java"
# interfaces
.implements Ljava/lang/annotation/Annotation;
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Ljava/lang/annotation/Retention;
value = .enum Ljava/lang/annotation/RetentionPolicy;->RUNTIME:Ljava/lang/annotation/RetentionPolicy;
.end annotation
.annotation runtime Ljava/lang/annotation/Target;
value = {
.enum Ljava/lang/annotation/ElementType;->TYPE:Ljava/lang/annotation/ElementType;
}
.end annotation
.annotation runtime Ljavax/annotation/Nonnull;
.end annotation
.annotation runtime Ljavax/annotation/meta/TypeQualifierDefault;
value = {
.enum Ljava/lang/annotation/ElementType;->FIELD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->METHOD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->PARAMETER:Ljava/lang/annotation/ElementType;
}
.end annotation
@@ -0,0 +1,163 @@
.class synthetic Lcom/google/common/math/IntMath$1;
.super Ljava/lang/Object;
.source "IntMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/IntMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$java$math$RoundingMode:[I
# direct methods
.method public static constructor <clinit>()V
.locals 3
.line 1
invoke-static {}, Ljava/math/RoundingMode;->values()[Ljava/math/RoundingMode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
:try_start_0
sget-object v1, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v0, Lcom/google/common/math/IntMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_EVEN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
return-void
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
.class synthetic Lcom/google/common/math/LinearTransformation$1;
.super Ljava/lang/Object;
.source "LinearTransformation.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LinearTransformation;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,172 @@
.class public final Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
.super Ljava/lang/Object;
.source "LinearTransformation.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LinearTransformation;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "LinearTransformationBuilder"
.end annotation
# instance fields
.field private final x1:D
.field private final y1:D
# direct methods
.method private constructor <init>(DD)V
.locals 0
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
iput-wide p1, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->x1:D
.line 4
iput-wide p3, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->y1:D
return-void
.end method
.method public synthetic constructor <init>(DDLcom/google/common/math/LinearTransformation$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2, p3, p4}, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;-><init>(DD)V
return-void
.end method
# virtual methods
.method public and(DD)Lcom/google/common/math/LinearTransformation;
.locals 5
.line 1
invoke-static {p1, p2}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-eqz v0, :cond_0
invoke-static {p3, p4}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 2
iget-wide v3, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->x1:D
cmpl-double v0, p1, v3
if-nez v0, :cond_2
.line 3
iget-wide p1, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->y1:D
cmpl-double p1, p3, p1
if-eqz p1, :cond_1
goto :goto_1
:cond_1
move v1, v2
:goto_1
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 4
new-instance p1, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;
iget-wide p2, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->x1:D
invoke-direct {p1, p2, p3}, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;-><init>(D)V
return-object p1
.line 5
:cond_2
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->y1:D
sub-double/2addr p3, v0
sub-double/2addr p1, v3
div-double/2addr p3, p1
invoke-virtual {p0, p3, p4}, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->withSlope(D)Lcom/google/common/math/LinearTransformation;
move-result-object p1
return-object p1
.end method
.method public withSlope(D)Lcom/google/common/math/LinearTransformation;
.locals 4
.line 1
invoke-static {p1, p2}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
xor-int/lit8 v0, v0, 0x1
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 2
invoke-static {p1, p2}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
.line 3
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->y1:D
iget-wide v2, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->x1:D
mul-double/2addr v2, p1
sub-double/2addr v0, v2
.line 4
new-instance v2, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;
invoke-direct {v2, p1, p2, v0, v1}, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;-><init>(DD)V
return-object v2
.line 5
:cond_0
new-instance p1, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->x1:D
invoke-direct {p1, v0, v1}, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;-><init>(D)V
return-object p1
.end method
@@ -0,0 +1,90 @@
.class final Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;
.super Lcom/google/common/math/LinearTransformation;
.source "LinearTransformation.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LinearTransformation;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "NaNLinearTransformation"
.end annotation
# static fields
.field public static final INSTANCE:Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;
invoke-direct {v0}, Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;-><init>()V
sput-object v0, Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;->INSTANCE:Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation;-><init>()V
return-void
.end method
# virtual methods
.method public inverse()Lcom/google/common/math/LinearTransformation;
.locals 0
return-object p0
.end method
.method public isHorizontal()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public isVertical()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public slope()D
.locals 2
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.end method
.method public toString()Ljava/lang/String;
.locals 1
const-string v0, "NaN"
return-object v0
.end method
.method public transform(D)D
.locals 0
const-wide/high16 p1, 0x7ff8000000000000L # Double.NaN
return-wide p1
.end method
@@ -0,0 +1,227 @@
.class final Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;
.super Lcom/google/common/math/LinearTransformation;
.source "LinearTransformation.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LinearTransformation;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "RegularLinearTransformation"
.end annotation
# instance fields
.field public inverse:Lcom/google/common/math/LinearTransformation;
.annotation runtime Lcom/google/errorprone/annotations/concurrent/LazyInit;
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field public final slope:D
.field public final yIntercept:D
# direct methods
.method public constructor <init>(DD)V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation;-><init>()V
.line 2
iput-wide p1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
.line 3
iput-wide p3, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
const/4 p1, 0x0
.line 4
iput-object p1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
return-void
.end method
.method public constructor <init>(DDLcom/google/common/math/LinearTransformation;)V
.locals 0
.line 5
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation;-><init>()V
.line 6
iput-wide p1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
.line 7
iput-wide p3, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
.line 8
iput-object p5, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
return-void
.end method
.method private createInverse()Lcom/google/common/math/LinearTransformation;
.locals 10
.line 1
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
const-wide/16 v2, 0x0
cmpl-double v2, v0, v2
if-eqz v2, :cond_0
.line 2
new-instance v2, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;
const-wide/high16 v3, 0x3ff0000000000000L # 1.0
div-double v4, v3, v0
const-wide/high16 v6, -0x4010000000000000L # -1.0
iget-wide v8, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
mul-double/2addr v8, v6
div-double v6, v8, v0
move-object v3, v2
move-object v8, p0
invoke-direct/range {v3 .. v8}, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;-><init>(DDLcom/google/common/math/LinearTransformation;)V
return-object v2
.line 3
:cond_0
new-instance v0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;
iget-wide v1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
invoke-direct {v0, v1, v2, p0}, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;-><init>(DLcom/google/common/math/LinearTransformation;)V
return-object v0
.end method
# virtual methods
.method public inverse()Lcom/google/common/math/LinearTransformation;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
if-nez v0, :cond_0
.line 2
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->createInverse()Lcom/google/common/math/LinearTransformation;
move-result-object v0
iput-object v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
:cond_0
return-object v0
.end method
.method public isHorizontal()Z
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
const-wide/16 v2, 0x0
cmpl-double v0, v0, v2
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public isVertical()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public slope()D
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
return-wide v0
.end method
.method public toString()Ljava/lang/String;
.locals 3
const/4 v0, 0x2
new-array v0, v0, [Ljava/lang/Object;
.line 1
iget-wide v1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
invoke-static {v1, v2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v1
const/4 v2, 0x0
aput-object v1, v0, v2
iget-wide v1, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
invoke-static {v1, v2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v0, v2
const-string v1, "y = %g * x + %g"
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public transform(D)D
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->slope:D
mul-double/2addr p1, v0
iget-wide v0, p0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;->yIntercept:D
add-double/2addr p1, v0
return-wide p1
.end method
@@ -0,0 +1,165 @@
.class final Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;
.super Lcom/google/common/math/LinearTransformation;
.source "LinearTransformation.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LinearTransformation;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "VerticalLinearTransformation"
.end annotation
# instance fields
.field public inverse:Lcom/google/common/math/LinearTransformation;
.annotation runtime Lcom/google/errorprone/annotations/concurrent/LazyInit;
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field public final x:D
# direct methods
.method public constructor <init>(D)V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation;-><init>()V
.line 2
iput-wide p1, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->x:D
const/4 p1, 0x0
.line 3
iput-object p1, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
return-void
.end method
.method public constructor <init>(DLcom/google/common/math/LinearTransformation;)V
.locals 0
.line 4
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation;-><init>()V
.line 5
iput-wide p1, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->x:D
.line 6
iput-object p3, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
return-void
.end method
.method private createInverse()Lcom/google/common/math/LinearTransformation;
.locals 7
.line 1
new-instance v6, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;
iget-wide v3, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->x:D
const-wide/16 v1, 0x0
move-object v0, v6
move-object v5, p0
invoke-direct/range {v0 .. v5}, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;-><init>(DDLcom/google/common/math/LinearTransformation;)V
return-object v6
.end method
# virtual methods
.method public inverse()Lcom/google/common/math/LinearTransformation;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
if-nez v0, :cond_0
.line 2
invoke-direct {p0}, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->createInverse()Lcom/google/common/math/LinearTransformation;
move-result-object v0
iput-object v0, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->inverse:Lcom/google/common/math/LinearTransformation;
:cond_0
return-object v0
.end method
.method public isHorizontal()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public isVertical()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public slope()D
.locals 1
.line 1
new-instance v0, Ljava/lang/IllegalStateException;
invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
throw v0
.end method
.method public toString()Ljava/lang/String;
.locals 3
const/4 v0, 0x1
new-array v0, v0, [Ljava/lang/Object;
.line 1
iget-wide v1, p0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;->x:D
invoke-static {v1, v2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v1
const/4 v2, 0x0
aput-object v1, v0, v2
const-string v1, "x = %g"
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public transform(D)D
.locals 0
.line 1
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
.end method
@@ -0,0 +1,140 @@
.class public abstract Lcom/google/common/math/LinearTransformation;
.super Ljava/lang/Object;
.source "LinearTransformation.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;,
Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;,
Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;,
Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static forNaN()Lcom/google/common/math/LinearTransformation;
.locals 1
.line 1
sget-object v0, Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;->INSTANCE:Lcom/google/common/math/LinearTransformation$NaNLinearTransformation;
return-object v0
.end method
.method public static horizontal(D)Lcom/google/common/math/LinearTransformation;
.locals 3
.line 1
invoke-static {p0, p1}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 2
new-instance v0, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;
const-wide/16 v1, 0x0
invoke-direct {v0, v1, v2, p0, p1}, Lcom/google/common/math/LinearTransformation$RegularLinearTransformation;-><init>(DD)V
return-object v0
.end method
.method public static mapping(DD)Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
.locals 7
.line 1
invoke-static {p0, p1}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p2, p3}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 2
new-instance v0, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
const/4 v6, 0x0
move-object v1, v0
move-wide v2, p0
move-wide v4, p2
invoke-direct/range {v1 .. v6}, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;-><init>(DDLcom/google/common/math/LinearTransformation$1;)V
return-object v0
.end method
.method public static vertical(D)Lcom/google/common/math/LinearTransformation;
.locals 1
.line 1
invoke-static {p0, p1}, Lcom/google/common/math/DoubleUtils;->isFinite(D)Z
move-result v0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
.line 2
new-instance v0, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;
invoke-direct {v0, p0, p1}, Lcom/google/common/math/LinearTransformation$VerticalLinearTransformation;-><init>(D)V
return-object v0
.end method
# virtual methods
.method public abstract inverse()Lcom/google/common/math/LinearTransformation;
.end method
.method public abstract isHorizontal()Z
.end method
.method public abstract isVertical()Z
.end method
.method public abstract slope()D
.end method
.method public abstract transform(D)D
.end method
@@ -0,0 +1,163 @@
.class synthetic Lcom/google/common/math/LongMath$1;
.super Ljava/lang/Object;
.source "LongMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LongMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$java$math$RoundingMode:[I
# direct methods
.method public static constructor <clinit>()V
.locals 3
.line 1
invoke-static {}, Ljava/math/RoundingMode;->values()[Ljava/math/RoundingMode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
:try_start_0
sget-object v1, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v0, Lcom/google/common/math/LongMath$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_EVEN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
return-void
.end method
@@ -0,0 +1,51 @@
.class final enum Lcom/google/common/math/LongMath$MillerRabinTester$1;
.super Lcom/google/common/math/LongMath$MillerRabinTester;
.source "LongMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LongMath$MillerRabinTester;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4011
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lcom/google/common/math/LongMath$MillerRabinTester;-><init>(Ljava/lang/String;ILcom/google/common/math/LongMath$1;)V
return-void
.end method
# virtual methods
.method public mulMod(JJJ)J
.locals 0
mul-long/2addr p1, p3
.line 1
rem-long/2addr p1, p5
return-wide p1
.end method
.method public squareMod(JJ)J
.locals 0
mul-long/2addr p1, p1
.line 1
rem-long/2addr p1, p3
return-wide p1
.end method
@@ -0,0 +1,205 @@
.class final enum Lcom/google/common/math/LongMath$MillerRabinTester$2;
.super Lcom/google/common/math/LongMath$MillerRabinTester;
.source "LongMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LongMath$MillerRabinTester;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4011
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lcom/google/common/math/LongMath$MillerRabinTester;-><init>(Ljava/lang/String;ILcom/google/common/math/LongMath$1;)V
return-void
.end method
.method private plusMod(JJJ)J
.locals 2
sub-long v0, p5, p3
cmp-long v0, p1, v0
add-long/2addr p1, p3
if-ltz v0, :cond_0
sub-long/2addr p1, p5
:cond_0
return-wide p1
.end method
.method private times2ToThe32Mod(JJ)J
.locals 2
const/16 v0, 0x20
.line 1
:cond_0
invoke-static {p1, p2}, Ljava/lang/Long;->numberOfLeadingZeros(J)I
move-result v1
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v1
shl-long/2addr p1, v1
.line 2
invoke-static {p1, p2, p3, p4}, Lcom/google/common/primitives/UnsignedLongs;->remainder(JJ)J
move-result-wide p1
sub-int/2addr v0, v1
if-gtz v0, :cond_0
return-wide p1
.end method
# virtual methods
.method public mulMod(JJJ)J
.locals 14
move-object v7, p0
move-wide/from16 v5, p5
const/16 v0, 0x20
ushr-long v1, p1, v0
ushr-long v3, p3, v0
const-wide v8, 0xffffffffL
and-long v10, p1, v8
and-long v8, p3, v8
mul-long v12, v1, v3
.line 1
invoke-direct {p0, v12, v13, v5, v6}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->times2ToThe32Mod(JJ)J
move-result-wide v12
mul-long/2addr v1, v8
add-long/2addr v1, v12
const-wide/16 v12, 0x0
cmp-long v0, v1, v12
if-gez v0, :cond_0
.line 2
invoke-static {v1, v2, v5, v6}, Lcom/google/common/primitives/UnsignedLongs;->remainder(JJ)J
move-result-wide v1
:cond_0
mul-long/2addr v3, v10
add-long/2addr v3, v1
.line 3
invoke-direct {p0, v3, v4, v5, v6}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->times2ToThe32Mod(JJ)J
move-result-wide v1
mul-long/2addr v10, v8
.line 4
invoke-static {v10, v11, v5, v6}, Lcom/google/common/primitives/UnsignedLongs;->remainder(JJ)J
move-result-wide v3
move-object v0, p0
move-wide/from16 v5, p5
invoke-direct/range {v0 .. v6}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->plusMod(JJJ)J
move-result-wide v0
return-wide v0
.end method
.method public squareMod(JJ)J
.locals 11
const/16 v0, 0x20
ushr-long v0, p1, v0
const-wide v2, 0xffffffffL
and-long/2addr p1, v2
mul-long v2, v0, v0
.line 1
invoke-direct {p0, v2, v3, p3, p4}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->times2ToThe32Mod(JJ)J
move-result-wide v2
mul-long/2addr v0, p1
const-wide/16 v4, 0x2
mul-long/2addr v0, v4
const-wide/16 v4, 0x0
cmp-long v4, v0, v4
if-gez v4, :cond_0
.line 2
invoke-static {v0, v1, p3, p4}, Lcom/google/common/primitives/UnsignedLongs;->remainder(JJ)J
move-result-wide v0
:cond_0
add-long/2addr v2, v0
.line 3
invoke-direct {p0, v2, v3, p3, p4}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->times2ToThe32Mod(JJ)J
move-result-wide v5
mul-long/2addr p1, p1
.line 4
invoke-static {p1, p2, p3, p4}, Lcom/google/common/primitives/UnsignedLongs;->remainder(JJ)J
move-result-wide v7
move-object v4, p0
move-wide v9, p3
invoke-direct/range {v4 .. v10}, Lcom/google/common/math/LongMath$MillerRabinTester$2;->plusMod(JJJ)J
move-result-wide p1
return-wide p1
.end method
@@ -0,0 +1,300 @@
.class abstract enum Lcom/google/common/math/LongMath$MillerRabinTester;
.super Ljava/lang/Enum;
.source "LongMath.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/LongMath;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4409
name = "MillerRabinTester"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Enum<",
"Lcom/google/common/math/LongMath$MillerRabinTester;",
">;"
}
.end annotation
# static fields
.field private static final synthetic $VALUES:[Lcom/google/common/math/LongMath$MillerRabinTester;
.field public static final enum LARGE:Lcom/google/common/math/LongMath$MillerRabinTester;
.field public static final enum SMALL:Lcom/google/common/math/LongMath$MillerRabinTester;
# direct methods
.method private static synthetic $values()[Lcom/google/common/math/LongMath$MillerRabinTester;
.locals 3
const/4 v0, 0x2
new-array v0, v0, [Lcom/google/common/math/LongMath$MillerRabinTester;
.line 1
sget-object v1, Lcom/google/common/math/LongMath$MillerRabinTester;->SMALL:Lcom/google/common/math/LongMath$MillerRabinTester;
const/4 v2, 0x0
aput-object v1, v0, v2
sget-object v1, Lcom/google/common/math/LongMath$MillerRabinTester;->LARGE:Lcom/google/common/math/LongMath$MillerRabinTester;
const/4 v2, 0x1
aput-object v1, v0, v2
return-object v0
.end method
.method public static constructor <clinit>()V
.locals 3
.line 1
new-instance v0, Lcom/google/common/math/LongMath$MillerRabinTester$1;
const-string v1, "SMALL"
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lcom/google/common/math/LongMath$MillerRabinTester$1;-><init>(Ljava/lang/String;I)V
sput-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->SMALL:Lcom/google/common/math/LongMath$MillerRabinTester;
.line 2
new-instance v0, Lcom/google/common/math/LongMath$MillerRabinTester$2;
const-string v1, "LARGE"
const/4 v2, 0x1
invoke-direct {v0, v1, v2}, Lcom/google/common/math/LongMath$MillerRabinTester$2;-><init>(Ljava/lang/String;I)V
sput-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->LARGE:Lcom/google/common/math/LongMath$MillerRabinTester;
.line 3
invoke-static {}, Lcom/google/common/math/LongMath$MillerRabinTester;->$values()[Lcom/google/common/math/LongMath$MillerRabinTester;
move-result-object v0
sput-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->$VALUES:[Lcom/google/common/math/LongMath$MillerRabinTester;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;I)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
.line 1
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public synthetic constructor <init>(Ljava/lang/String;ILcom/google/common/math/LongMath$1;)V
.locals 0
.line 2
invoke-direct {p0, p1, p2}, Lcom/google/common/math/LongMath$MillerRabinTester;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method private powMod(JJJ)J
.locals 9
const-wide/16 v0, 0x1
move-wide v3, v0
:goto_0
const-wide/16 v5, 0x0
cmp-long v2, p3, v5
if-eqz v2, :cond_1
and-long v7, p3, v0
cmp-long v2, v7, v5
if-eqz v2, :cond_0
move-object v2, p0
move-wide v5, p1
move-wide v7, p5
.line 1
invoke-virtual/range {v2 .. v8}, Lcom/google/common/math/LongMath$MillerRabinTester;->mulMod(JJJ)J
move-result-wide v3
.line 2
:cond_0
invoke-virtual {p0, p1, p2, p5, p6}, Lcom/google/common/math/LongMath$MillerRabinTester;->squareMod(JJ)J
move-result-wide p1
const/4 v2, 0x1
shr-long/2addr p3, v2
goto :goto_0
:cond_1
return-wide v3
.end method
.method public static test(JJ)Z
.locals 2
const-wide v0, 0xb504f333L
cmp-long v0, p2, v0
if-gtz v0, :cond_0
.line 1
sget-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->SMALL:Lcom/google/common/math/LongMath$MillerRabinTester;
goto :goto_0
:cond_0
sget-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->LARGE:Lcom/google/common/math/LongMath$MillerRabinTester;
:goto_0
invoke-direct {v0, p0, p1, p2, p3}, Lcom/google/common/math/LongMath$MillerRabinTester;->testWitness(JJ)Z
move-result p0
return p0
.end method
.method private testWitness(JJ)Z
.locals 15
move-wide/from16 v7, p3
const-wide/16 v9, 0x1
sub-long v11, v7, v9
.line 1
invoke-static {v11, v12}, Ljava/lang/Long;->numberOfTrailingZeros(J)I
move-result v13
shr-long v3, v11, v13
.line 2
rem-long v1, p1, v7
const-wide/16 v5, 0x0
cmp-long v0, v1, v5
const/4 v14, 0x1
if-nez v0, :cond_0
return v14
:cond_0
move-object v0, p0
move-wide/from16 v5, p3
.line 3
invoke-direct/range {v0 .. v6}, Lcom/google/common/math/LongMath$MillerRabinTester;->powMod(JJJ)J
move-result-wide v0
cmp-long v2, v0, v9
if-nez v2, :cond_1
return v14
:cond_1
const/4 v2, 0x0
move v3, v2
:goto_0
cmp-long v4, v0, v11
if-eqz v4, :cond_3
add-int/2addr v3, v14
if-ne v3, v13, :cond_2
return v2
:cond_2
move-object v4, p0
.line 4
invoke-virtual {p0, v0, v1, v7, v8}, Lcom/google/common/math/LongMath$MillerRabinTester;->squareMod(JJ)J
move-result-wide v0
goto :goto_0
:cond_3
move-object v4, p0
return v14
.end method
.method public static valueOf(Ljava/lang/String;)Lcom/google/common/math/LongMath$MillerRabinTester;
.locals 1
.line 1
const-class v0, Lcom/google/common/math/LongMath$MillerRabinTester;
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lcom/google/common/math/LongMath$MillerRabinTester;
return-object p0
.end method
.method public static values()[Lcom/google/common/math/LongMath$MillerRabinTester;
.locals 1
.line 1
sget-object v0, Lcom/google/common/math/LongMath$MillerRabinTester;->$VALUES:[Lcom/google/common/math/LongMath$MillerRabinTester;
invoke-virtual {v0}, [Lcom/google/common/math/LongMath$MillerRabinTester;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/google/common/math/LongMath$MillerRabinTester;
return-object v0
.end method
# virtual methods
.method public abstract mulMod(JJJ)J
.end method
.method public abstract squareMod(JJ)J
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,505 @@
.class final Lcom/google/common/math/MathPreconditions;
.super Ljava/lang/Object;
.source "MathPreconditions.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
.annotation build Lcom/google/errorprone/annotations/CanIgnoreReturnValue;
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkInRangeForRoundingInputs(ZDLjava/math/RoundingMode;)V
.locals 2
if-eqz p0, :cond_0
return-void
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
invoke-static {p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
invoke-virtual {p3}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v0, v0, 0x53
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "rounded value is out of range for input "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;
const-string p1, " and rounding mode "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static checkNoOverflow(ZLjava/lang/String;II)V
.locals 2
if-eqz p0, :cond_0
return-void
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const/16 v0, 0x24
invoke-static {p1, v0}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "overflow: "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "("
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, ", "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, ")"
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static checkNoOverflow(ZLjava/lang/String;JJ)V
.locals 2
if-eqz p0, :cond_0
return-void
.line 2
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const/16 v0, 0x36
invoke-static {p1, v0}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "overflow: "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "("
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p1, ", "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p4, p5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p1, ")"
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static checkNonNegative(Ljava/lang/String;D)D
.locals 3
const-wide/16 v0, 0x0
cmpl-double v0, p1, v0
if-ltz v0, :cond_0
return-wide p1
.line 5
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/16 v1, 0x28
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " ("
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1, p2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;
const-string p0, ") must be >= 0"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkNonNegative(Ljava/lang/String;I)I
.locals 3
if-ltz p1, :cond_0
return p1
.line 1
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/16 v1, 0x1b
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " ("
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p0, ") must be >= 0"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkNonNegative(Ljava/lang/String;J)J
.locals 3
const-wide/16 v0, 0x0
cmp-long v0, p1, v0
if-ltz v0, :cond_0
return-wide p1
.line 2
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/16 v1, 0x24
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " ("
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p0, ") must be >= 0"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkNonNegative(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
.locals 4
.line 3
invoke-virtual {p1}, Ljava/math/BigInteger;->signum()I
move-result v0
if-ltz v0, :cond_0
return-object p1
.line 4
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const/16 v1, 0x10
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
add-int/2addr v2, v1
const-string v1, " ("
const-string v3, ") must be >= 0"
invoke-static {v2, p0, v1, p1, v3}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkPositive(Ljava/lang/String;I)I
.locals 3
if-lez p1, :cond_0
return p1
.line 1
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/16 v1, 0x1a
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " ("
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p0, ") must be > 0"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkPositive(Ljava/lang/String;J)J
.locals 3
const-wide/16 v0, 0x0
cmp-long v0, p1, v0
if-lez v0, :cond_0
return-wide p1
.line 2
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/16 v1, 0x23
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " ("
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p0, ") must be > 0"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkPositive(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
.locals 4
.line 3
invoke-virtual {p1}, Ljava/math/BigInteger;->signum()I
move-result v0
if-lez v0, :cond_0
return-object p1
.line 4
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const/16 v1, 0xf
invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
move-result v1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
add-int/2addr v2, v1
const-string v1, " ("
const-string v3, ") must be > 0"
invoke-static {v2, p0, v1, p1, v3}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static checkRoundingUnnecessary(Z)V
.locals 1
if-eqz p0, :cond_0
return-void
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "mode was UNNECESSARY, but rounding was necessary"
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
@@ -0,0 +1,764 @@
.class public final Lcom/google/common/math/PairedStats;
.super Ljava/lang/Object;
.source "PairedStats.java"
# interfaces
.implements Ljava/io/Serializable;
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
# static fields
.field private static final BYTES:I = 0x58
.field private static final serialVersionUID:J
# instance fields
.field private final sumOfProductsOfDeltas:D
.field private final xStats:Lcom/google/common/math/Stats;
.field private final yStats:Lcom/google/common/math/Stats;
# direct methods
.method public constructor <init>(Lcom/google/common/math/Stats;Lcom/google/common/math/Stats;D)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
.line 3
iput-object p2, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
.line 4
iput-wide p3, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
return-void
.end method
.method private static ensureInUnitRange(D)D
.locals 3
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
cmpl-double v2, p0, v0
if-ltz v2, :cond_0
return-wide v0
:cond_0
const-wide/high16 v0, -0x4010000000000000L # -1.0
cmpg-double v2, p0, v0
if-gtz v2, :cond_1
return-wide v0
:cond_1
return-wide p0
.end method
.method private static ensurePositive(D)D
.locals 2
const-wide/16 v0, 0x0
cmpl-double v0, p0, v0
if-lez v0, :cond_0
return-wide p0
:cond_0
const-wide/16 p0, 0x1
return-wide p0
.end method
.method public static fromByteArray([B)Lcom/google/common/math/PairedStats;
.locals 4
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2
array-length v0, p0
const/16 v1, 0x58
if-ne v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
array-length v2, p0
const-string v3, "Expected PairedStats.BYTES = %s, got %s"
invoke-static {v0, v3, v1, v2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;II)V
.line 3
invoke-static {p0}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
move-result-object p0
sget-object v0, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {p0, v0}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
move-result-object p0
.line 4
invoke-static {p0}, Lcom/google/common/math/Stats;->readFrom(Ljava/nio/ByteBuffer;)Lcom/google/common/math/Stats;
move-result-object v0
.line 5
invoke-static {p0}, Lcom/google/common/math/Stats;->readFrom(Ljava/nio/ByteBuffer;)Lcom/google/common/math/Stats;
move-result-object v1
.line 6
invoke-virtual {p0}, Ljava/nio/ByteBuffer;->getDouble()D
move-result-wide v2
.line 7
new-instance p0, Lcom/google/common/math/PairedStats;
invoke-direct {p0, v0, v1, v2, v3}, Lcom/google/common/math/PairedStats;-><init>(Lcom/google/common/math/Stats;Lcom/google/common/math/Stats;D)V
return-object p0
.end method
# virtual methods
.method public count()J
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->count()J
move-result-wide v0
return-wide v0
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 5
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
const/4 v0, 0x0
if-nez p1, :cond_0
return v0
.line 1
:cond_0
const-class v1, Lcom/google/common/math/PairedStats;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
if-eq v1, v2, :cond_1
return v0
.line 2
:cond_1
check-cast p1, Lcom/google/common/math/PairedStats;
.line 3
iget-object v1, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
iget-object v2, p1, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v1, v2}, Lcom/google/common/math/Stats;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2
iget-object v1, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
iget-object v2, p1, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
.line 4
invoke-virtual {v1, v2}, Lcom/google/common/math/Stats;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2
iget-wide v1, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
.line 5
invoke-static {v1, v2}, Ljava/lang/Double;->doubleToLongBits(D)J
move-result-wide v1
iget-wide v3, p1, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-static {v3, v4}, Ljava/lang/Double;->doubleToLongBits(D)J
move-result-wide v3
cmp-long p1, v1, v3
if-nez p1, :cond_2
const/4 v0, 0x1
:cond_2
return v0
.end method
.method public hashCode()I
.locals 3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
.line 1
iget-object v1, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
const/4 v2, 0x0
aput-object v1, v0, v2
iget-object v1, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
const/4 v2, 0x1
aput-object v1, v0, v2
iget-wide v1, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-static {v1, v2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v1
const/4 v2, 0x2
aput-object v1, v0, v2
invoke-static {v0}, Lcom/google/common/base/Objects;->hashCode([Ljava/lang/Object;)I
move-result v0
return v0
.end method
.method public leastSquaresFit()Lcom/google/common/math/LinearTransformation;
.locals 7
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v3, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
.line 3
invoke-static {}, Lcom/google/common/math/LinearTransformation;->forNaN()Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 4
:cond_1
iget-object v0, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v3
const-wide/16 v5, 0x0
cmpl-double v0, v3, v5
if-lez v0, :cond_3
.line 5
iget-object v0, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v0
cmpl-double v0, v0, v5
if-lez v0, :cond_2
.line 6
iget-object v0, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v0
iget-object v2, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
invoke-virtual {v2}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v5
invoke-static {v0, v1, v5, v6}, Lcom/google/common/math/LinearTransformation;->mapping(DD)Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
move-result-object v0
iget-wide v1, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
div-double/2addr v1, v3
.line 7
invoke-virtual {v0, v1, v2}, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->withSlope(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 8
:cond_2
iget-object v0, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/common/math/LinearTransformation;->horizontal(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 9
:cond_3
iget-object v0, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v3
cmpl-double v0, v3, v5
if-lez v0, :cond_4
goto :goto_1
:cond_4
move v1, v2
:goto_1
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 10
iget-object v0, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v0}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/common/math/LinearTransformation;->vertical(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.end method
.method public pearsonsCorrelationCoefficient()D
.locals 9
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v3, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.line 3
:cond_1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->xStats()Lcom/google/common/math/Stats;
move-result-object v0
invoke-virtual {v0}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v3
.line 4
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->yStats()Lcom/google/common/math/Stats;
move-result-object v0
invoke-virtual {v0}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v5
const-wide/16 v7, 0x0
cmpl-double v0, v3, v7
if-lez v0, :cond_2
move v0, v1
goto :goto_1
:cond_2
move v0, v2
.line 5
:goto_1
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
cmpl-double v0, v5, v7
if-lez v0, :cond_3
goto :goto_2
:cond_3
move v1, v2
.line 6
:goto_2
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkState(Z)V
mul-double/2addr v3, v5
.line 7
invoke-static {v3, v4}, Lcom/google/common/math/PairedStats;->ensurePositive(D)D
move-result-wide v0
.line 8
iget-wide v2, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
div-double/2addr v2, v0
invoke-static {v2, v3}, Lcom/google/common/math/PairedStats;->ensureInUnitRange(D)D
move-result-wide v0
return-wide v0
.end method
.method public populationCovariance()D
.locals 4
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v2
long-to-double v2, v2
div-double/2addr v0, v2
return-wide v0
.end method
.method public sampleCovariance()D
.locals 6
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v4
sub-long/2addr v4, v2
long-to-double v2, v4
div-double/2addr v0, v2
return-wide v0
.end method
.method public sumOfProductsOfDeltas()D
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
return-wide v0
.end method
.method public toByteArray()[B
.locals 3
const/16 v0, 0x58
.line 1
invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v0
sget-object v1, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
move-result-object v0
.line 2
iget-object v1, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
invoke-virtual {v1, v0}, Lcom/google/common/math/Stats;->writeTo(Ljava/nio/ByteBuffer;)V
.line 3
iget-object v1, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
invoke-virtual {v1, v0}, Lcom/google/common/math/Stats;->writeTo(Ljava/nio/ByteBuffer;)V
.line 4
iget-wide v1, p0, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas:D
invoke-virtual {v0, v1, v2}, Ljava/nio/ByteBuffer;->putDouble(D)Ljava/nio/ByteBuffer;
.line 5
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
const-string v1, "yStats"
const-string v2, "xStats"
if-lez v0, :cond_0
.line 2
invoke-static {p0}, Lcom/google/common/base/MoreObjects;->toStringHelper(Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
iget-object v3, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
.line 3
invoke-virtual {v0, v2, v3}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
iget-object v2, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
.line 4
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
.line 5
invoke-virtual {p0}, Lcom/google/common/math/PairedStats;->populationCovariance()D
move-result-wide v1
const-string v3, "populationCovariance"
invoke-virtual {v0, v3, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;D)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
.line 6
invoke-virtual {v0}, Lcom/google/common/base/MoreObjects$ToStringHelper;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.line 7
:cond_0
invoke-static {p0}, Lcom/google/common/base/MoreObjects;->toStringHelper(Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
iget-object v3, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
.line 8
invoke-virtual {v0, v2, v3}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
iget-object v2, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
.line 9
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->add(Ljava/lang/String;Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
move-result-object v0
.line 10
invoke-virtual {v0}, Lcom/google/common/base/MoreObjects$ToStringHelper;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public xStats()Lcom/google/common/math/Stats;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStats;->xStats:Lcom/google/common/math/Stats;
return-object v0
.end method
.method public yStats()Lcom/google/common/math/Stats;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStats;->yStats:Lcom/google/common/math/Stats;
return-object v0
.end method
@@ -0,0 +1,680 @@
.class public final Lcom/google/common/math/PairedStatsAccumulator;
.super Ljava/lang/Object;
.source "PairedStatsAccumulator.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private sumOfProductsOfDeltas:D
.field private final xStats:Lcom/google/common/math/StatsAccumulator;
.field private final yStats:Lcom/google/common/math/StatsAccumulator;
# direct methods
.method public constructor <init>()V
.locals 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Lcom/google/common/math/StatsAccumulator;
invoke-direct {v0}, Lcom/google/common/math/StatsAccumulator;-><init>()V
iput-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
.line 3
new-instance v0, Lcom/google/common/math/StatsAccumulator;
invoke-direct {v0}, Lcom/google/common/math/StatsAccumulator;-><init>()V
iput-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
const-wide/16 v0, 0x0
.line 4
iput-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
return-void
.end method
.method private static ensureInUnitRange(D)D
.locals 6
const-wide/high16 v2, -0x4010000000000000L # -1.0
const-wide/high16 v4, 0x3ff0000000000000L # 1.0
move-wide v0, p0
.line 1
invoke-static/range {v0 .. v5}, Lcom/google/common/primitives/Doubles;->constrainToRange(DDD)D
move-result-wide p0
return-wide p0
.end method
.method private ensurePositive(D)D
.locals 2
const-wide/16 v0, 0x0
cmpl-double v0, p1, v0
if-lez v0, :cond_0
return-wide p1
:cond_0
const-wide/16 p1, 0x1
return-wide p1
.end method
# virtual methods
.method public add(DD)V
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0, p1, p2}, Lcom/google/common/math/StatsAccumulator;->add(D)V
.line 2
invoke-static {p1, p2}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p3, p4}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
if-lez v0, :cond_1
.line 4
iget-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
iget-object v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v2}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v2
sub-double/2addr p1, v2
iget-object v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v2}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v2
sub-double v2, p3, v2
mul-double/2addr v2, p1
add-double/2addr v2, v0
iput-wide v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
goto :goto_0
:cond_0
const-wide/high16 p1, 0x7ff8000000000000L # Double.NaN
.line 5
iput-wide p1, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
.line 6
:cond_1
:goto_0
iget-object p1, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {p1, p3, p4}, Lcom/google/common/math/StatsAccumulator;->add(D)V
return-void
.end method
.method public addAll(Lcom/google/common/math/PairedStats;)V
.locals 10
.line 1
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-nez v0, :cond_0
return-void
.line 2
:cond_0
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->xStats()Lcom/google/common/math/Stats;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/google/common/math/StatsAccumulator;->addAll(Lcom/google/common/math/Stats;)V
.line 3
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->count()J
move-result-wide v0
cmp-long v0, v0, v2
if-nez v0, :cond_1
.line 4
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas()D
move-result-wide v0
iput-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
goto :goto_0
.line 5
:cond_1
iget-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
.line 6
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->sumOfProductsOfDeltas()D
move-result-wide v2
.line 7
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->xStats()Lcom/google/common/math/Stats;
move-result-object v4
invoke-virtual {v4}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v4
iget-object v6, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v6}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v6
sub-double/2addr v4, v6
.line 8
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->yStats()Lcom/google/common/math/Stats;
move-result-object v6
invoke-virtual {v6}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v6
iget-object v8, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v8}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v8
sub-double/2addr v6, v8
mul-double/2addr v6, v4
.line 9
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->count()J
move-result-wide v4
long-to-double v4, v4
mul-double/2addr v6, v4
add-double/2addr v6, v2
add-double/2addr v6, v0
iput-wide v6, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
.line 10
:goto_0
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {p1}, Lcom/google/common/math/PairedStats;->yStats()Lcom/google/common/math/Stats;
move-result-object p1
invoke-virtual {v0, p1}, Lcom/google/common/math/StatsAccumulator;->addAll(Lcom/google/common/math/Stats;)V
return-void
.end method
.method public count()J
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->count()J
move-result-wide v0
return-wide v0
.end method
.method public final leastSquaresFit()Lcom/google/common/math/LinearTransformation;
.locals 7
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v3, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
.line 3
invoke-static {}, Lcom/google/common/math/LinearTransformation;->forNaN()Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 4
:cond_1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v3
const-wide/16 v5, 0x0
cmpl-double v0, v3, v5
if-lez v0, :cond_3
.line 5
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v0
cmpl-double v0, v0, v5
if-lez v0, :cond_2
.line 6
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v0
iget-object v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v2}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v5
invoke-static {v0, v1, v5, v6}, Lcom/google/common/math/LinearTransformation;->mapping(DD)Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;
move-result-object v0
iget-wide v1, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
div-double/2addr v1, v3
.line 7
invoke-virtual {v0, v1, v2}, Lcom/google/common/math/LinearTransformation$LinearTransformationBuilder;->withSlope(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 8
:cond_2
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/common/math/LinearTransformation;->horizontal(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.line 9
:cond_3
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v3
cmpl-double v0, v3, v5
if-lez v0, :cond_4
goto :goto_1
:cond_4
move v1, v2
:goto_1
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 10
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/common/math/LinearTransformation;->vertical(D)Lcom/google/common/math/LinearTransformation;
move-result-object v0
return-object v0
.end method
.method public final pearsonsCorrelationCoefficient()D
.locals 9
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
move v0, v1
goto :goto_0
:cond_0
move v0, v2
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v3, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.line 3
:cond_1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v3
.line 4
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v5
const-wide/16 v7, 0x0
cmpl-double v0, v3, v7
if-lez v0, :cond_2
move v0, v1
goto :goto_1
:cond_2
move v0, v2
.line 5
:goto_1
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
cmpl-double v0, v5, v7
if-lez v0, :cond_3
goto :goto_2
:cond_3
move v1, v2
.line 6
:goto_2
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkState(Z)V
mul-double/2addr v3, v5
.line 7
invoke-direct {p0, v3, v4}, Lcom/google/common/math/PairedStatsAccumulator;->ensurePositive(D)D
move-result-wide v0
.line 8
iget-wide v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
div-double/2addr v2, v0
invoke-static {v2, v3}, Lcom/google/common/math/PairedStatsAccumulator;->ensureInUnitRange(D)D
move-result-wide v0
return-wide v0
.end method
.method public populationCovariance()D
.locals 4
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v2
long-to-double v2, v2
div-double/2addr v0, v2
return-wide v0
.end method
.method public final sampleCovariance()D
.locals 6
.line 1
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-virtual {p0}, Lcom/google/common/math/PairedStatsAccumulator;->count()J
move-result-wide v4
sub-long/2addr v4, v2
long-to-double v2, v4
div-double/2addr v0, v2
return-wide v0
.end method
.method public snapshot()Lcom/google/common/math/PairedStats;
.locals 5
.line 1
new-instance v0, Lcom/google/common/math/PairedStats;
iget-object v1, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v1}, Lcom/google/common/math/StatsAccumulator;->snapshot()Lcom/google/common/math/Stats;
move-result-object v1
iget-object v2, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v2}, Lcom/google/common/math/StatsAccumulator;->snapshot()Lcom/google/common/math/Stats;
move-result-object v2
iget-wide v3, p0, Lcom/google/common/math/PairedStatsAccumulator;->sumOfProductsOfDeltas:D
invoke-direct {v0, v1, v2, v3, v4}, Lcom/google/common/math/PairedStats;-><init>(Lcom/google/common/math/Stats;Lcom/google/common/math/Stats;D)V
return-object v0
.end method
.method public xStats()Lcom/google/common/math/Stats;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->xStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->snapshot()Lcom/google/common/math/Stats;
move-result-object v0
return-object v0
.end method
.method public yStats()Lcom/google/common/math/Stats;
.locals 1
.line 1
iget-object v0, p0, Lcom/google/common/math/PairedStatsAccumulator;->yStats:Lcom/google/common/math/StatsAccumulator;
invoke-virtual {v0}, Lcom/google/common/math/StatsAccumulator;->snapshot()Lcom/google/common/math/Stats;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,30 @@
.class interface abstract annotation Lcom/google/common/math/ParametricNullness;
.super Ljava/lang/Object;
.source "ParametricNullness.java"
# interfaces
.implements Ljava/lang/annotation/Annotation;
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Ljava/lang/annotation/Retention;
value = .enum Ljava/lang/annotation/RetentionPolicy;->RUNTIME:Ljava/lang/annotation/RetentionPolicy;
.end annotation
.annotation runtime Ljava/lang/annotation/Target;
value = {
.enum Ljava/lang/annotation/ElementType;->FIELD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->METHOD:Ljava/lang/annotation/ElementType;,
.enum Ljava/lang/annotation/ElementType;->PARAMETER:Ljava/lang/annotation/ElementType;
}
.end annotation
.annotation runtime Ljavax/annotation/Nonnull;
when = .enum Ljavax/annotation/meta/When;->UNKNOWN:Ljavax/annotation/meta/When;
.end annotation
.annotation build Ljavax/annotation/meta/TypeQualifierNickname;
.end annotation
@@ -0,0 +1,14 @@
.class synthetic Lcom/google/common/math/Quantiles$1;
.super Ljava/lang/Object;
.source "Quantiles.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/Quantiles;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,122 @@
.class public final Lcom/google/common/math/Quantiles$Scale;
.super Ljava/lang/Object;
.source "Quantiles.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/Quantiles;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Scale"
.end annotation
# instance fields
.field private final scale:I
# direct methods
.method private constructor <init>(I)V
.locals 2
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-lez p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
const-string v1, "Quantile scale must be positive"
.line 3
invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 4
iput p1, p0, Lcom/google/common/math/Quantiles$Scale;->scale:I
return-void
.end method
.method public synthetic constructor <init>(ILcom/google/common/math/Quantiles$1;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/google/common/math/Quantiles$Scale;-><init>(I)V
return-void
.end method
# virtual methods
.method public index(I)Lcom/google/common/math/Quantiles$ScaleAndIndex;
.locals 3
.line 1
new-instance v0, Lcom/google/common/math/Quantiles$ScaleAndIndex;
iget v1, p0, Lcom/google/common/math/Quantiles$Scale;->scale:I
const/4 v2, 0x0
invoke-direct {v0, v1, p1, v2}, Lcom/google/common/math/Quantiles$ScaleAndIndex;-><init>(IILcom/google/common/math/Quantiles$1;)V
return-object v0
.end method
.method public indexes(Ljava/util/Collection;)Lcom/google/common/math/Quantiles$ScaleAndIndexes;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"Ljava/lang/Integer;",
">;)",
"Lcom/google/common/math/Quantiles$ScaleAndIndexes;"
}
.end annotation
.line 2
new-instance v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;
iget v1, p0, Lcom/google/common/math/Quantiles$Scale;->scale:I
invoke-static {p1}, Lcom/google/common/primitives/Ints;->toArray(Ljava/util/Collection;)[I
move-result-object p1
const/4 v2, 0x0
invoke-direct {v0, v1, p1, v2}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;-><init>(I[ILcom/google/common/math/Quantiles$1;)V
return-object v0
.end method
.method public varargs indexes([I)Lcom/google/common/math/Quantiles$ScaleAndIndexes;
.locals 3
.line 1
new-instance v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;
iget v1, p0, Lcom/google/common/math/Quantiles$Scale;->scale:I
invoke-virtual {p1}, [I->clone()Ljava/lang/Object;
move-result-object p1
check-cast p1, [I
const/4 v2, 0x0
invoke-direct {v0, v1, p1, v2}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;-><init>(I[ILcom/google/common/math/Quantiles$1;)V
return-object v0
.end method
@@ -0,0 +1,239 @@
.class public final Lcom/google/common/math/Quantiles$ScaleAndIndex;
.super Ljava/lang/Object;
.source "Quantiles.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/Quantiles;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ScaleAndIndex"
.end annotation
# instance fields
.field private final index:I
.field private final scale:I
# direct methods
.method private constructor <init>(II)V
.locals 0
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
invoke-static {p2, p1}, Lcom/google/common/math/Quantiles;->access$300(II)V
.line 4
iput p1, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->scale:I
.line 5
iput p2, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->index:I
return-void
.end method
.method public synthetic constructor <init>(IILcom/google/common/math/Quantiles$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2}, Lcom/google/common/math/Quantiles$ScaleAndIndex;-><init>(II)V
return-void
.end method
# virtual methods
.method public compute(Ljava/util/Collection;)D
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"+",
"Ljava/lang/Number;",
">;)D"
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/primitives/Doubles;->toArray(Ljava/util/Collection;)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndex;->computeInPlace([D)D
move-result-wide v0
return-wide v0
.end method
.method public varargs compute([D)D
.locals 2
.line 2
invoke-virtual {p1}, [D->clone()Ljava/lang/Object;
move-result-object p1
check-cast p1, [D
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndex;->computeInPlace([D)D
move-result-wide v0
return-wide v0
.end method
.method public varargs compute([I)D
.locals 2
.line 4
invoke-static {p1}, Lcom/google/common/math/Quantiles;->access$500([I)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndex;->computeInPlace([D)D
move-result-wide v0
return-wide v0
.end method
.method public varargs compute([J)D
.locals 2
.line 3
invoke-static {p1}, Lcom/google/common/math/Quantiles;->access$400([J)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndex;->computeInPlace([D)D
move-result-wide v0
return-wide v0
.end method
.method public varargs computeInPlace([D)D
.locals 13
.line 1
array-length v0, p1
const/4 v1, 0x0
const/4 v2, 0x1
if-lez v0, :cond_0
move v0, v2
goto :goto_0
:cond_0
move v0, v1
:goto_0
const-string v3, "Cannot calculate quantiles of an empty dataset"
invoke-static {v0, v3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 2
invoke-static {p1}, Lcom/google/common/math/Quantiles;->access$600([D)Z
move-result v0
if-eqz v0, :cond_1
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.line 3
:cond_1
iget v0, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->index:I
int-to-long v3, v0
array-length v0, p1
sub-int/2addr v0, v2
int-to-long v5, v0
mul-long/2addr v3, v5
.line 4
iget v0, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->scale:I
int-to-long v5, v0
sget-object v0, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-static {v3, v4, v5, v6, v0}, Lcom/google/common/math/LongMath;->divide(JJLjava/math/RoundingMode;)J
move-result-wide v5
long-to-int v0, v5
int-to-long v5, v0
.line 5
iget v7, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->scale:I
int-to-long v7, v7
mul-long/2addr v5, v7
sub-long/2addr v3, v5
long-to-int v3, v3
.line 6
array-length v4, p1
sub-int/2addr v4, v2
invoke-static {v0, p1, v1, v4}, Lcom/google/common/math/Quantiles;->access$700(I[DII)V
if-nez v3, :cond_2
.line 7
aget-wide v0, p1, v0
return-wide v0
:cond_2
add-int/lit8 v1, v0, 0x1
.line 8
array-length v4, p1
sub-int/2addr v4, v2
invoke-static {v1, p1, v1, v4}, Lcom/google/common/math/Quantiles;->access$700(I[DII)V
.line 9
aget-wide v5, p1, v0
aget-wide v7, p1, v1
int-to-double v9, v3
iget p1, p0, Lcom/google/common/math/Quantiles$ScaleAndIndex;->scale:I
int-to-double v11, p1
invoke-static/range {v5 .. v12}, Lcom/google/common/math/Quantiles;->access$800(DDDD)D
move-result-wide v0
return-wide v0
.end method
@@ -0,0 +1,473 @@
.class public final Lcom/google/common/math/Quantiles$ScaleAndIndexes;
.super Ljava/lang/Object;
.source "Quantiles.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/Quantiles;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ScaleAndIndexes"
.end annotation
# instance fields
.field private final indexes:[I
.field private final scale:I
# direct methods
.method private constructor <init>(I[I)V
.locals 4
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
array-length v0, p2
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v2, v0, :cond_0
aget v3, p2, v2
.line 4
invoke-static {v3, p1}, Lcom/google/common/math/Quantiles;->access$300(II)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 5
:cond_0
array-length v0, p2
if-lez v0, :cond_1
const/4 v1, 0x1
:cond_1
const-string v0, "Indexes must be a non empty array"
invoke-static {v1, v0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 6
iput p1, p0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->scale:I
.line 7
iput-object p2, p0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->indexes:[I
return-void
.end method
.method public synthetic constructor <init>(I[ILcom/google/common/math/Quantiles$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;-><init>(I[I)V
return-void
.end method
# virtual methods
.method public compute(Ljava/util/Collection;)Ljava/util/Map;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"+",
"Ljava/lang/Number;",
">;)",
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Ljava/lang/Double;",
">;"
}
.end annotation
.line 1
invoke-static {p1}, Lcom/google/common/primitives/Doubles;->toArray(Ljava/util/Collection;)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->computeInPlace([D)Ljava/util/Map;
move-result-object p1
return-object p1
.end method
.method public varargs compute([D)Ljava/util/Map;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"([D)",
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Ljava/lang/Double;",
">;"
}
.end annotation
.line 2
invoke-virtual {p1}, [D->clone()Ljava/lang/Object;
move-result-object p1
check-cast p1, [D
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->computeInPlace([D)Ljava/util/Map;
move-result-object p1
return-object p1
.end method
.method public varargs compute([I)Ljava/util/Map;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"([I)",
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Ljava/lang/Double;",
">;"
}
.end annotation
.line 4
invoke-static {p1}, Lcom/google/common/math/Quantiles;->access$500([I)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->computeInPlace([D)Ljava/util/Map;
move-result-object p1
return-object p1
.end method
.method public varargs compute([J)Ljava/util/Map;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"([J)",
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Ljava/lang/Double;",
">;"
}
.end annotation
.line 3
invoke-static {p1}, Lcom/google/common/math/Quantiles;->access$400([J)[D
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->computeInPlace([D)Ljava/util/Map;
move-result-object p1
return-object p1
.end method
.method public varargs computeInPlace([D)Ljava/util/Map;
.locals 19
.annotation system Ldalvik/annotation/Signature;
value = {
"([D)",
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Ljava/lang/Double;",
">;"
}
.end annotation
move-object/from16 v0, p0
move-object/from16 v7, p1
.line 1
array-length v1, v7
const/4 v8, 0x0
const/4 v2, 0x1
if-lez v1, :cond_0
move v1, v2
goto :goto_0
:cond_0
move v1, v8
:goto_0
const-string v3, "Cannot calculate quantiles of an empty dataset"
invoke-static {v1, v3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
.line 2
invoke-static/range {p1 .. p1}, Lcom/google/common/math/Quantiles;->access$600([D)Z
move-result v1
if-eqz v1, :cond_2
.line 3
new-instance v1, Ljava/util/LinkedHashMap;
invoke-direct {v1}, Ljava/util/LinkedHashMap;-><init>()V
.line 4
iget-object v2, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->indexes:[I
array-length v3, v2
:goto_1
if-ge v8, v3, :cond_1
aget v4, v2, v8
.line 5
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
const-wide/high16 v5, 0x7ff8000000000000L # Double.NaN
invoke-static {v5, v6}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v5
invoke-interface {v1, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
add-int/lit8 v8, v8, 0x1
goto :goto_1
.line 6
:cond_1
invoke-static {v1}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v1
return-object v1
.line 7
:cond_2
iget-object v1, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->indexes:[I
array-length v3, v1
new-array v9, v3, [I
.line 8
array-length v3, v1
new-array v10, v3, [I
.line 9
array-length v1, v1
mul-int/lit8 v1, v1, 0x2
new-array v1, v1, [I
move v3, v8
move v4, v3
.line 10
:goto_2
iget-object v5, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->indexes:[I
array-length v6, v5
if-ge v3, v6, :cond_4
.line 11
aget v5, v5, v3
int-to-long v5, v5
array-length v11, v7
sub-int/2addr v11, v2
int-to-long v11, v11
mul-long/2addr v5, v11
.line 12
iget v11, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->scale:I
int-to-long v11, v11
sget-object v13, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-static {v5, v6, v11, v12, v13}, Lcom/google/common/math/LongMath;->divide(JJLjava/math/RoundingMode;)J
move-result-wide v11
long-to-int v11, v11
int-to-long v12, v11
.line 13
iget v14, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->scale:I
int-to-long v14, v14
mul-long/2addr v12, v14
sub-long/2addr v5, v12
long-to-int v5, v5
.line 14
aput v11, v9, v3
.line 15
aput v5, v10, v3
.line 16
aput v11, v1, v4
add-int/lit8 v4, v4, 0x1
if-eqz v5, :cond_3
add-int/lit8 v11, v11, 0x1
.line 17
aput v11, v1, v4
add-int/lit8 v4, v4, 0x1
:cond_3
add-int/lit8 v3, v3, 0x1
goto :goto_2
.line 18
:cond_4
invoke-static {v1, v8, v4}, Ljava/util/Arrays;->sort([III)V
const/4 v3, 0x0
sub-int/2addr v4, v2
const/4 v5, 0x0
.line 19
array-length v6, v7
sub-int/2addr v6, v2
move v2, v3
move v3, v4
move-object/from16 v4, p1
invoke-static/range {v1 .. v6}, Lcom/google/common/math/Quantiles;->access$900([III[DII)V
.line 20
new-instance v1, Ljava/util/LinkedHashMap;
invoke-direct {v1}, Ljava/util/LinkedHashMap;-><init>()V
.line 21
:goto_3
iget-object v2, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->indexes:[I
array-length v3, v2
if-ge v8, v3, :cond_6
.line 22
aget v3, v9, v8
.line 23
aget v4, v10, v8
if-nez v4, :cond_5
.line 24
aget v2, v2, v8
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aget-wide v3, v7, v3
invoke-static {v3, v4}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v3
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_4
.line 25
:cond_5
aget v2, v2, v8
.line 26
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aget-wide v11, v7, v3
add-int/lit8 v3, v3, 0x1
aget-wide v13, v7, v3
int-to-double v3, v4
iget v5, v0, Lcom/google/common/math/Quantiles$ScaleAndIndexes;->scale:I
int-to-double v5, v5
move-wide v15, v3
move-wide/from16 v17, v5
invoke-static/range {v11 .. v18}, Lcom/google/common/math/Quantiles;->access$800(DDDD)D
move-result-wide v3
invoke-static {v3, v4}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v3
.line 27
invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:goto_4
add-int/lit8 v8, v8, 0x1
goto :goto_3
.line 28
:cond_6
invoke-static {v1}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v1
return-object v1
.end method
@@ -0,0 +1,662 @@
.class public final Lcom/google/common/math/Quantiles;
.super Ljava/lang/Object;
.source "Quantiles.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/math/Quantiles$ScaleAndIndexes;,
Lcom/google/common/math/Quantiles$ScaleAndIndex;,
Lcom/google/common/math/Quantiles$Scale;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic access$300(II)V
.locals 0
.line 1
invoke-static {p0, p1}, Lcom/google/common/math/Quantiles;->checkIndex(II)V
return-void
.end method
.method public static synthetic access$400([J)[D
.locals 0
.line 1
invoke-static {p0}, Lcom/google/common/math/Quantiles;->longsToDoubles([J)[D
move-result-object p0
return-object p0
.end method
.method public static synthetic access$500([I)[D
.locals 0
.line 1
invoke-static {p0}, Lcom/google/common/math/Quantiles;->intsToDoubles([I)[D
move-result-object p0
return-object p0
.end method
.method public static synthetic access$600([D)Z
.locals 0
.line 1
invoke-static {p0}, Lcom/google/common/math/Quantiles;->containsNaN([D)Z
move-result p0
return p0
.end method
.method public static synthetic access$700(I[DII)V
.locals 0
.line 1
invoke-static {p0, p1, p2, p3}, Lcom/google/common/math/Quantiles;->selectInPlace(I[DII)V
return-void
.end method
.method public static synthetic access$800(DDDD)D
.locals 0
.line 1
invoke-static/range {p0 .. p7}, Lcom/google/common/math/Quantiles;->interpolate(DDDD)D
move-result-wide p0
return-wide p0
.end method
.method public static synthetic access$900([III[DII)V
.locals 0
.line 1
invoke-static/range {p0 .. p5}, Lcom/google/common/math/Quantiles;->selectAllInPlace([III[DII)V
return-void
.end method
.method private static checkIndex(II)V
.locals 2
if-ltz p0, :cond_0
if-gt p0, p1, :cond_0
return-void
.line 1
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const/16 v0, 0x46
const-string v1, "Quantile indexes must be between 0 and the scale, which is "
invoke-static {v0, v1, p1}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private static chooseNextSelection([IIIII)I
.locals 2
if-ne p1, p2, :cond_0
return p1
:cond_0
add-int/2addr p3, p4
ushr-int/lit8 p4, p3, 0x1
:goto_0
add-int/lit8 v0, p1, 0x1
if-le p2, v0, :cond_3
add-int v0, p1, p2
ushr-int/lit8 v0, v0, 0x1
.line 1
aget v1, p0, v0
if-le v1, p4, :cond_1
move p2, v0
goto :goto_0
.line 2
:cond_1
aget p1, p0, v0
if-ge p1, p4, :cond_2
move p1, v0
goto :goto_0
:cond_2
return v0
.line 3
:cond_3
aget p4, p0, p1
sub-int/2addr p3, p4
aget p0, p0, p2
sub-int/2addr p3, p0
if-lez p3, :cond_4
return p2
:cond_4
return p1
.end method
.method private static varargs containsNaN([D)Z
.locals 5
.line 1
array-length v0, p0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v2, v0, :cond_1
aget-wide v3, p0, v2
.line 2
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
move-result v3
if-eqz v3, :cond_0
const/4 p0, 0x1
return p0
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return v1
.end method
.method private static interpolate(DDDD)D
.locals 5
const-wide/high16 v0, -0x10000000000000L # Double.NEGATIVE_INFINITY
cmpl-double v2, p0, v0
const-wide/high16 v3, 0x7ff0000000000000L # Double.POSITIVE_INFINITY
if-nez v2, :cond_1
cmpl-double p0, p2, v3
if-nez p0, :cond_0
const-wide/high16 p0, 0x7ff8000000000000L # Double.NaN
return-wide p0
:cond_0
return-wide v0
:cond_1
cmpl-double v0, p2, v3
if-nez v0, :cond_2
return-wide v3
:cond_2
sub-double/2addr p2, p0
mul-double/2addr p2, p4
div-double/2addr p2, p6
add-double/2addr p2, p0
return-wide p2
.end method
.method private static intsToDoubles([I)[D
.locals 5
.line 1
array-length v0, p0
.line 2
new-array v1, v0, [D
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_0
.line 3
aget v3, p0, v2
int-to-double v3, v3
aput-wide v3, v1, v2
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-object v1
.end method
.method private static longsToDoubles([J)[D
.locals 5
.line 1
array-length v0, p0
.line 2
new-array v1, v0, [D
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_0
.line 3
aget-wide v3, p0, v2
long-to-double v3, v3
aput-wide v3, v1, v2
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-object v1
.end method
.method public static median()Lcom/google/common/math/Quantiles$ScaleAndIndex;
.locals 2
const/4 v0, 0x2
.line 1
invoke-static {v0}, Lcom/google/common/math/Quantiles;->scale(I)Lcom/google/common/math/Quantiles$Scale;
move-result-object v0
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/google/common/math/Quantiles$Scale;->index(I)Lcom/google/common/math/Quantiles$ScaleAndIndex;
move-result-object v0
return-object v0
.end method
.method private static movePivotToStartOfSlice([DII)V
.locals 9
add-int v0, p1, p2
const/4 v1, 0x1
ushr-int/2addr v0, v1
.line 1
aget-wide v2, p0, p2
aget-wide v4, p0, v0
cmpg-double v2, v2, v4
const/4 v3, 0x0
if-gez v2, :cond_0
move v2, v1
goto :goto_0
:cond_0
move v2, v3
.line 2
:goto_0
aget-wide v4, p0, v0
aget-wide v6, p0, p1
cmpg-double v4, v4, v6
if-gez v4, :cond_1
move v4, v1
goto :goto_1
:cond_1
move v4, v3
.line 3
:goto_1
aget-wide v5, p0, p2
aget-wide v7, p0, p1
cmpg-double v5, v5, v7
if-gez v5, :cond_2
goto :goto_2
:cond_2
move v1, v3
:goto_2
if-ne v2, v4, :cond_3
.line 4
invoke-static {p0, v0, p1}, Lcom/google/common/math/Quantiles;->swap([DII)V
goto :goto_3
:cond_3
if-eq v2, v1, :cond_4
.line 5
invoke-static {p0, p1, p2}, Lcom/google/common/math/Quantiles;->swap([DII)V
:cond_4
:goto_3
return-void
.end method
.method private static partition([DII)I
.locals 5
.line 1
invoke-static {p0, p1, p2}, Lcom/google/common/math/Quantiles;->movePivotToStartOfSlice([DII)V
.line 2
aget-wide v0, p0, p1
move v2, p2
:goto_0
if-le p2, p1, :cond_1
.line 3
aget-wide v3, p0, p2
cmpl-double v3, v3, v0
if-lez v3, :cond_0
.line 4
invoke-static {p0, v2, p2}, Lcom/google/common/math/Quantiles;->swap([DII)V
add-int/lit8 v2, v2, -0x1
:cond_0
add-int/lit8 p2, p2, -0x1
goto :goto_0
.line 5
:cond_1
invoke-static {p0, p1, v2}, Lcom/google/common/math/Quantiles;->swap([DII)V
return v2
.end method
.method public static percentiles()Lcom/google/common/math/Quantiles$Scale;
.locals 1
const/16 v0, 0x64
.line 1
invoke-static {v0}, Lcom/google/common/math/Quantiles;->scale(I)Lcom/google/common/math/Quantiles$Scale;
move-result-object v0
return-object v0
.end method
.method public static quartiles()Lcom/google/common/math/Quantiles$Scale;
.locals 1
const/4 v0, 0x4
.line 1
invoke-static {v0}, Lcom/google/common/math/Quantiles;->scale(I)Lcom/google/common/math/Quantiles$Scale;
move-result-object v0
return-object v0
.end method
.method public static scale(I)Lcom/google/common/math/Quantiles$Scale;
.locals 2
.line 1
new-instance v0, Lcom/google/common/math/Quantiles$Scale;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/google/common/math/Quantiles$Scale;-><init>(ILcom/google/common/math/Quantiles$1;)V
return-object v0
.end method
.method private static selectAllInPlace([III[DII)V
.locals 9
.line 1
invoke-static {p0, p1, p2, p4, p5}, Lcom/google/common/math/Quantiles;->chooseNextSelection([IIIII)I
move-result v0
.line 2
aget v1, p0, v0
.line 3
invoke-static {v1, p3, p4, p5}, Lcom/google/common/math/Quantiles;->selectInPlace(I[DII)V
add-int/lit8 v2, v0, -0x1
move v5, v2
:goto_0
if-lt v5, p1, :cond_0
.line 4
aget v2, p0, v5
if-ne v2, v1, :cond_0
add-int/lit8 v5, v5, -0x1
goto :goto_0
:cond_0
if-lt v5, p1, :cond_1
add-int/lit8 v8, v1, -0x1
move-object v3, p0
move v4, p1
move-object v6, p3
move v7, p4
.line 5
invoke-static/range {v3 .. v8}, Lcom/google/common/math/Quantiles;->selectAllInPlace([III[DII)V
:cond_1
add-int/lit8 v0, v0, 0x1
move v3, v0
:goto_1
if-gt v3, p2, :cond_2
.line 6
aget p1, p0, v3
if-ne p1, v1, :cond_2
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_2
if-gt v3, p2, :cond_3
add-int/lit8 v6, v1, 0x1
move-object v2, p0
move v4, p2
move-object v5, p3
move v7, p5
.line 7
invoke-static/range {v2 .. v7}, Lcom/google/common/math/Quantiles;->selectAllInPlace([III[DII)V
:cond_3
return-void
.end method
.method private static selectInPlace(I[DII)V
.locals 5
if-ne p0, p2, :cond_3
add-int/lit8 p0, p2, 0x1
move v0, p2
:goto_0
if-gt p0, p3, :cond_1
.line 1
aget-wide v1, p1, v0
aget-wide v3, p1, p0
cmpl-double v1, v1, v3
if-lez v1, :cond_0
move v0, p0
:cond_0
add-int/lit8 p0, p0, 0x1
goto :goto_0
:cond_1
if-eq v0, p2, :cond_2
.line 2
invoke-static {p1, v0, p2}, Lcom/google/common/math/Quantiles;->swap([DII)V
:cond_2
return-void
:cond_3
:goto_1
if-le p3, p2, :cond_5
.line 3
invoke-static {p1, p2, p3}, Lcom/google/common/math/Quantiles;->partition([DII)I
move-result v0
if-lt v0, p0, :cond_4
add-int/lit8 p3, v0, -0x1
:cond_4
if-gt v0, p0, :cond_3
add-int/lit8 v0, v0, 0x1
move p2, v0
goto :goto_1
:cond_5
return-void
.end method
.method private static swap([DII)V
.locals 4
.line 1
aget-wide v0, p0, p1
.line 2
aget-wide v2, p0, p2
aput-wide v2, p0, p1
.line 3
aput-wide v0, p0, p2
return-void
.end method
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,898 @@
.class public final Lcom/google/common/math/StatsAccumulator;
.super Ljava/lang/Object;
.source "StatsAccumulator.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
# instance fields
.field private count:J
.field private max:D
.field private mean:D
.field private min:D
.field private sumOfSquaresOfDeltas:D
# direct methods
.method public constructor <init>()V
.locals 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, 0x0
.line 2
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v0, 0x0
.line 3
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 4
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
.line 5
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->min:D
.line 6
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->max:D
return-void
.end method
.method public static calculateNewMeanNonFinite(DD)D
.locals 1
.line 1
invoke-static {p0, p1}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_0
return-wide p2
.line 2
:cond_0
invoke-static {p2, p3}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-nez v0, :cond_2
cmpl-double p2, p0, p2
if-nez p2, :cond_1
goto :goto_0
:cond_1
const-wide/high16 p0, 0x7ff8000000000000L # Double.NaN
:cond_2
:goto_0
return-wide p0
.end method
.method private merge(JDDDD)V
.locals 17
move-object/from16 v0, p0
move-wide/from16 v1, p1
move-wide/from16 v3, p3
move-wide/from16 v5, p5
move-wide/from16 v7, p7
move-wide/from16 v9, p9
.line 1
iget-wide v11, v0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v13, 0x0
cmp-long v13, v11, v13
if-nez v13, :cond_0
.line 2
iput-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->count:J
.line 3
iput-wide v3, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 4
iput-wide v5, v0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
.line 5
iput-wide v7, v0, Lcom/google/common/math/StatsAccumulator;->min:D
.line 6
iput-wide v9, v0, Lcom/google/common/math/StatsAccumulator;->max:D
goto :goto_1
:cond_0
add-long/2addr v11, v1
.line 7
iput-wide v11, v0, Lcom/google/common/math/StatsAccumulator;->count:J
.line 8
iget-wide v11, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
invoke-static {v11, v12}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v11
if-eqz v11, :cond_1
invoke-static/range {p3 .. p4}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v11
if-eqz v11, :cond_1
.line 9
iget-wide v11, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
sub-double v13, v3, v11
long-to-double v1, v1
mul-double v15, v13, v1
.line 10
iget-wide v9, v0, Lcom/google/common/math/StatsAccumulator;->count:J
long-to-double v9, v9
div-double/2addr v15, v9
add-double v9, v15, v11
iput-wide v9, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 11
iget-wide v11, v0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
sub-double/2addr v3, v9
mul-double/2addr v3, v13
mul-double/2addr v3, v1
add-double/2addr v3, v5
add-double/2addr v3, v11
iput-wide v3, v0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
goto :goto_0
.line 12
:cond_1
iget-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
invoke-static {v1, v2, v3, v4}, Lcom/google/common/math/StatsAccumulator;->calculateNewMeanNonFinite(DD)D
move-result-wide v1
iput-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->mean:D
const-wide/high16 v1, 0x7ff8000000000000L # Double.NaN
.line 13
iput-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
.line 14
:goto_0
iget-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->min:D
invoke-static {v1, v2, v7, v8}, Ljava/lang/Math;->min(DD)D
move-result-wide v1
iput-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->min:D
.line 15
iget-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->max:D
move-wide/from16 v3, p9
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(DD)D
move-result-wide v1
iput-wide v1, v0, Lcom/google/common/math/StatsAccumulator;->max:D
:goto_1
return-void
.end method
# virtual methods
.method public add(D)V
.locals 10
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x0
cmp-long v2, v0, v2
const-wide/high16 v3, 0x7ff8000000000000L # Double.NaN
const-wide/16 v5, 0x1
if-nez v2, :cond_0
.line 2
iput-wide v5, p0, Lcom/google/common/math/StatsAccumulator;->count:J
.line 3
iput-wide p1, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 4
iput-wide p1, p0, Lcom/google/common/math/StatsAccumulator;->min:D
.line 5
iput-wide p1, p0, Lcom/google/common/math/StatsAccumulator;->max:D
.line 6
invoke-static {p1, p2}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result p1
if-nez p1, :cond_2
.line 7
iput-wide v3, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
goto :goto_1
:cond_0
add-long/2addr v0, v5
.line 8
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
.line 9
invoke-static {p1, p2}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
invoke-static {v0, v1}, Lcom/google/common/primitives/Doubles;->isFinite(D)Z
move-result v0
if-eqz v0, :cond_1
.line 10
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
sub-double v6, p1, v0
.line 11
iget-wide v2, p0, Lcom/google/common/math/StatsAccumulator;->count:J
long-to-double v2, v2
div-double v2, v6, v2
add-double v4, v2, v0
iput-wide v4, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 12
iget-wide v8, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
move-wide v2, p1
invoke-static/range {v2 .. v9}, Ls0/a;->a(DDDD)D
move-result-wide v0
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
goto :goto_0
.line 13
:cond_1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
invoke-static {v0, v1, p1, p2}, Lcom/google/common/math/StatsAccumulator;->calculateNewMeanNonFinite(DD)D
move-result-wide v0
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
.line 14
iput-wide v3, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
.line 15
:goto_0
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->min:D
invoke-static {v0, v1, p1, p2}, Ljava/lang/Math;->min(DD)D
move-result-wide v0
iput-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->min:D
.line 16
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->max:D
invoke-static {v0, v1, p1, p2}, Ljava/lang/Math;->max(DD)D
move-result-wide p1
iput-wide p1, p0, Lcom/google/common/math/StatsAccumulator;->max:D
:cond_2
:goto_1
return-void
.end method
.method public addAll(Lcom/google/common/math/Stats;)V
.locals 12
.line 11
invoke-virtual {p1}, Lcom/google/common/math/Stats;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-nez v0, :cond_0
return-void
.line 12
:cond_0
invoke-virtual {p1}, Lcom/google/common/math/Stats;->count()J
move-result-wide v2
invoke-virtual {p1}, Lcom/google/common/math/Stats;->mean()D
move-result-wide v4
invoke-virtual {p1}, Lcom/google/common/math/Stats;->sumOfSquaresOfDeltas()D
move-result-wide v6
invoke-virtual {p1}, Lcom/google/common/math/Stats;->min()D
move-result-wide v8
invoke-virtual {p1}, Lcom/google/common/math/Stats;->max()D
move-result-wide v10
move-object v1, p0
invoke-direct/range {v1 .. v11}, Lcom/google/common/math/StatsAccumulator;->merge(JDDDD)V
return-void
.end method
.method public addAll(Lcom/google/common/math/StatsAccumulator;)V
.locals 12
.line 13
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->count()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-nez v0, :cond_0
return-void
.line 14
:cond_0
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->count()J
move-result-wide v2
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->mean()D
move-result-wide v4
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas()D
move-result-wide v6
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->min()D
move-result-wide v8
invoke-virtual {p1}, Lcom/google/common/math/StatsAccumulator;->max()D
move-result-wide v10
move-object v1, p0
invoke-direct/range {v1 .. v11}, Lcom/google/common/math/StatsAccumulator;->merge(JDDDD)V
return-void
.end method
.method public addAll(Ljava/lang/Iterable;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Ljava/lang/Number;",
">;)V"
}
.end annotation
.line 1
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Number;
.line 2
invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
move-result-wide v0
invoke-virtual {p0, v0, v1}, Lcom/google/common/math/StatsAccumulator;->add(D)V
goto :goto_0
:cond_0
return-void
.end method
.method public addAll(Ljava/util/Iterator;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Iterator<",
"+",
"Ljava/lang/Number;",
">;)V"
}
.end annotation
.line 3
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
.line 4
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Number;
invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
move-result-wide v0
invoke-virtual {p0, v0, v1}, Lcom/google/common/math/StatsAccumulator;->add(D)V
goto :goto_0
:cond_0
return-void
.end method
.method public varargs addAll([D)V
.locals 4
.line 5
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget-wide v2, p1, v1
.line 6
invoke-virtual {p0, v2, v3}, Lcom/google/common/math/StatsAccumulator;->add(D)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public varargs addAll([I)V
.locals 4
.line 7
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget v2, p1, v1
int-to-double v2, v2
.line 8
invoke-virtual {p0, v2, v3}, Lcom/google/common/math/StatsAccumulator;->add(D)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public varargs addAll([J)V
.locals 4
.line 9
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget-wide v2, p1, v1
long-to-double v2, v2
.line 10
invoke-virtual {p0, v2, v3}, Lcom/google/common/math/StatsAccumulator;->add(D)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public count()J
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
return-wide v0
.end method
.method public max()D
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->max:D
return-wide v0
.end method
.method public mean()D
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
return-wide v0
.end method
.method public min()D
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->min:D
return-wide v0
.end method
.method public final populationStandardDeviation()D
.locals 2
.line 1
invoke-virtual {p0}, Lcom/google/common/math/StatsAccumulator;->populationVariance()D
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
return-wide v0
.end method
.method public final populationVariance()D
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.line 3
:cond_1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
if-nez v0, :cond_2
const-wide/16 v0, 0x0
return-wide v0
.line 4
:cond_2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->ensureNonNegative(D)D
move-result-wide v0
iget-wide v2, p0, Lcom/google/common/math/StatsAccumulator;->count:J
long-to-double v2, v2
div-double/2addr v0, v2
return-wide v0
.end method
.method public final sampleStandardDeviation()D
.locals 2
.line 1
invoke-virtual {p0}, Lcom/google/common/math/StatsAccumulator;->sampleVariance()D
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
return-wide v0
.end method
.method public final sampleVariance()D
.locals 6
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->count:J
const-wide/16 v2, 0x1
cmp-long v0, v0, v2
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
.line 2
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
if-eqz v0, :cond_1
const-wide/high16 v0, 0x7ff8000000000000L # Double.NaN
return-wide v0
.line 3
:cond_1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->ensureNonNegative(D)D
move-result-wide v0
iget-wide v4, p0, Lcom/google/common/math/StatsAccumulator;->count:J
sub-long/2addr v4, v2
long-to-double v2, v4
div-double/2addr v0, v2
return-wide v0
.end method
.method public snapshot()Lcom/google/common/math/Stats;
.locals 12
.line 1
new-instance v11, Lcom/google/common/math/Stats;
iget-wide v1, p0, Lcom/google/common/math/StatsAccumulator;->count:J
iget-wide v3, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
iget-wide v5, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
iget-wide v7, p0, Lcom/google/common/math/StatsAccumulator;->min:D
iget-wide v9, p0, Lcom/google/common/math/StatsAccumulator;->max:D
move-object v0, v11
invoke-direct/range {v0 .. v10}, Lcom/google/common/math/Stats;-><init>(JDDDD)V
return-object v11
.end method
.method public final sum()D
.locals 4
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->mean:D
iget-wide v2, p0, Lcom/google/common/math/StatsAccumulator;->count:J
long-to-double v2, v2
mul-double/2addr v0, v2
return-wide v0
.end method
.method public sumOfSquaresOfDeltas()D
.locals 2
.line 1
iget-wide v0, p0, Lcom/google/common/math/StatsAccumulator;->sumOfSquaresOfDeltas:D
return-wide v0
.end method
@@ -0,0 +1,163 @@
.class synthetic Lcom/google/common/math/ToDoubleRounder$1;
.super Ljava/lang/Object;
.source "ToDoubleRounder.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/math/ToDoubleRounder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$java$math$RoundingMode:[I
# direct methods
.method public static constructor <clinit>()V
.locals 3
.line 1
invoke-static {}, Ljava/math/RoundingMode;->values()[Ljava/math/RoundingMode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
:try_start_0
sget-object v1, Ljava/math/RoundingMode;->DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_EVEN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_DOWN:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
:try_start_4
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
:try_end_4
.catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_4
:catch_4
:try_start_5
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
:try_end_5
.catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_5
:catch_5
:try_start_6
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UP:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
:try_end_6
.catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_6
:catch_6
:try_start_7
sget-object v0, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
sget-object v1, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {v1}, Ljava/math/RoundingMode;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
:try_end_7
.catch Ljava/lang/NoSuchFieldError; {:try_start_7 .. :try_end_7} :catch_7
:catch_7
return-void
.end method
@@ -0,0 +1,522 @@
.class abstract Lcom/google/common/math/ToDoubleRounder;
.super Ljava/lang/Object;
.source "ToDoubleRounder.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation runtime Lcom/google/common/math/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<X:",
"Ljava/lang/Number;",
":",
"Ljava/lang/Comparable<",
"TX;>;>",
"Ljava/lang/Object;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public abstract minus(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
.annotation system Ldalvik/annotation/Signature;
value = {
"(TX;TX;)TX;"
}
.end annotation
.end method
.method public final roundToDouble(Ljava/lang/Number;Ljava/math/RoundingMode;)D
.locals 13
.annotation system Ldalvik/annotation/Signature;
value = {
"(TX;",
"Ljava/math/RoundingMode;",
")D"
}
.end annotation
const-string v0, "x"
.line 1
invoke-static {p1, v0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string v0, "mode"
.line 2
invoke-static {p2, v0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 3
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->roundToDoubleArbitrarily(Ljava/lang/Number;)D
move-result-wide v0
.line 4
invoke-static {v0, v1}, Ljava/lang/Double;->isInfinite(D)Z
move-result v2
const-wide/high16 v3, -0x10000000000000L # Double.NEGATIVE_INFINITY
const-wide/high16 v5, 0x7ff0000000000000L # Double.POSITIVE_INFINITY
if-eqz v2, :cond_2
.line 5
sget-object v2, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
invoke-virtual {p2}, Ljava/math/RoundingMode;->ordinal()I
move-result v7
aget v2, v2, v7
const-wide v7, 0x7fefffffffffffffL # Double.MAX_VALUE
packed-switch v2, :pswitch_data_0
goto :goto_1
.line 6
:pswitch_0
new-instance p2, Ljava/lang/ArithmeticException;
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v0, v0, 0x2c
const-string v1, " cannot be represented precisely as a double"
invoke-static {v0, p1, v1}, Lcom/android/billingclient/api/e;->a(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p2
:pswitch_1
return-wide v0
:pswitch_2
cmpl-double p1, v0, v5
if-nez p1, :cond_0
goto :goto_0
:cond_0
const-wide v5, -0x10000000000001L
:goto_0
return-wide v5
:pswitch_3
cmpl-double p1, v0, v5
if-nez p1, :cond_1
move-wide v3, v7
:cond_1
return-wide v3
.line 7
:pswitch_4
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->sign(Ljava/lang/Number;)I
move-result p1
int-to-double p1, p1
mul-double/2addr p1, v7
return-wide p1
.line 8
:cond_2
:goto_1
sget-object v2, Ljava/math/RoundingMode;->UNNECESSARY:Ljava/math/RoundingMode;
invoke-virtual {p0, v0, v1, v2}, Lcom/google/common/math/ToDoubleRounder;->toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
move-result-object v2
.line 9
move-object v7, p1
check-cast v7, Ljava/lang/Comparable;
invoke-interface {v7, v2}, Ljava/lang/Comparable;->compareTo(Ljava/lang/Object;)I
move-result v7
.line 10
sget-object v8, Lcom/google/common/math/ToDoubleRounder$1;->$SwitchMap$java$math$RoundingMode:[I
invoke-virtual {p2}, Ljava/math/RoundingMode;->ordinal()I
move-result v9
aget v9, v8, v9
const-string v10, "impossible"
packed-switch v9, :pswitch_data_1
.line 11
new-instance p1, Ljava/lang/AssertionError;
invoke-direct {p1, v10}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p1
:pswitch_5
if-nez v7, :cond_3
const/4 p1, 0x1
goto :goto_2
:cond_3
const/4 p1, 0x0
.line 12
:goto_2
invoke-static {p1}, Lcom/google/common/math/MathPreconditions;->checkRoundingUnnecessary(Z)V
return-wide v0
.line 13
:pswitch_6
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->sign(Ljava/lang/Number;)I
move-result p1
if-ltz p1, :cond_5
if-gtz v7, :cond_4
goto :goto_3
.line 14
:cond_4
invoke-static {v0, v1}, Ljava/lang/Math;->nextUp(D)D
move-result-wide v0
:goto_3
return-wide v0
:cond_5
if-ltz v7, :cond_6
goto :goto_4
.line 15
:cond_6
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->nextDown(D)D
move-result-wide v0
:goto_4
return-wide v0
:pswitch_7
if-gtz v7, :cond_7
goto :goto_5
.line 16
:cond_7
invoke-static {v0, v1}, Ljava/lang/Math;->nextUp(D)D
move-result-wide v0
:goto_5
return-wide v0
:pswitch_8
if-ltz v7, :cond_8
goto :goto_6
.line 17
:cond_8
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->nextDown(D)D
move-result-wide v0
:goto_6
return-wide v0
:pswitch_9
if-ltz v7, :cond_a
.line 18
invoke-static {v0, v1}, Ljava/lang/Math;->nextUp(D)D
move-result-wide v3
cmpl-double v5, v3, v5
if-nez v5, :cond_9
return-wide v0
.line 19
:cond_9
sget-object v5, Ljava/math/RoundingMode;->CEILING:Ljava/math/RoundingMode;
invoke-virtual {p0, v3, v4, v5}, Lcom/google/common/math/ToDoubleRounder;->toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
move-result-object v5
goto :goto_7
.line 20
:cond_a
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->nextDown(D)D
move-result-wide v5
cmpl-double v3, v5, v3
if-nez v3, :cond_b
return-wide v0
.line 21
:cond_b
sget-object v3, Ljava/math/RoundingMode;->FLOOR:Ljava/math/RoundingMode;
invoke-virtual {p0, v5, v6, v3}, Lcom/google/common/math/ToDoubleRounder;->toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
move-result-object v3
move-wide v11, v5
move-object v5, v2
move-object v2, v3
move-wide v3, v0
move-wide v0, v11
.line 22
:goto_7
invoke-virtual {p0, p1, v2}, Lcom/google/common/math/ToDoubleRounder;->minus(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
move-result-object v2
.line 23
invoke-virtual {p0, v5, p1}, Lcom/google/common/math/ToDoubleRounder;->minus(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
move-result-object v5
.line 24
check-cast v2, Ljava/lang/Comparable;
invoke-interface {v2, v5}, Ljava/lang/Comparable;->compareTo(Ljava/lang/Object;)I
move-result v2
if-gez v2, :cond_c
return-wide v0
:cond_c
if-lez v2, :cond_d
return-wide v3
.line 25
:cond_d
invoke-virtual {p2}, Ljava/math/RoundingMode;->ordinal()I
move-result p2
aget p2, v8, p2
const/4 v2, 0x2
if-eq p2, v2, :cond_12
const/4 v2, 0x3
if-eq p2, v2, :cond_10
const/4 v2, 0x4
if-ne p2, v2, :cond_f
.line 26
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->sign(Ljava/lang/Number;)I
move-result p1
if-ltz p1, :cond_e
move-wide v0, v3
:cond_e
return-wide v0
.line 27
:cond_f
new-instance p1, Ljava/lang/AssertionError;
invoke-direct {p1, v10}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p1
.line 28
:cond_10
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->sign(Ljava/lang/Number;)I
move-result p1
if-ltz p1, :cond_11
goto :goto_8
:cond_11
move-wide v0, v3
:goto_8
return-wide v0
.line 29
:cond_12
invoke-static {v0, v1}, Ljava/lang/Double;->doubleToRawLongBits(D)J
move-result-wide p1
const-wide/16 v5, 0x1
and-long/2addr p1, v5
const-wide/16 v5, 0x0
cmp-long p1, p1, v5
if-nez p1, :cond_13
goto :goto_9
:cond_13
move-wide v0, v3
:goto_9
return-wide v0
.line 30
:pswitch_a
invoke-virtual {p0, p1}, Lcom/google/common/math/ToDoubleRounder;->sign(Ljava/lang/Number;)I
move-result p1
if-ltz p1, :cond_15
if-ltz v7, :cond_14
goto :goto_a
.line 31
:cond_14
invoke-static {v0, v1}, Lcom/google/common/math/DoubleUtils;->nextDown(D)D
move-result-wide v0
:goto_a
return-wide v0
:cond_15
if-gtz v7, :cond_16
goto :goto_b
.line 32
:cond_16
invoke-static {v0, v1}, Ljava/lang/Math;->nextUp(D)D
move-result-wide v0
:goto_b
return-wide v0
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_4
:pswitch_4
:pswitch_4
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
:pswitch_data_1
.packed-switch 0x1
:pswitch_a
:pswitch_9
:pswitch_9
:pswitch_9
:pswitch_8
:pswitch_7
:pswitch_6
:pswitch_5
.end packed-switch
.end method
.method public abstract roundToDoubleArbitrarily(Ljava/lang/Number;)D
.annotation system Ldalvik/annotation/Signature;
value = {
"(TX;)D"
}
.end annotation
.end method
.method public abstract sign(Ljava/lang/Number;)I
.annotation system Ldalvik/annotation/Signature;
value = {
"(TX;)I"
}
.end annotation
.end method
.method public abstract toX(DLjava/math/RoundingMode;)Ljava/lang/Number;
.annotation system Ldalvik/annotation/Signature;
value = {
"(D",
"Ljava/math/RoundingMode;",
")TX;"
}
.end annotation
.end method
@@ -0,0 +1,11 @@
.class interface abstract synthetic Lcom/google/common/math/package-info;
.super Ljava/lang/Object;
.source "package-info.java"
# annotations
.annotation runtime Lcom/google/errorprone/annotations/CheckReturnValue;
.end annotation
.annotation runtime Ljavax/annotation/ParametersAreNonnullByDefault;
.end annotation