|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.aa.EquationSystem
public class EquationSystem
Represents an equation system with any number of equations.
Constructor Summary | |
---|---|
EquationSystem()
Creates a new EquationSystem. |
Method Summary | |
---|---|
void |
addEquation(Expression ex)
Adds an equation to the system of equations. |
void |
addEquation(java.lang.String eqStr)
Adds an equation to the system of equations. |
Expression |
getEquation(int i)
Returns the equation identified by the index i, |
int |
getNumEquations()
Returns the number of equations. |
java.lang.Object[] |
getValues(java.util.Hashtable variables)
Evaluates each of the equations in this equation system, and returns their results in as an array. |
java.util.Vector |
getVariables()
Returns a list of all variables in the equation system. |
EquationSystem |
removeSubset(int[] subset)
Removes a set of equations from this equation system, and returns them as a new EquationSystem. |
void |
simplify()
Simplifies each equation in the system. |
Solution |
solve()
Attempts to find a solution for the set of equations. |
void |
substitute(Solution sol)
|
java.lang.String |
toString()
Returns a String of the equation system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EquationSystem()
Method Detail |
---|
public void addEquation(java.lang.String eqStr) throws java.lang.Exception
java.lang.Exception
public void addEquation(Expression ex)
public Expression getEquation(int i)
nullif the index is out of bounds.
public int getNumEquations()
public Solution solve() throws java.lang.Exception
java.lang.Exception
public void simplify()
public java.util.Vector getVariables()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object[] getValues(java.util.Hashtable variables) throws java.lang.Exception
java.lang.Exception
public EquationSystem removeSubset(int[] subset)
Important: the variables list for this equation is not updated to reflect the changes caused by removing some of the equations.
subset
- the array of indexes of equations to be removed.
public void substitute(Solution sol)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |