public class SolverVariable implements Comparable


Represents a given variable used in the linear expression solver.

Summary

Nested types

Type of variables

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

Public fields

float
int
boolean
boolean
int
int

Public constructors

Base constructor

Public methods

final void
int
String

Accessor for the name

final void
void
void
setFinalValue(LinearSystem system, float value)
void
void
setSynonym(
    LinearSystem system,
    SolverVariable synonymVariable,
    float value
)
void
String

Override the toString() method to display the variable

final void
updateReferencesWithNewDefinition(
    LinearSystem system,
    ArrayRow definition
)

Constants

STRENGTH_BARRIER

Added in 1.1.0-alpha13
public static final int STRENGTH_BARRIER = 6

STRENGTH_CENTERING

Added in 1.1.0-alpha13
public static final int STRENGTH_CENTERING = 7

STRENGTH_EQUALITY

Added in 1.1.0-alpha13
public static final int STRENGTH_EQUALITY = 5

STRENGTH_FIXED

Added in 1.1.0-alpha13
public static final int STRENGTH_FIXED = 8

STRENGTH_HIGH

Added in 1.1.0-alpha13
public static final int STRENGTH_HIGH = 3

STRENGTH_HIGHEST

Added in 1.1.0-alpha13
public static final int STRENGTH_HIGHEST = 4

STRENGTH_LOW

Added in 1.1.0-alpha13
public static final int STRENGTH_LOW = 1

STRENGTH_MEDIUM

Added in 1.1.0-alpha13
public static final int STRENGTH_MEDIUM = 2

STRENGTH_NONE

Added in 1.1.0-alpha13
public static final int STRENGTH_NONE = 0

Public fields

computedValue

Added in 1.1.0-alpha13
public float computedValue

id

Added in 1.1.0-alpha13
public int id

inGoal

Added in 1.1.0-alpha13
public boolean inGoal

isFinalValue

Added in 1.1.0-alpha13
public boolean isFinalValue

strength

Added in 1.1.0-alpha13
public int strength

usageInRowCount

Added in 1.1.0-alpha13
public int usageInRowCount

Public constructors

SolverVariable

Added in 1.1.0-alpha13
public SolverVariable(String name, SolverVariable.Type type)

Base constructor

Parameters
String name

the variable name

SolverVariable.Type type

the type of the variable

SolverVariable

Added in 1.1.0-alpha13
public SolverVariable(SolverVariable.Type type, String prefix)

Public methods

addToRow

Added in 1.1.0-alpha13
public final void addToRow(ArrayRow row)

compareTo

Added in 1.1.0-alpha13
public int compareTo(SolverVariable v)

getName

Added in 1.1.0-alpha13
public String getName()

Accessor for the name

Returns
String

the name of the variable

removeFromRow

Added in 1.1.0-alpha13
public final void removeFromRow(ArrayRow row)

reset

Added in 1.1.0-alpha13
public void reset()

setFinalValue

Added in 1.1.0-alpha13
public void setFinalValue(LinearSystem system, float value)

setName

Added in 1.1.0-alpha13
public void setName(String name)

setSynonym

Added in 1.1.0-alpha13
public void setSynonym(
    LinearSystem system,
    SolverVariable synonymVariable,
    float value
)

setType

Added in 1.1.0-alpha13
public void setType(SolverVariable.Type type, String prefix)

toString

public String toString()

Override the toString() method to display the variable

updateReferencesWithNewDefinition

Added in 1.1.0-alpha13
public final void updateReferencesWithNewDefinition(
    LinearSystem system,
    ArrayRow definition
)