.class public Landroidx/constraintlayout/solver/LinearSystem; .super Ljava/lang/Object; .source "LinearSystem.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/constraintlayout/solver/LinearSystem$Row; } .end annotation # static fields .field private static final DEBUG:Z = false .field public static final FULL_DEBUG:Z = false .field private static POOL_SIZE:I = 0x3e8 .field public static sMetrics:Landroidx/constraintlayout/solver/Metrics; # instance fields .field private TABLE_SIZE:I .field public graphOptimizer:Z .field private mAlreadyTestedCandidates:[Z .field final mCache:Landroidx/constraintlayout/solver/Cache; .field private mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; .field private mMaxColumns:I .field private mMaxRows:I .field mNumColumns:I .field mNumRows:I .field private mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; .field private mPoolVariablesCount:I .field mRows:[Landroidx/constraintlayout/solver/ArrayRow; .field private final mTempGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; .field private mVariables:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroidx/constraintlayout/solver/SolverVariable;", ">;" } .end annotation .end field .field mVariablesID:I .field private tempClientsCopy:[Landroidx/constraintlayout/solver/ArrayRow; # direct methods .method static constructor ()V .locals 0 return-void .end method .method public constructor ()V .locals 3 invoke-direct {p0}, Ljava/lang/Object;->()V const/4 v0, 0x0 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I const/4 v1, 0x0 iput-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; const/16 v2, 0x20 iput v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I iput v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I iput-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iput-boolean v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->graphOptimizer:Z new-array v1, v2, [Z iput-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z const/4 v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I iput v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxRows:I sget v1, Landroidx/constraintlayout/solver/LinearSystem;->POOL_SIZE:I new-array v1, v1, [Landroidx/constraintlayout/solver/SolverVariable; iput-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I new-array v0, v2, [Landroidx/constraintlayout/solver/ArrayRow; iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->tempClientsCopy:[Landroidx/constraintlayout/solver/ArrayRow; new-array v0, v2, [Landroidx/constraintlayout/solver/ArrayRow; iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->releaseRows()V new-instance v0, Landroidx/constraintlayout/solver/Cache; invoke-direct {v0}, Landroidx/constraintlayout/solver/Cache;->()V iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; new-instance v0, Landroidx/constraintlayout/solver/GoalRow; iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; invoke-direct {v0, v1}, Landroidx/constraintlayout/solver/GoalRow;->(Landroidx/constraintlayout/solver/Cache;)V iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; new-instance v0, Landroidx/constraintlayout/solver/ArrayRow; iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; invoke-direct {v0, v1}, Landroidx/constraintlayout/solver/ArrayRow;->(Landroidx/constraintlayout/solver/Cache;)V iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mTempGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; return-void .end method .method private acquireSolverVariable(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; .locals 2 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v0, v0, Landroidx/constraintlayout/solver/Cache;->solverVariablePool:Landroidx/constraintlayout/solver/Pools$Pool; invoke-interface {v0}, Landroidx/constraintlayout/solver/Pools$Pool;->acquire()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/constraintlayout/solver/SolverVariable; if-nez v0, :cond_0 new-instance v0, Landroidx/constraintlayout/solver/SolverVariable; invoke-direct {v0, p1, p2}, Landroidx/constraintlayout/solver/SolverVariable;->(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)V invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/SolverVariable;->setType(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)V goto :goto_0 :cond_0 invoke-virtual {v0}, Landroidx/constraintlayout/solver/SolverVariable;->reset()V invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/SolverVariable;->setType(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)V :goto_0 iget p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I sget p2, Landroidx/constraintlayout/solver/LinearSystem;->POOL_SIZE:I if-lt p1, p2, :cond_1 mul-int/lit8 p2, p2, 0x2 sput p2, Landroidx/constraintlayout/solver/LinearSystem;->POOL_SIZE:I iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; sget p2, Landroidx/constraintlayout/solver/LinearSystem;->POOL_SIZE:I invoke-static {p1, p2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; move-result-object p1 check-cast p1, [Landroidx/constraintlayout/solver/SolverVariable; iput-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; :cond_1 iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget p2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I add-int/lit8 v1, p2, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I aput-object v0, p1, p2 return-object v0 .end method .method private addError(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 1 const/4 v0, 0x0 invoke-virtual {p1, p0, v0}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; return-void .end method .method private final addRow(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 3 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I aget-object v0, v0, v1 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v0, v0, Landroidx/constraintlayout/solver/Cache;->arrayRowPool:Landroidx/constraintlayout/solver/Pools$Pool; iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I aget-object v1, v1, v2 invoke-interface {v0, v1}, Landroidx/constraintlayout/solver/Pools$Pool;->release(Ljava/lang/Object;)Z :cond_0 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I aput-object p1, v0, v1 iget-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I iput v1, v0, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I iget-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; invoke-virtual {v0, p1}, Landroidx/constraintlayout/solver/SolverVariable;->updateReferencesWithNewDefinition(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method private addSingleError(Landroidx/constraintlayout/solver/ArrayRow;I)V .locals 1 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V return-void .end method .method private computeValues()V .locals 3 const/4 v0, 0x0 :goto_0 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v0, v1, :cond_0 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v1, v1, v0 iget-object v2, v1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget v1, v1, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F iput v1, v2, Landroidx/constraintlayout/solver/SolverVariable;->computedValue:F add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_0 return-void .end method .method public static createRowCentering(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IFLandroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IZ)Landroidx/constraintlayout/solver/ArrayRow; .locals 9 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v8 move-object v0, v8 move-object v1, p1 move-object v2, p2 move v3, p3 move v4, p4 move-object v5, p5 move-object v6, p6 move/from16 v7, p7 invoke-virtual/range {v0 .. v7}, Landroidx/constraintlayout/solver/ArrayRow;->createRowCentering(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IFLandroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p8, :cond_0 const/4 v0, 0x4 move-object v1, p0 invoke-virtual {v8, p0, v0}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; :cond_0 return-object v8 .end method .method public static createRowDimensionPercent(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;FZ)Landroidx/constraintlayout/solver/ArrayRow; .locals 1 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 if-eqz p5, :cond_0 invoke-direct {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addError(Landroidx/constraintlayout/solver/ArrayRow;)V :cond_0 invoke-virtual {v0, p1, p2, p3, p4}, Landroidx/constraintlayout/solver/ArrayRow;->createRowDimensionPercent(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;F)Landroidx/constraintlayout/solver/ArrayRow; move-result-object p0 return-object p0 .end method .method public static createRowEquals(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IZ)Landroidx/constraintlayout/solver/ArrayRow; .locals 1 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowEquals(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p4, :cond_0 const/4 p1, 0x1 invoke-direct {p0, v0, p1}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;I)V :cond_0 return-object v0 .end method .method public static createRowGreaterThan(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IZ)Landroidx/constraintlayout/solver/ArrayRow; .locals 2 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v1 invoke-virtual {v1, p1, p2, v0, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p4, :cond_0 iget-object p1, v1, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v0}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 invoke-direct {p0, v1, p1}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;I)V :cond_0 return-object v1 .end method .method public static createRowLowerThan(Landroidx/constraintlayout/solver/LinearSystem;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IZ)Landroidx/constraintlayout/solver/ArrayRow; .locals 2 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v1 invoke-virtual {v1, p1, p2, v0, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowLowerThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p4, :cond_0 iget-object p1, v1, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v0}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 invoke-direct {p0, v1, p1}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;I)V :cond_0 return-object v1 .end method .method private createVariable(Ljava/lang/String;Landroidx/constraintlayout/solver/SolverVariable$Type;)Landroidx/constraintlayout/solver/SolverVariable; .locals 5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->variables:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->variables:J :cond_0 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v0, v1, :cond_1 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_1 const/4 v0, 0x0 invoke-direct {p0, p2, v0}, Landroidx/constraintlayout/solver/LinearSystem;->acquireSolverVariable(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object p2 invoke-virtual {p2, p1}, Landroidx/constraintlayout/solver/SolverVariable;->setName(Ljava/lang/String;)V iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iput v0, p2, Landroidx/constraintlayout/solver/SolverVariable;->id:I iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; if-nez v0, :cond_2 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; :cond_2 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object p1, p1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I aput-object p2, p1, v0 return-object p2 .end method .method private displayRows()V .locals 3 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->displaySolverVariables()V const-string v0, "" const/4 v1, 0x0 :goto_0 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v1, v2, :cond_0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v0, v0, v1 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v0, "\n" invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_0 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string v0, "\n" invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream; invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method .method private displaySolverVariables()V .locals 2 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Display Rows (" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v1, "x" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v1, ")\n" 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 sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream; invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method .method private enforceBFS(Landroidx/constraintlayout/solver/LinearSystem$Row;)I .locals 17 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/Exception; } .end annotation move-object/from16 v0, p0 const/4 v2, 0x0 :goto_0 iget v3, v0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I const/4 v4, 0x0 if-ge v2, v3, :cond_1 iget-object v3, v0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v3, v3, v2 iget-object v3, v3, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget-object v3, v3, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; sget-object v6, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; if-eq v3, v6, :cond_0 iget-object v3, v0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v3, v3, v2 iget v3, v3, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F cmpg-float v3, v3, v4 if-gez v3, :cond_0 const/4 v2, 0x1 goto :goto_1 :cond_0 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_1 const/4 v2, 0x0 :goto_1 if-eqz v2, :cond_d const/4 v2, 0x0 const/4 v3, 0x0 :goto_2 if-nez v2, :cond_e sget-object v6, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; const-wide/16 v7, 0x1 if-eqz v6, :cond_2 iget-wide v9, v6, Landroidx/constraintlayout/solver/Metrics;->bfs:J add-long/2addr v9, v7 iput-wide v9, v6, Landroidx/constraintlayout/solver/Metrics;->bfs:J :cond_2 add-int/lit8 v3, v3, 0x1 const v6, 0x7f7fffff # Float.MAX_VALUE const/4 v9, -0x1 const/4 v6, 0x0 const/4 v10, -0x1 const/4 v11, -0x1 const v12, 0x7f7fffff # Float.MAX_VALUE const/4 v13, 0x0 :goto_3 iget v14, v0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v6, v14, :cond_9 iget-object v14, v0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v14, v14, v6 iget-object v15, v14, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget-object v15, v15, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; sget-object v1, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; if-eq v15, v1, :cond_8 iget-boolean v1, v14, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-nez v1, :cond_8 iget v1, v14, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F cmpg-float v1, v1, v4 if-gez v1, :cond_8 const/4 v1, 0x1 :goto_4 iget v15, v0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I if-ge v1, v15, :cond_8 iget-object v15, v0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v15, v15, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; aget-object v15, v15, v1 iget-object v5, v14, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {v5, v15}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result v5 cmpg-float v16, v5, v4 if-lez v16, :cond_7 move v4, v13 move v13, v12 move v12, v11 move v11, v10 const/4 v10, 0x0 :goto_5 const/4 v7, 0x7 if-ge v10, v7, :cond_6 iget-object v7, v15, Landroidx/constraintlayout/solver/SolverVariable;->strengthVector:[F aget v7, v7, v10 div-float/2addr v7, v5 cmpg-float v8, v7, v13 if-gez v8, :cond_3 if-eq v10, v4, :cond_4 :cond_3 if-le v10, v4, :cond_5 :cond_4 move v12, v1 move v11, v6 move v13, v7 move v4, v10 :cond_5 add-int/lit8 v10, v10, 0x1 goto :goto_5 :cond_6 move v10, v11 move v11, v12 move v12, v13 move v13, v4 :cond_7 add-int/lit8 v1, v1, 0x1 const/4 v4, 0x0 const-wide/16 v7, 0x1 goto :goto_4 :cond_8 add-int/lit8 v6, v6, 0x1 const/4 v4, 0x0 const-wide/16 v7, 0x1 goto :goto_3 :cond_9 if-eq v10, v9, :cond_b iget-object v1, v0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v1, v1, v10 iget-object v4, v1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iput v9, v4, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I sget-object v4, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v4, :cond_a iget-wide v5, v4, Landroidx/constraintlayout/solver/Metrics;->pivots:J const-wide/16 v7, 0x1 add-long/2addr v5, v7 iput-wide v5, v4, Landroidx/constraintlayout/solver/Metrics;->pivots:J :cond_a iget-object v4, v0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v4, v4, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; aget-object v4, v4, v11 invoke-virtual {v1, v4}, Landroidx/constraintlayout/solver/ArrayRow;->pivot(Landroidx/constraintlayout/solver/SolverVariable;)V iget-object v4, v1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iput v10, v4, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I iget-object v4, v1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; invoke-virtual {v4, v1}, Landroidx/constraintlayout/solver/SolverVariable;->updateReferencesWithNewDefinition(Landroidx/constraintlayout/solver/ArrayRow;)V goto :goto_6 :cond_b const/4 v2, 0x1 :goto_6 iget v1, v0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I div-int/lit8 v1, v1, 0x2 if-le v3, v1, :cond_c const/4 v2, 0x1 :cond_c const/4 v4, 0x0 goto/16 :goto_2 :cond_d const/4 v3, 0x0 :cond_e return v3 .end method .method private getDisplaySize(I)Ljava/lang/String; .locals 2 mul-int/lit8 p1, p1, 0x4 div-int/lit16 v0, p1, 0x400 div-int/lit16 v1, v0, 0x400 if-lez v1, :cond_0 new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v0, " Mb" invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 return-object p1 :cond_0 if-lez v0, :cond_1 new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v0, " Kb" invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 return-object p1 :cond_1 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string p1, " bytes" invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 return-object p1 .end method .method private getDisplayStrength(I)Ljava/lang/String; .locals 1 const/4 v0, 0x1 if-ne p1, v0, :cond_0 const-string p1, "LOW" return-object p1 :cond_0 const/4 v0, 0x2 if-ne p1, v0, :cond_1 const-string p1, "MEDIUM" return-object p1 :cond_1 const/4 v0, 0x3 if-ne p1, v0, :cond_2 const-string p1, "HIGH" return-object p1 :cond_2 const/4 v0, 0x4 if-ne p1, v0, :cond_3 const-string p1, "HIGHEST" return-object p1 :cond_3 const/4 v0, 0x5 if-ne p1, v0, :cond_4 const-string p1, "EQUALITY" return-object p1 :cond_4 const/4 v0, 0x6 if-ne p1, v0, :cond_5 const-string p1, "FIXED" return-object p1 :cond_5 const-string p1, "NONE" return-object p1 .end method .method public static getMetrics()Landroidx/constraintlayout/solver/Metrics; .locals 1 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; return-object v0 .end method .method private increaseTableSize()V .locals 5 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I mul-int/lit8 v0, v0, 0x2 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I 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/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v1, v0, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I invoke-static {v1, v2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; move-result-object v1 check-cast v1, [Landroidx/constraintlayout/solver/SolverVariable; iput-object v1, v0, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I new-array v1, v0, [Z iput-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxRows:I sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->tableSizeIncrease:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->tableSizeIncrease:J sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxTableSize:J iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I int-to-long v3, v3 invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(JJ)J move-result-wide v1 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxTableSize:J sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxTableSize:J iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->lastTableSize:J :cond_0 return-void .end method .method private final optimize(Landroidx/constraintlayout/solver/LinearSystem$Row;Z)I .locals 13 sget-object p2, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; const-wide/16 v0, 0x1 if-eqz p2, :cond_0 iget-wide v2, p2, Landroidx/constraintlayout/solver/Metrics;->optimize:J add-long/2addr v2, v0 iput-wide v2, p2, Landroidx/constraintlayout/solver/Metrics;->optimize:J :cond_0 const/4 p2, 0x0 const/4 v2, 0x0 :goto_0 iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I if-ge v2, v3, :cond_1 iget-object v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z aput-boolean p2, v3, v2 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_1 const/4 v2, 0x1 const/4 v3, 0x0 const/4 v4, 0x0 :goto_1 if-nez v3, :cond_c sget-object v5, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v5, :cond_2 iget-wide v6, v5, Landroidx/constraintlayout/solver/Metrics;->iterations:J add-long/2addr v6, v0 iput-wide v6, v5, Landroidx/constraintlayout/solver/Metrics;->iterations:J :cond_2 add-int/lit8 v4, v4, 0x1 iget v5, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I mul-int/lit8 v5, v5, 0x2 if-lt v4, v5, :cond_3 return v4 :cond_3 invoke-interface {p1}, Landroidx/constraintlayout/solver/LinearSystem$Row;->getKey()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v5 if-eqz v5, :cond_4 iget-object v5, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z invoke-interface {p1}, Landroidx/constraintlayout/solver/LinearSystem$Row;->getKey()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v6 iget v6, v6, Landroidx/constraintlayout/solver/SolverVariable;->id:I aput-boolean v2, v5, v6 :cond_4 iget-object v5, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z invoke-interface {p1, p0, v5}, Landroidx/constraintlayout/solver/LinearSystem$Row;->getPivotCandidate(Landroidx/constraintlayout/solver/LinearSystem;[Z)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v5 if-eqz v5, :cond_6 iget-object v6, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z iget v7, v5, Landroidx/constraintlayout/solver/SolverVariable;->id:I aget-boolean v6, v6, v7 if-eqz v6, :cond_5 return v4 :cond_5 iget-object v6, p0, Landroidx/constraintlayout/solver/LinearSystem;->mAlreadyTestedCandidates:[Z iget v7, v5, Landroidx/constraintlayout/solver/SolverVariable;->id:I aput-boolean v2, v6, v7 :cond_6 if-eqz v5, :cond_b const v6, 0x7f7fffff # Float.MAX_VALUE const/4 v7, -0x1 const/4 v6, 0x0 const/4 v8, -0x1 const v9, 0x7f7fffff # Float.MAX_VALUE :goto_2 iget v10, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v6, v10, :cond_8 iget-object v10, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v10, v10, v6 iget-object v11, v10, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget-object v11, v11, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; sget-object v12, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; if-eq v11, v12, :cond_7 iget-boolean v11, v10, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-nez v11, :cond_7 invoke-virtual {v10, v5}, Landroidx/constraintlayout/solver/ArrayRow;->hasVariable(Landroidx/constraintlayout/solver/SolverVariable;)Z move-result v11 if-eqz v11, :cond_7 iget-object v11, v10, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {v11, v5}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result v11 const/4 v12, 0x0 cmpg-float v12, v11, v12 if-gez v12, :cond_7 iget v10, v10, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F neg-float v10, v10 div-float/2addr v10, v11 cmpg-float v11, v10, v9 if-gez v11, :cond_7 move v8, v6 move v9, v10 :cond_7 add-int/lit8 v6, v6, 0x1 goto :goto_2 :cond_8 if-ltz v8, :cond_a iget-object v6, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v6, v6, v8 iget-object v9, v6, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iput v7, v9, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I sget-object v7, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v7, :cond_9 iget-wide v9, v7, Landroidx/constraintlayout/solver/Metrics;->pivots:J add-long/2addr v9, v0 iput-wide v9, v7, Landroidx/constraintlayout/solver/Metrics;->pivots:J :cond_9 invoke-virtual {v6, v5}, Landroidx/constraintlayout/solver/ArrayRow;->pivot(Landroidx/constraintlayout/solver/SolverVariable;)V iget-object v5, v6, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iput v8, v5, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I iget-object v5, v6, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; invoke-virtual {v5, v6}, Landroidx/constraintlayout/solver/SolverVariable;->updateReferencesWithNewDefinition(Landroidx/constraintlayout/solver/ArrayRow;)V goto/16 :goto_1 :cond_a const/4 v3, 0x1 goto/16 :goto_1 :cond_b const/4 v3, 0x1 goto/16 :goto_1 :cond_c return v4 .end method .method private releaseRows()V .locals 3 const/4 v0, 0x0 :goto_0 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; array-length v2, v1 if-ge v0, v2, :cond_1 aget-object v1, v1, v0 if-eqz v1, :cond_0 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v2, v2, Landroidx/constraintlayout/solver/Cache;->arrayRowPool:Landroidx/constraintlayout/solver/Pools$Pool; invoke-interface {v2, v1}, Landroidx/constraintlayout/solver/Pools$Pool;->release(Ljava/lang/Object;)Z :cond_0 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; const/4 v2, 0x0 aput-object v2, v1, v0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 return-void .end method .method private final updateRowFromVariables(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 2 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-lez v0, :cond_0 iget-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {v0, p1, v1}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->updateFromSystem(Landroidx/constraintlayout/solver/ArrayRow;[Landroidx/constraintlayout/solver/ArrayRow;)V iget-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; iget v0, v0, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->currentSize:I if-nez v0, :cond_0 const/4 v0, 0x1 iput-boolean v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z :cond_0 return-void .end method # virtual methods .method public addCenterPoint(Landroidx/constraintlayout/solver/widgets/ConstraintWidget;Landroidx/constraintlayout/solver/widgets/ConstraintWidget;FI)V .locals 18 move-object/from16 v0, p0 move-object/from16 v1, p1 move-object/from16 v2, p2 sget-object v3, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->LEFT:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v1, v3}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v3 invoke-virtual {v0, v3}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v5 sget-object v3, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->TOP:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v1, v3}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v3 invoke-virtual {v0, v3}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v7 sget-object v3, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->RIGHT:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v1, v3}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v3 invoke-virtual {v0, v3}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v3 sget-object v4, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->BOTTOM:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v1, v4}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v1 invoke-virtual {v0, v1}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v8 sget-object v1, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->LEFT:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v2, v1}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v1 invoke-virtual {v0, v1}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 sget-object v4, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->TOP:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v2, v4}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v4 invoke-virtual {v0, v4}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v9 sget-object v4, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->RIGHT:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v2, v4}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v4 invoke-virtual {v0, v4}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v12 sget-object v4, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;->BOTTOM:Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type; invoke-virtual {v2, v4}, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;->getAnchor(Landroidx/constraintlayout/solver/widgets/ConstraintAnchor$Type;)Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; move-result-object v2 invoke-virtual {v0, v2}, Landroidx/constraintlayout/solver/LinearSystem;->createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v10 invoke-virtual/range {p0 .. p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v2 move/from16 v4, p3 float-to-double v13, v4 invoke-static {v13, v14}, Ljava/lang/Math;->sin(D)D move-result-wide v15 move/from16 v4, p4 move-object/from16 v17, v3 int-to-double v3, v4 invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z move-object/from16 p1, v12 mul-double v11, v15, v3 double-to-float v11, v11 move-object v6, v2 invoke-virtual/range {v6 .. v11}, Landroidx/constraintlayout/solver/ArrayRow;->createRowWithAngle(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;F)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {v0, v2}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V invoke-virtual/range {p0 .. p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v2 invoke-static {v13, v14}, Ljava/lang/Math;->cos(D)D move-result-wide v6 invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z mul-double v6, v6, v3 double-to-float v9, v6 move-object v4, v2 move-object/from16 v6, v17 move-object v7, v1 move-object/from16 v8, p1 invoke-virtual/range {v4 .. v9}, Landroidx/constraintlayout/solver/ArrayRow;->createRowWithAngle(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;F)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {v0, v2}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addCentering(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IFLandroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;II)V .locals 11 move-object v0, p0 move/from16 v1, p8 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v10 move-object v2, v10 move-object v3, p1 move-object v4, p2 move v5, p3 move v6, p4 move-object/from16 v7, p5 move-object/from16 v8, p6 move/from16 v9, p7 invoke-virtual/range {v2 .. v9}, Landroidx/constraintlayout/solver/ArrayRow;->createRowCentering(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;IFLandroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; const/4 v2, 0x6 if-eq v1, v2, :cond_0 invoke-virtual {v10, p0, v1}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; :cond_0 invoke-virtual {p0, v10}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V .locals 7 if-nez p1, :cond_0 return-void :cond_0 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; const-wide/16 v1, 0x1 if-eqz v0, :cond_1 iget-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->constraints:J add-long/2addr v3, v1 iput-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->constraints:J iget-boolean v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-eqz v0, :cond_1 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; iget-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->simpleconstraints:J add-long/2addr v3, v1 iput-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->simpleconstraints:J :cond_1 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I const/4 v3, 0x1 add-int/2addr v0, v3 iget v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxRows:I if-ge v0, v4, :cond_2 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/2addr v0, v3 iget v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v0, v4, :cond_3 :cond_2 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_3 const/4 v0, 0x0 iget-boolean v4, p1, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-nez v4, :cond_a invoke-direct {p0, p1}, Landroidx/constraintlayout/solver/LinearSystem;->updateRowFromVariables(Landroidx/constraintlayout/solver/ArrayRow;)V invoke-virtual {p1}, Landroidx/constraintlayout/solver/ArrayRow;->isEmpty()Z move-result v4 if-eqz v4, :cond_4 return-void :cond_4 invoke-virtual {p1}, Landroidx/constraintlayout/solver/ArrayRow;->ensurePositiveConstant()V invoke-virtual {p1, p0}, Landroidx/constraintlayout/solver/ArrayRow;->chooseSubject(Landroidx/constraintlayout/solver/LinearSystem;)Z move-result v4 if-eqz v4, :cond_9 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createExtraVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 iput-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; invoke-direct {p0, p1}, Landroidx/constraintlayout/solver/LinearSystem;->addRow(Landroidx/constraintlayout/solver/ArrayRow;)V iget-object v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mTempGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-interface {v4, p1}, Landroidx/constraintlayout/solver/LinearSystem$Row;->initFromRow(Landroidx/constraintlayout/solver/LinearSystem$Row;)V iget-object v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mTempGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-direct {p0, v4, v3}, Landroidx/constraintlayout/solver/LinearSystem;->optimize(Landroidx/constraintlayout/solver/LinearSystem$Row;Z)I iget v4, v0, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 v5, -0x1 if-ne v4, v5, :cond_8 iget-object v4, p1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; if-ne v4, v0, :cond_6 invoke-virtual {p1, v0}, Landroidx/constraintlayout/solver/ArrayRow;->pickPivot(Landroidx/constraintlayout/solver/SolverVariable;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 if-eqz v0, :cond_6 sget-object v4, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v4, :cond_5 iget-wide v5, v4, Landroidx/constraintlayout/solver/Metrics;->pivots:J add-long/2addr v5, v1 iput-wide v5, v4, Landroidx/constraintlayout/solver/Metrics;->pivots:J :cond_5 invoke-virtual {p1, v0}, Landroidx/constraintlayout/solver/ArrayRow;->pivot(Landroidx/constraintlayout/solver/SolverVariable;)V :cond_6 iget-boolean v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-nez v0, :cond_7 iget-object v0, p1, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; invoke-virtual {v0, p1}, Landroidx/constraintlayout/solver/SolverVariable;->updateReferencesWithNewDefinition(Landroidx/constraintlayout/solver/ArrayRow;)V :cond_7 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I sub-int/2addr v0, v3 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I :cond_8 const/4 v0, 0x1 :cond_9 invoke-virtual {p1}, Landroidx/constraintlayout/solver/ArrayRow;->hasKeyVariable()Z move-result v1 if-nez v1, :cond_a return-void :cond_a if-nez v0, :cond_b invoke-direct {p0, p1}, Landroidx/constraintlayout/solver/LinearSystem;->addRow(Landroidx/constraintlayout/solver/ArrayRow;)V :cond_b return-void .end method .method public addEquality(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;II)Landroidx/constraintlayout/solver/ArrayRow; .locals 1 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowEquals(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; const/4 p1, 0x6 if-eq p4, p1, :cond_0 invoke-virtual {v0, p0, p4}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; :cond_0 invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-object v0 .end method .method public addEquality(Landroidx/constraintlayout/solver/SolverVariable;I)V .locals 3 iget v0, p1, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I iget v1, p1, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 v2, -0x1 if-eq v1, v2, :cond_2 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v0, v1, v0 iget-boolean v1, v0, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-eqz v1, :cond_0 int-to-float p1, p2 iput p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F return-void :cond_0 iget-object v1, v0, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; iget v1, v1, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->currentSize:I if-nez v1, :cond_1 const/4 p1, 0x1 iput-boolean p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z int-to-float p1, p2 iput p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F return-void :cond_1 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowEquals(Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void :cond_2 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowDefinition(Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addEquality(Landroidx/constraintlayout/solver/SolverVariable;II)V .locals 3 iget v0, p1, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I iget v1, p1, Landroidx/constraintlayout/solver/SolverVariable;->definitionId:I const/4 v2, -0x1 if-eq v1, v2, :cond_1 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v0, v1, v0 iget-boolean v1, v0, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-eqz v1, :cond_0 int-to-float p1, p2 iput p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->constantValue:F return-void :cond_0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowEquals(Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {v0, p0, p3}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void :cond_1 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {v0, p1, p2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowDefinition(Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {v0, p0, p3}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addGreaterBarrier(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Z)V .locals 3 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 const/4 v2, 0x0 iput v2, v1, Landroidx/constraintlayout/solver/SolverVariable;->strength:I invoke-virtual {v0, p1, p2, v1, v2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p3, :cond_0 iget-object p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v1}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 const/4 p2, 0x1 invoke-virtual {p0, v0, p1, p2}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V :cond_0 invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;I)V .locals 3 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 const/4 v2, 0x0 iput v2, v1, Landroidx/constraintlayout/solver/SolverVariable;->strength:I invoke-virtual {v0, p1, p2, v1}, Landroidx/constraintlayout/solver/ArrayRow;->createRowGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;ILandroidx/constraintlayout/solver/SolverVariable;)Landroidx/constraintlayout/solver/ArrayRow; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;II)V .locals 3 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 const/4 v2, 0x0 iput v2, v1, Landroidx/constraintlayout/solver/SolverVariable;->strength:I invoke-virtual {v0, p1, p2, v1, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowGreaterThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; const/4 p1, 0x6 if-eq p4, p1, :cond_0 iget-object p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v1}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 invoke-virtual {p0, v0, p1, p4}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V :cond_0 invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addLowerBarrier(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Z)V .locals 3 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 const/4 v2, 0x0 iput v2, v1, Landroidx/constraintlayout/solver/SolverVariable;->strength:I invoke-virtual {v0, p1, p2, v1, v2}, Landroidx/constraintlayout/solver/ArrayRow;->createRowLowerThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; if-eqz p3, :cond_0 iget-object p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v1}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 const/4 p2, 0x1 invoke-virtual {p0, v0, p1, p2}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V :cond_0 invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addLowerThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;II)V .locals 3 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v0 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v1 const/4 v2, 0x0 iput v2, v1, Landroidx/constraintlayout/solver/SolverVariable;->strength:I invoke-virtual {v0, p1, p2, v1, p3}, Landroidx/constraintlayout/solver/ArrayRow;->createRowLowerThan(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; const/4 p1, 0x6 if-eq p4, p1, :cond_0 iget-object p1, v0, Landroidx/constraintlayout/solver/ArrayRow;->variables:Landroidx/constraintlayout/solver/ArrayLinkedVariables; invoke-virtual {p1, v1}, Landroidx/constraintlayout/solver/ArrayLinkedVariables;->get(Landroidx/constraintlayout/solver/SolverVariable;)F move-result p1 const/high16 p2, -0x40800000 # -1.0f mul-float p1, p1, p2 float-to-int p1, p1 invoke-virtual {p0, v0, p1, p4}, Landroidx/constraintlayout/solver/LinearSystem;->addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V :cond_0 invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method public addRatio(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;FI)V .locals 7 invoke-virtual {p0}, Landroidx/constraintlayout/solver/LinearSystem;->createRow()Landroidx/constraintlayout/solver/ArrayRow; move-result-object v6 move-object v0, v6 move-object v1, p1 move-object v2, p2 move-object v3, p3 move-object v4, p4 move v5, p5 invoke-virtual/range {v0 .. v5}, Landroidx/constraintlayout/solver/ArrayRow;->createRowDimensionRatio(Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;F)Landroidx/constraintlayout/solver/ArrayRow; const/4 p1, 0x6 if-eq p6, p1, :cond_0 invoke-virtual {v6, p0, p6}, Landroidx/constraintlayout/solver/ArrayRow;->addError(Landroidx/constraintlayout/solver/LinearSystem;I)Landroidx/constraintlayout/solver/ArrayRow; :cond_0 invoke-virtual {p0, v6}, Landroidx/constraintlayout/solver/LinearSystem;->addConstraint(Landroidx/constraintlayout/solver/ArrayRow;)V return-void .end method .method addSingleError(Landroidx/constraintlayout/solver/ArrayRow;II)V .locals 1 const/4 v0, 0x0 invoke-virtual {p0, p3, v0}, Landroidx/constraintlayout/solver/LinearSystem;->createErrorVariable(ILjava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object p3 invoke-virtual {p1, p3, p2}, Landroidx/constraintlayout/solver/ArrayRow;->addSingleError(Landroidx/constraintlayout/solver/SolverVariable;I)Landroidx/constraintlayout/solver/ArrayRow; return-void .end method .method public createErrorVariable(ILjava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; .locals 5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->errors:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->errors:J :cond_0 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v0, v1, :cond_1 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_1 sget-object v0, Landroidx/constraintlayout/solver/SolverVariable$Type;->ERROR:Landroidx/constraintlayout/solver/SolverVariable$Type; invoke-direct {p0, v0, p2}, Landroidx/constraintlayout/solver/LinearSystem;->acquireSolverVariable(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object p2 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iput v0, p2, Landroidx/constraintlayout/solver/SolverVariable;->id:I iput p1, p2, Landroidx/constraintlayout/solver/SolverVariable;->strength:I iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object p1, p1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I aput-object p2, p1, v0 iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-interface {p1, p2}, Landroidx/constraintlayout/solver/LinearSystem$Row;->addError(Landroidx/constraintlayout/solver/SolverVariable;)V return-object p2 .end method .method public createExtraVariable()Landroidx/constraintlayout/solver/SolverVariable; .locals 5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->extravariables:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->extravariables:J :cond_0 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v0, v1, :cond_1 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_1 sget-object v0, Landroidx/constraintlayout/solver/SolverVariable$Type;->SLACK:Landroidx/constraintlayout/solver/SolverVariable$Type; const/4 v1, 0x0 invoke-direct {p0, v0, v1}, Landroidx/constraintlayout/solver/LinearSystem;->acquireSolverVariable(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iput v1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v1, v1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I aput-object v0, v1, v2 return-object v0 .end method .method public createObjectVariable(Ljava/lang/Object;)Landroidx/constraintlayout/solver/SolverVariable; .locals 3 const/4 v0, 0x0 if-nez p1, :cond_0 return-object v0 :cond_0 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v1, v1, 0x1 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v1, v2, :cond_1 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_1 instance-of v1, p1, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; if-eqz v1, :cond_5 check-cast p1, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; invoke-virtual {p1}, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor;->getSolverVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 if-nez v0, :cond_2 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; invoke-virtual {p1, v0}, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor;->resetSolverVariable(Landroidx/constraintlayout/solver/Cache;)V invoke-virtual {p1}, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor;->getSolverVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object p1 move-object v0, p1 :cond_2 iget p1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I const/4 v1, -0x1 if-eq p1, v1, :cond_3 iget p1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I if-gt p1, v2, :cond_3 iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object p1, p1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v2, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I aget-object p1, p1, v2 if-nez p1, :cond_5 :cond_3 iget p1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I if-eq p1, v1, :cond_4 invoke-virtual {v0}, Landroidx/constraintlayout/solver/SolverVariable;->reset()V :cond_4 iget p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iget p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iput p1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I sget-object p1, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; iput-object p1, v0, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; iget-object p1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object p1, p1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I aput-object v0, p1, v1 :cond_5 return-object v0 .end method .method public createRow()Landroidx/constraintlayout/solver/ArrayRow; .locals 2 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v0, v0, Landroidx/constraintlayout/solver/Cache;->arrayRowPool:Landroidx/constraintlayout/solver/Pools$Pool; invoke-interface {v0}, Landroidx/constraintlayout/solver/Pools$Pool;->acquire()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/constraintlayout/solver/ArrayRow; if-nez v0, :cond_0 new-instance v0, Landroidx/constraintlayout/solver/ArrayRow; iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; invoke-direct {v0, v1}, Landroidx/constraintlayout/solver/ArrayRow;->(Landroidx/constraintlayout/solver/Cache;)V goto :goto_0 :cond_0 invoke-virtual {v0}, Landroidx/constraintlayout/solver/ArrayRow;->reset()V :goto_0 invoke-static {}, Landroidx/constraintlayout/solver/SolverVariable;->increaseErrorId()V return-object v0 .end method .method public createSlackVariable()Landroidx/constraintlayout/solver/SolverVariable; .locals 5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->slackvariables:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->slackvariables:J :cond_0 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v0, v0, 0x1 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I if-lt v0, v1, :cond_1 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->increaseTableSize()V :cond_1 sget-object v0, Landroidx/constraintlayout/solver/SolverVariable$Type;->SLACK:Landroidx/constraintlayout/solver/SolverVariable$Type; const/4 v1, 0x0 invoke-direct {p0, v0, v1}, Landroidx/constraintlayout/solver/LinearSystem;->acquireSolverVariable(Landroidx/constraintlayout/solver/SolverVariable$Type;Ljava/lang/String;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I iget v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iput v1, v0, Landroidx/constraintlayout/solver/SolverVariable;->id:I iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v1, v1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I aput-object v0, v1, v2 return-object v0 .end method .method displayReadableRows()V .locals 3 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->displaySolverVariables()V const-string v0, " # " const/4 v1, 0x0 :goto_0 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v1, v2, :cond_0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v0, v0, v1 invoke-virtual {v0}, Landroidx/constraintlayout/solver/ArrayRow;->toReadableString()Ljava/lang/String; move-result-object v0 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v0, "\n # " invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_0 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; if-eqz v1, :cond_1 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string v0, "\n" invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 :cond_1 sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream; invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method .method displaySystemInformations()V .locals 6 const/4 v0, 0x0 const/4 v1, 0x0 const/4 v2, 0x0 :goto_0 iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I if-ge v1, v3, :cond_1 iget-object v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v4, v3, v1 if-eqz v4, :cond_0 aget-object v3, v3, v1 invoke-virtual {v3}, Landroidx/constraintlayout/solver/ArrayRow;->sizeInBytes()I move-result v3 add-int/2addr v2, v3 :cond_0 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_1 const/4 v1, 0x0 const/4 v3, 0x0 :goto_1 iget v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v1, v4, :cond_3 iget-object v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v5, v4, v1 if-eqz v5, :cond_2 aget-object v4, v4, v1 invoke-virtual {v4}, Landroidx/constraintlayout/solver/ArrayRow;->sizeInBytes()I move-result v4 add-int/2addr v3, v4 :cond_2 add-int/lit8 v1, v1, 0x1 goto :goto_1 :cond_3 sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream; new-instance v4, Ljava/lang/StringBuilder; const-string v5, "Linear System -> Table size: " invoke-direct {v4, v5}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget v5, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v5, " (" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v5, p0, Landroidx/constraintlayout/solver/LinearSystem;->TABLE_SIZE:I mul-int v5, v5, v5 invoke-direct {p0, v5}, Landroidx/constraintlayout/solver/LinearSystem;->getDisplaySize(I)Ljava/lang/String; move-result-object v5 invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v5, ") -- row sizes: " invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-direct {p0, v2}, Landroidx/constraintlayout/solver/LinearSystem;->getDisplaySize(I)Ljava/lang/String; move-result-object v2 invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v2, ", actual size: " invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-direct {p0, v3}, Landroidx/constraintlayout/solver/LinearSystem;->getDisplaySize(I)Ljava/lang/String; move-result-object v2 invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v2, " rows: " invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v2, "/" invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxRows:I invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v2, " cols: " invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v2, "/" invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mMaxColumns:I invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v2, " 0 occupied cells, " invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-direct {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->getDisplaySize(I)Ljava/lang/String; move-result-object v0 invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method .method public displayVariablesReadableRows()V .locals 4 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->displaySolverVariables()V const-string v0, "" const/4 v1, 0x0 :goto_0 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v1, v2, :cond_1 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v2, v2, v1 iget-object v2, v2, Landroidx/constraintlayout/solver/ArrayRow;->variable:Landroidx/constraintlayout/solver/SolverVariable; iget-object v2, v2, Landroidx/constraintlayout/solver/SolverVariable;->mType:Landroidx/constraintlayout/solver/SolverVariable$Type; sget-object v3, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; if-ne v2, v3, :cond_0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v0, v0, v1 invoke-virtual {v0}, Landroidx/constraintlayout/solver/ArrayRow;->toReadableString()Ljava/lang/String; move-result-object v0 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v0, "\n" invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 :cond_0 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_1 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string v0, "\n" invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream; invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method .method public fillMetrics(Landroidx/constraintlayout/solver/Metrics;)V .locals 0 sput-object p1, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; return-void .end method .method public getCache()Landroidx/constraintlayout/solver/Cache; .locals 1 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; return-object v0 .end method .method getGoal()Landroidx/constraintlayout/solver/LinearSystem$Row; .locals 1 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; return-object v0 .end method .method public getMemoryUsed()I .locals 4 const/4 v0, 0x0 const/4 v1, 0x0 :goto_0 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v0, v2, :cond_1 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v3, v2, v0 if-eqz v3, :cond_0 aget-object v2, v2, v0 invoke-virtual {v2}, Landroidx/constraintlayout/solver/ArrayRow;->sizeInBytes()I move-result v2 add-int/2addr v1, v2 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 return v1 .end method .method public getNumEquations()I .locals 1 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I return v0 .end method .method public getNumVariables()I .locals 1 iget v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I return v0 .end method .method public getObjectVariableValue(Ljava/lang/Object;)I .locals 1 check-cast p1, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor; invoke-virtual {p1}, Landroidx/constraintlayout/solver/widgets/ConstraintAnchor;->getSolverVariable()Landroidx/constraintlayout/solver/SolverVariable; move-result-object p1 if-eqz p1, :cond_0 iget p1, p1, Landroidx/constraintlayout/solver/SolverVariable;->computedValue:F const/high16 v0, 0x3f000000 # 0.5f add-float/2addr p1, v0 float-to-int p1, p1 return p1 :cond_0 const/4 p1, 0x0 return p1 .end method .method getRow(I)Landroidx/constraintlayout/solver/ArrayRow; .locals 1 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object p1, v0, p1 return-object p1 .end method .method getValueFor(Ljava/lang/String;)F .locals 1 sget-object v0, Landroidx/constraintlayout/solver/SolverVariable$Type;->UNRESTRICTED:Landroidx/constraintlayout/solver/SolverVariable$Type; invoke-virtual {p0, p1, v0}, Landroidx/constraintlayout/solver/LinearSystem;->getVariable(Ljava/lang/String;Landroidx/constraintlayout/solver/SolverVariable$Type;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object p1 if-nez p1, :cond_0 const/4 p1, 0x0 return p1 :cond_0 iget p1, p1, Landroidx/constraintlayout/solver/SolverVariable;->computedValue:F return p1 .end method .method getVariable(Ljava/lang/String;Landroidx/constraintlayout/solver/SolverVariable$Type;)Landroidx/constraintlayout/solver/SolverVariable; .locals 1 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; if-nez v0, :cond_0 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; :cond_0 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/constraintlayout/solver/SolverVariable; if-nez v0, :cond_1 invoke-direct {p0, p1, p2}, Landroidx/constraintlayout/solver/LinearSystem;->createVariable(Ljava/lang/String;Landroidx/constraintlayout/solver/SolverVariable$Type;)Landroidx/constraintlayout/solver/SolverVariable; move-result-object v0 :cond_1 return-object v0 .end method .method public minimize()V .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/Exception; } .end annotation sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; const-wide/16 v1, 0x1 if-eqz v0, :cond_0 iget-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->minimize:J add-long/2addr v3, v1 iput-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->minimize:J :cond_0 iget-boolean v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->graphOptimizer:Z if-eqz v0, :cond_5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_1 iget-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->graphOptimizer:J add-long/2addr v3, v1 iput-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->graphOptimizer:J :cond_1 const/4 v0, 0x0 const/4 v3, 0x0 :goto_0 iget v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v3, v4, :cond_3 iget-object v4, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v4, v4, v3 iget-boolean v4, v4, Landroidx/constraintlayout/solver/ArrayRow;->isSimpleDefinition:Z if-nez v4, :cond_2 goto :goto_1 :cond_2 add-int/lit8 v3, v3, 0x1 goto :goto_0 :cond_3 const/4 v0, 0x1 :goto_1 if-eqz v0, :cond_5 sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_4 iget-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->fullySolved:J add-long/2addr v3, v1 iput-wide v3, v0, Landroidx/constraintlayout/solver/Metrics;->fullySolved:J :cond_4 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->computeValues()V return-void :cond_5 iget-object v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-virtual {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->minimizeGoal(Landroidx/constraintlayout/solver/LinearSystem$Row;)V return-void .end method .method minimizeGoal(Landroidx/constraintlayout/solver/LinearSystem$Row;)V .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/Exception; } .end annotation sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; if-eqz v0, :cond_0 iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->minimizeGoal:J const-wide/16 v3, 0x1 add-long/2addr v1, v3 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->minimizeGoal:J sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxVariables:J iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I int-to-long v3, v3 invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(JJ)J move-result-wide v1 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxVariables:J sget-object v0, Landroidx/constraintlayout/solver/LinearSystem;->sMetrics:Landroidx/constraintlayout/solver/Metrics; iget-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxRows:J iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I int-to-long v3, v3 invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(JJ)J move-result-wide v1 iput-wide v1, v0, Landroidx/constraintlayout/solver/Metrics;->maxRows:J :cond_0 move-object v0, p1 check-cast v0, Landroidx/constraintlayout/solver/ArrayRow; invoke-direct {p0, v0}, Landroidx/constraintlayout/solver/LinearSystem;->updateRowFromVariables(Landroidx/constraintlayout/solver/ArrayRow;)V invoke-direct {p0, p1}, Landroidx/constraintlayout/solver/LinearSystem;->enforceBFS(Landroidx/constraintlayout/solver/LinearSystem$Row;)I const/4 v0, 0x0 invoke-direct {p0, p1, v0}, Landroidx/constraintlayout/solver/LinearSystem;->optimize(Landroidx/constraintlayout/solver/LinearSystem$Row;Z)I invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->computeValues()V return-void .end method .method public reset()V .locals 4 const/4 v0, 0x0 const/4 v1, 0x0 :goto_0 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v2, v2, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; array-length v2, v2 if-ge v1, v2, :cond_1 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v2, v2, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; aget-object v2, v2, v1 if-eqz v2, :cond_0 invoke-virtual {v2}, Landroidx/constraintlayout/solver/SolverVariable;->reset()V :cond_0 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_1 iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v1, v1, Landroidx/constraintlayout/solver/Cache;->solverVariablePool:Landroidx/constraintlayout/solver/Pools$Pool; iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariables:[Landroidx/constraintlayout/solver/SolverVariable; iget v3, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I invoke-interface {v1, v2, v3}, Landroidx/constraintlayout/solver/Pools$Pool;->releaseAll([Ljava/lang/Object;I)V iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mPoolVariablesCount:I iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mCache:Landroidx/constraintlayout/solver/Cache; iget-object v1, v1, Landroidx/constraintlayout/solver/Cache;->mIndexedVariables:[Landroidx/constraintlayout/solver/SolverVariable; const/4 v2, 0x0 invoke-static {v1, v2}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariables:Ljava/util/HashMap; if-eqz v1, :cond_2 invoke-virtual {v1}, Ljava/util/HashMap;->clear()V :cond_2 iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mVariablesID:I iget-object v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mGoal:Landroidx/constraintlayout/solver/LinearSystem$Row; invoke-interface {v1}, Landroidx/constraintlayout/solver/LinearSystem$Row;->clear()V const/4 v1, 0x1 iput v1, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumColumns:I const/4 v1, 0x0 :goto_1 iget v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I if-ge v1, v2, :cond_3 iget-object v2, p0, Landroidx/constraintlayout/solver/LinearSystem;->mRows:[Landroidx/constraintlayout/solver/ArrayRow; aget-object v2, v2, v1 iput-boolean v0, v2, Landroidx/constraintlayout/solver/ArrayRow;->used:Z add-int/lit8 v1, v1, 0x1 goto :goto_1 :cond_3 invoke-direct {p0}, Landroidx/constraintlayout/solver/LinearSystem;->releaseRows()V iput v0, p0, Landroidx/constraintlayout/solver/LinearSystem;->mNumRows:I return-void .end method