public class SolverVariable extends java.lang.Object implements java.lang.Comparable<SolverVariable>
linear expression solver.| Modifier and Type | Class and Description |
|---|---|
static class |
SolverVariable.Type
Type of variables
|
| Modifier and Type | Field and Description |
|---|---|
float |
computedValue |
int |
id |
boolean |
inGoal |
boolean |
isFinalValue |
int |
strength |
static int |
STRENGTH_BARRIER |
static int |
STRENGTH_CENTERING |
static int |
STRENGTH_EQUALITY |
static int |
STRENGTH_FIXED |
static int |
STRENGTH_HIGH |
static int |
STRENGTH_HIGHEST |
static int |
STRENGTH_LOW |
static int |
STRENGTH_MEDIUM |
static int |
STRENGTH_NONE |
int |
usageInRowCount |
| Constructor and Description |
|---|
SolverVariable(SolverVariable.Type type,
java.lang.String prefix) |
SolverVariable(java.lang.String name,
SolverVariable.Type type)
Base constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToRow(ArrayRow row) |
int |
compareTo(SolverVariable v) |
java.lang.String |
getName()
Accessor for the name
|
void |
removeFromRow(ArrayRow row) |
void |
reset() |
void |
setFinalValue(LinearSystem system,
float value) |
void |
setName(java.lang.String name) |
void |
setSynonym(LinearSystem system,
SolverVariable synonymVariable,
float value) |
void |
setType(SolverVariable.Type type,
java.lang.String prefix) |
java.lang.String |
toString()
Override the toString() method to display the variable
|
void |
updateReferencesWithNewDefinition(LinearSystem system,
ArrayRow definition) |
public static final int STRENGTH_NONE
public static final int STRENGTH_LOW
public static final int STRENGTH_MEDIUM
public static final int STRENGTH_HIGH
public static final int STRENGTH_HIGHEST
public static final int STRENGTH_EQUALITY
public static final int STRENGTH_BARRIER
public static final int STRENGTH_CENTERING
public static final int STRENGTH_FIXED
public boolean inGoal
public int id
public int strength
public float computedValue
public boolean isFinalValue
public int usageInRowCount
public SolverVariable(java.lang.String name,
SolverVariable.Type type)
name - the variable nametype - the type of the variablepublic SolverVariable(SolverVariable.Type type, java.lang.String prefix)
public final void addToRow(ArrayRow row)
public final void removeFromRow(ArrayRow row)
public final void updateReferencesWithNewDefinition(LinearSystem system, ArrayRow definition)
public void setFinalValue(LinearSystem system, float value)
public void setSynonym(LinearSystem system, SolverVariable synonymVariable, float value)
public void reset()
public java.lang.String getName()
public void setName(java.lang.String name)
public void setType(SolverVariable.Type type, java.lang.String prefix)
public int compareTo(SolverVariable v)
compareTo in interface java.lang.Comparable<SolverVariable>public java.lang.String toString()
toString in class java.lang.Object