public class ArrayRow
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ArrayRow.ArrayRowVariables |
| Modifier and Type | Field and Description |
|---|---|
ArrayRow.ArrayRowVariables |
variables |
| Modifier and Type | Method and Description |
|---|---|
ArrayRow |
addError(LinearSystem system,
int strength) |
void |
addError(SolverVariable error) |
void |
clear() |
ArrayRow |
createRowDimensionRatio(SolverVariable variableA,
SolverVariable variableB,
SolverVariable variableC,
SolverVariable variableD,
float ratio)
Create a constraint to express
A = B + (C - D) * ratio
We use this for ratio, where for example Right = Left + (Bottom - Top) * percent |
ArrayRow |
createRowEqualDimension(float currentWeight,
float totalWeights,
float nextWeight,
SolverVariable variableStartA,
int marginStartA,
SolverVariable variableEndA,
int marginEndA,
SolverVariable variableStartB,
int marginStartB,
SolverVariable variableEndB,
int marginEndB) |
ArrayRow |
createRowEqualMatchDimensions(float currentWeight,
float totalWeights,
float nextWeight,
SolverVariable variableStartA,
SolverVariable variableEndA,
SolverVariable variableStartB,
SolverVariable variableEndB) |
ArrayRow |
createRowEquals(SolverVariable variable,
int value) |
ArrayRow |
createRowEquals(SolverVariable variableA,
SolverVariable variableB,
int margin) |
ArrayRow |
createRowGreaterThan(SolverVariable a,
int b,
SolverVariable slack) |
ArrayRow |
createRowGreaterThan(SolverVariable variableA,
SolverVariable variableB,
SolverVariable slack,
int margin) |
ArrayRow |
createRowLowerThan(SolverVariable variableA,
SolverVariable variableB,
SolverVariable slack,
int margin) |
ArrayRow |
createRowWithAngle(SolverVariable at,
SolverVariable ab,
SolverVariable bt,
SolverVariable bb,
float angleComponent)
Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle
|
SolverVariable |
getKey() |
SolverVariable |
getPivotCandidate(LinearSystem system,
boolean[] avoid) |
void |
initFromRow(androidx.constraintlayout.core.LinearSystem.Row row)
Used to initiate a goal from a given row (to see if we can remove an extra var)
|
boolean |
isEmpty() |
SolverVariable |
pickPivot(SolverVariable exclude) |
void |
reset() |
java.lang.String |
toString() |
void |
updateFromFinalVariable(LinearSystem system,
SolverVariable variable,
boolean removeFromDefinition) |
void |
updateFromRow(LinearSystem system,
ArrayRow definition,
boolean removeFromDefinition) |
void |
updateFromSynonymVariable(LinearSystem system,
SolverVariable variable,
boolean removeFromDefinition) |
void |
updateFromSystem(LinearSystem system) |
public ArrayRow.ArrayRowVariables variables
public ArrayRow()
public ArrayRow(Cache cache)
public java.lang.String toString()
toString in class java.lang.Objectpublic void reset()
public ArrayRow createRowEquals(SolverVariable variable, int value)
public ArrayRow createRowEquals(SolverVariable variableA, SolverVariable variableB, int margin)
public ArrayRow createRowGreaterThan(SolverVariable variableA, SolverVariable variableB, SolverVariable slack, int margin)
public ArrayRow createRowGreaterThan(SolverVariable a, int b, SolverVariable slack)
public ArrayRow createRowLowerThan(SolverVariable variableA, SolverVariable variableB, SolverVariable slack, int margin)
public ArrayRow createRowEqualMatchDimensions(float currentWeight, float totalWeights, float nextWeight, SolverVariable variableStartA, SolverVariable variableEndA, SolverVariable variableStartB, SolverVariable variableEndB)
public ArrayRow createRowEqualDimension(float currentWeight, float totalWeights, float nextWeight, SolverVariable variableStartA, int marginStartA, SolverVariable variableEndA, int marginEndA, SolverVariable variableStartB, int marginStartB, SolverVariable variableEndB, int marginEndB)
public ArrayRow addError(LinearSystem system, int strength)
public ArrayRow createRowDimensionRatio(SolverVariable variableA, SolverVariable variableB, SolverVariable variableC, SolverVariable variableD, float ratio)
A = B + (C - D) * ratio
We use this for ratio, where for example Right = Left + (Bottom - Top) * percentvariableA - variable AvariableB - variable BvariableC - variable CvariableD - variable Dratio - ratio between AB and CDpublic ArrayRow createRowWithAngle(SolverVariable at, SolverVariable ab, SolverVariable bt, SolverVariable bb, float angleComponent)
at - ab - bt - bb - angleComponent - public boolean isEmpty()
public void updateFromRow(LinearSystem system, ArrayRow definition, boolean removeFromDefinition)
public void updateFromFinalVariable(LinearSystem system, SolverVariable variable, boolean removeFromDefinition)
public void updateFromSynonymVariable(LinearSystem system, SolverVariable variable, boolean removeFromDefinition)
public SolverVariable pickPivot(SolverVariable exclude)
public SolverVariable getPivotCandidate(LinearSystem system, boolean[] avoid)
public void clear()
public void initFromRow(androidx.constraintlayout.core.LinearSystem.Row row)
row - public void addError(SolverVariable error)
public SolverVariable getKey()
public void updateFromSystem(LinearSystem system)