Hi,
I'm new to cassowary and I'm trying to get my head around the basics. I think I now understand what a stay variable is after reading this constructor:
public ClEditOrStayConstraint(ClVariable var, ClStrength strength, double weight) {
super(strength, weight);
_variable = var;
_expression = new ClLinearExpression(_variable, -1.0, _variable.getValue());
}
If I understand correctly it's an expression that sets a variable to its own initial value.
An expression that sets a variable to a value is obviously useful. I don't understand the point of setting a variable to it's own initial value though. It just confuses newbies like me. Why not just have an expression that sets a variable to a value? Then nobody would ever need to explain the concept of stays.
In the java implementation at least, if I want to change the value of the stay variable. I need to re-add it to the solver.
Any comments. Have I misunderstood?
Thanks,
Alex