|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cmu.relativelayout.matrix.RelativeMatrix
public class RelativeMatrix
A matrix class that solves Equations for Variables.
| Constructor Summary | |
|---|---|
RelativeMatrix()
Constructor for RelativeMatrix. |
|
| Method Summary | |
|---|---|
void |
addEquation(Variable variable,
Equation equation)
Adds the given Equation to the matrix with the given Variable as its primary variable. |
static boolean |
isDebugMode()
Returns true if RelativeMatrix is currently in debugging mode. |
void |
removeEquation(Variable variable)
Removes the Equation whose primary Variable is the given variable from the matrix. |
static void |
setDebugMode(boolean isDebugging)
Sets whether RelativeMatrix is in debugging mode. |
Map<Variable,Double> |
solve()
Solves this matrix and returns a map containing keys for every variable that has been added to the matrix whose values are the solutions for those variables. |
String |
toString()
Returns a string representation of the matrix. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RelativeMatrix()
| Method Detail |
|---|
public static boolean isDebugMode()
true if RelativeMatrix is currently in debugging mode. See
setDebugMode(boolean) for more information on debugging mode.
public static void setDebugMode(boolean isDebugging)
InvalidBindingException,
InconsistentConstraintException, or UnknownComponentException that is raised while solving the
matrix will point back to the exact line of code where the offending Binding was added to the matrix,
making debugging much easier.
public void addEquation(Variable variable,
Equation equation)
Equation to the matrix with the given Variable as its primary variable. See
Binding#usesDimensionalVariable(boolean) for information on primary variables.
public void removeEquation(Variable variable)
Equation whose primary Variable is the given variable from the matrix.
public Map<Variable,Double> solve()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||