.class public Landroidx/constraintlayout/solver/SolverVariable; .super Ljava/lang/Object; .source "SolverVariable.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/constraintlayout/solver/SolverVariable$Type; } .end annotation # static fields .field public static final INTERNAL_DEBUG:Z = false .field public static final MAX_STRENGTH:I = 0x9 .field public static final STRENGTH_BARRIER:I = 0x6 .field public static final STRENGTH_CENTERING:I = 0x7 .field public static final STRENGTH_EQUALITY:I = 0x5 .field public static final STRENGTH_FIXED:I = 0x8 .field public static final STRENGTH_HIGH:I = 0x3 .field public static final STRENGTH_HIGHEST:I = 0x4 .field public static final STRENGTH_LOW:I = 0x1 .field public static final STRENGTH_MEDIUM:I = 0x2 .field public static final STRENGTH_NONE:I = 0x0 .field public static final VAR_USE_HASH:Z = false .field public static uniqueConstantId:I = 0x1 .field public static uniqueErrorId:I = 0x1 .field public static uniqueId:I = 0x1 .field public static uniqueSlackId:I = 0x1 .field public static uniqueUnrestrictedId:I = 0x1 # instance fields .field public computedValue:F .field public definitionId:I .field public goalStrengthVector:[F .field public id:I .field public inGoal:Z .field public inRows:Ljava/util/HashSet; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashSet<", "Landroidx/constraintlayout/solver/ArrayRow;", ">;" } .end annotation .end field .field public isFinalValue:Z .field public mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; .field public mClientEquationsCount:I .field public mName:Ljava/lang/String; .field public mType:Landroidx/constraintlayout/solver/SolverVariable$Type; .field public strength:I .field public strengthVector:[F .field public usageInRowCount:I # direct methods .method public constructor (Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)V .locals 2 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 p2, -0x1 iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 p2, 0x0 iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->strength:I iput-boolean p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->isFinalValue:Z const/16 v0, 0x9 new-array v1, v0, [F iput-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F new-array v0, v0, [F iput-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->goalStrengthVector:[F const/16 v0, 0x10 new-array v0, v0, [Landroidx/constraintlayout/solver/ArrayRow; iput-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->usageInRowCount:I const/4 p2, 0x0 iput-object p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->inRows:Ljava/util/HashSet; iput-object p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; return-void .end method .method public constructor (Ljava/lang/String;Landroidx/constraintlayout/solver/SolverVariable$Type;)V .locals 3 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, -0x1 iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 v0, 0x0 iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->strength:I iput-boolean v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->isFinalValue:Z const/16 v1, 0x9 new-array v2, v1, [F iput-object v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F new-array v1, v1, [F iput-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->goalStrengthVector:[F const/16 v1, 0x10 new-array v1, v1, [Landroidx/constraintlayout/solver/ArrayRow; iput-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->usageInRowCount:I const/4 v0, 0x0 iput-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->inRows:Ljava/util/HashSet; iput-object p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; iput-object p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; return-void .end method .method public static getUniqueName(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Ljava/lang/String; .locals 2 if-eqz p1, :cond_0 invoke-static {p1}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueErrorId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 :cond_0 invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I move-result p1 const/4 v0, 0x1 if-eqz p1, :cond_5 if-eq p1, v0, :cond_4 const/4 v1, 0x2 if-eq p1, v1, :cond_3 const/4 v1, 0x3 if-eq p1, v1, :cond_2 const/4 v1, 0x4 if-ne p1, v1, :cond_1 const-string p0, "V" invoke-static {p0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueId:I add-int/2addr p1, v0 sput p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 :cond_1 new-instance p1, Ljava/lang/AssertionError; invoke-virtual {p0}, Ljava/lang/Enum;->name()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/AssertionError;->(Ljava/lang/Object;)V throw p1 :cond_2 const-string p0, "e" invoke-static {p0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueErrorId:I add-int/2addr p1, v0 sput p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueErrorId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 :cond_3 const-string p0, "S" invoke-static {p0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueSlackId:I add-int/2addr p1, v0 sput p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueSlackId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 :cond_4 const-string p0, "C" invoke-static {p0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueConstantId:I add-int/2addr p1, v0 sput p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueConstantId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 :cond_5 const-string p0, "U" invoke-static {p0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 sget p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueUnrestrictedId:I add-int/2addr p1, v0 sput p1, Landroidx/constraintlayout/solver/SolverVariable;->uniqueUnrestrictedId:I invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static increaseErrorId()V .locals 1 sget v0, Landroidx/constraintlayout/solver/SolverVariable;->uniqueErrorId:I add-int/lit8 v0, v0, 0x1 sput v0, Landroidx/constraintlayout/solver/SolverVariable;->uniqueErrorId:I return-void .end method # virtual methods .method public final addToRow(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 3 const/4 v0, 0x0 :goto_0 iget v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I if-ge v0, v1, :cond_1 iget-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v1, v1, v0 if-ne v1, p1, :cond_0 return-void :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 iget-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; array-length v2, v0 if-lt v1, v2, :cond_2 array-length v1, v0 mul-int/lit8 v1, v1, 0x2 invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; move-result-object v0 check-cast v0, [Landroidx/constraintlayout/solver/ArrayRow; iput-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; :cond_2 iget-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; iget v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I aput-object p1, v0, v1 add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I return-void .end method .method public clearStrengths()V .locals 3 const/4 v0, 0x0 :goto_0 const/16 v1, 0x9 if-ge v0, v1, :cond_0 iget-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F const/4 v2, 0x0 aput v2, v1, v0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_0 return-void .end method .method public getName()Ljava/lang/String; .locals 1 iget-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; return-object v0 .end method .method public final removeFromRow(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 4 iget v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I const/4 v1, 0x0 :goto_0 if-ge v1, v0, :cond_2 iget-object v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v2, v2, v1 if-ne v2, p1, :cond_1 :goto_1 add-int/lit8 p1, v0, -0x1 if-ge v1, p1, :cond_0 iget-object p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; add-int/lit8 v2, v1, 0x1 aget-object v3, p1, v2 aput-object v3, p1, v1 move v1, v2 goto :goto_1 :cond_0 iget p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I add-int/lit8 p1, p1, -0x1 iput p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I return-void :cond_1 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_2 return-void .end method .method public reset()V .locals 6 const/4 v0, 0x0 iput-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; sget-object v1, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNKNOWN:Landroidx/constraintlayout/solver/SolverVariable$Type; iput-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; const/4 v1, 0x0 iput v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->strength:I const/4 v2, -0x1 iput v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iput v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 v2, 0x0 iput v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->computedValue:F iput-boolean v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->isFinalValue:Z iget v3, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I const/4 v4, 0x0 :goto_0 if-ge v4, v3, :cond_0 iget-object v5, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; aput-object v0, v5, v4 add-int/lit8 v4, v4, 0x1 goto :goto_0 :cond_0 iput v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I iput v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->usageInRowCount:I iput-boolean v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->inGoal:Z iget-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->goalStrengthVector:[F invoke-static {v0, v2}, Ljava/util/Arrays;->fill([FF)V return-void .end method .method public setFinalValue(Landroidx/constraintlayout/solver/LinearSystem;F)V .locals 3 iput p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->computedValue:F const/4 p2, 0x1 iput-boolean p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->isFinalValue:Z iget p2, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I const/4 v0, 0x0 const/4 v1, 0x0 :goto_0 if-ge v1, p2, :cond_0 iget-object v2, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v2, v2, v1 invoke-virtual {v2, p1, p0, v0}, Landroidx/constraintlayout/solver/ArrayRow;->updateFromFinalVariable(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Z)V add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_0 iput v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I return-void .end method .method public setName(Ljava/lang/String;)V .locals 0 iput-object p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; return-void .end method .method public setType(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)V .locals 0 iput-object p1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; return-void .end method .method public strengthsToString()Ljava/lang/String; .locals 7 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string v1, "[" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const/4 v1, 0x0 const/4 v2, 0x0 const/4 v3, 0x1 :goto_0 iget-object v4, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F array-length v4, v4 if-ge v1, v4, :cond_4 invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 iget-object v4, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F aget v4, v4, v1 invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 iget-object v4, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F aget v5, v4, v1 const/4 v6, 0x0 cmpl-float v5, v5, v6 if-lez v5, :cond_0 const/4 v2, 0x0 goto :goto_1 :cond_0 aget v4, v4, v1 cmpg-float v4, v4, v6 if-gez v4, :cond_1 const/4 v2, 0x1 :cond_1 :goto_1 iget-object v4, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F aget v4, v4, v1 cmpl-float v4, v4, v6 if-eqz v4, :cond_2 const/4 v3, 0x0 :cond_2 iget-object v4, p0, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F array-length v4, v4 add-int/lit8 v4, v4, -0x1 if-ge v1, v4, :cond_3 const-string v4, ", " invoke-static {v0, v4}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 goto :goto_2 :cond_3 const-string v4, "] " invoke-static {v0, v4}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 :goto_2 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_4 if-eqz v2, :cond_5 const-string v1, " (-)" invoke-static {v0, v1}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 :cond_5 if-eqz v3, :cond_6 const-string v1, " (*)" invoke-static {v0, v1}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 :cond_6 return-object v0 .end method .method public toString()Ljava/lang/String; .locals 2 iget-object v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; const-string v1, "" if-eqz v0, :cond_0 invoke-static {v1}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 iget-object v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mName:Ljava/lang/String; invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 goto :goto_0 :cond_0 invoke-static {v1}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 iget v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->id:I invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 :goto_0 return-object v0 .end method .method public final updateReferencesWithNewDefinition(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 4 iget v0, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I const/4 v1, 0x0 const/4 v2, 0x0 :goto_0 if-ge v2, v0, :cond_0 iget-object v3, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquations:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v3, v3, v2 invoke-virtual {v3, p1, v1}, Landroidx/constraintlayout/solver/ArrayRow;->updateFromRow(Landroidx/constraintlayout/solver/ArrayRow;Z)V add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_0 iput v1, p0, Landroidx/constraintlayout/solver/SolverVariable;->mClientEquationsCount:I return-void .end method