ArrayRow
class ArrayRow
GoalRow |
|
PriorityGoalRow |
Implements a row containing goals taking in account priorities. |
Summary
Nested types |
|---|
interface ArrayRow.ArrayRowVariables |
Public functions |
|
|---|---|
Unit |
addError(error: SolverVariable!) |
ArrayRow! |
addError(system: LinearSystem!, strength: Int) |
Unit |
clear() |
ArrayRow! |
createRowDimensionRatio(Create a constraint to express |
ArrayRow! |
createRowEqualDimension( |
ArrayRow! |
createRowEqualMatchDimensions( |
ArrayRow! |
createRowEquals(variable: SolverVariable!, value: Int) |
ArrayRow! |
createRowEquals( |
ArrayRow! |
createRowGreaterThan(a: SolverVariable!, b: Int, slack: SolverVariable!) |
ArrayRow! |
createRowGreaterThan( |
ArrayRow! |
createRowLowerThan( |
ArrayRow! |
createRowWithAngle(Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle |
SolverVariable! |
getKey() |
SolverVariable! |
getPivotCandidate(system: LinearSystem!, avoid: BooleanArray!) |
Unit |
initFromRow(row: LinearSystem.Row!)Used to initiate a goal from a given row (to see if we can remove an extra var) |
Boolean |
isEmpty() |
SolverVariable! |
pickPivot(exclude: SolverVariable!) |
Unit |
reset() |
String! |
toString() |
Unit |
updateFromFinalVariable( |
Unit |
updateFromRow( |
Unit |
updateFromSynonymVariable( |
Unit |
updateFromSystem(system: LinearSystem!) |
Public properties |
|
|---|---|
ArrayRow.ArrayRowVariables! |
Public constructors
Public functions
createRowDimensionRatio
fun createRowDimensionRatio(
variableA: SolverVariable!,
variableB: SolverVariable!,
variableC: SolverVariable!,
variableD: SolverVariable!,
ratio: Float
): ArrayRow!
Create a constraint to express A = B + (C - D) * ratio We use this for ratio, where for example Right = Left + (Bottom - Top) * percent
| Parameters | |
|---|---|
variableA: SolverVariable! |
variable A |
variableB: SolverVariable! |
variable B |
variableC: SolverVariable! |
variable C |
variableD: SolverVariable! |
variable D |
ratio: Float |
ratio between AB and CD |
| Returns | |
|---|---|
ArrayRow! |
the row |
createRowEqualDimension
fun createRowEqualDimension(
currentWeight: Float,
totalWeights: Float,
nextWeight: Float,
variableStartA: SolverVariable!,
marginStartA: Int,
variableEndA: SolverVariable!,
marginEndA: Int,
variableStartB: SolverVariable!,
marginStartB: Int,
variableEndB: SolverVariable!,
marginEndB: Int
): ArrayRow!
createRowEqualMatchDimensions
fun createRowEqualMatchDimensions(
currentWeight: Float,
totalWeights: Float,
nextWeight: Float,
variableStartA: SolverVariable!,
variableEndA: SolverVariable!,
variableStartB: SolverVariable!,
variableEndB: SolverVariable!
): ArrayRow!
createRowEquals
fun createRowEquals(variable: SolverVariable!, value: Int): ArrayRow!
createRowEquals
fun createRowEquals(
variableA: SolverVariable!,
variableB: SolverVariable!,
margin: Int
): ArrayRow!
createRowGreaterThan
fun createRowGreaterThan(a: SolverVariable!, b: Int, slack: SolverVariable!): ArrayRow!
createRowGreaterThan
fun createRowGreaterThan(
variableA: SolverVariable!,
variableB: SolverVariable!,
slack: SolverVariable!,
margin: Int
): ArrayRow!
createRowLowerThan
fun createRowLowerThan(
variableA: SolverVariable!,
variableB: SolverVariable!,
slack: SolverVariable!,
margin: Int
): ArrayRow!
createRowWithAngle
fun createRowWithAngle(
at: SolverVariable!,
ab: SolverVariable!,
bt: SolverVariable!,
bb: SolverVariable!,
angleComponent: Float
): ArrayRow!
Create a constraint to express At + (Ab-At)/2 = Bt + (Bb-Bt)/2 - angle
getPivotCandidate
fun getPivotCandidate(system: LinearSystem!, avoid: BooleanArray!): SolverVariable!
initFromRow
fun initFromRow(row: LinearSystem.Row!): Unit
Used to initiate a goal from a given row (to see if we can remove an extra var)
updateFromFinalVariable
fun updateFromFinalVariable(
system: LinearSystem!,
variable: SolverVariable!,
removeFromDefinition: Boolean
): Unit
updateFromRow
fun updateFromRow(
system: LinearSystem!,
definition: ArrayRow!,
removeFromDefinition: Boolean
): Unit
updateFromSynonymVariable
fun updateFromSynonymVariable(
system: LinearSystem!,
variable: SolverVariable!,
removeFromDefinition: Boolean
): Unit