|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.aa.Solution
public class Solution
Encapsulates a set of name-value pairs in a Hashtable as a solution satisfying an equation system.
Constructor Summary | |
---|---|
Solution()
Creates a new Solution |
Method Summary | |
---|---|
void |
addSolution(java.lang.String name,
java.lang.Object value)
Adds a name-value pair to the set. |
void |
append(Solution sol)
Appends the variable-value pairs of the solution |
boolean |
equals(java.lang.Object o,
double tolFactor)
Returns true if all values are equal within the specified tolerance, false otherwise. |
java.lang.Object |
getValue(java.lang.String name)
|
java.util.Enumeration |
getValues()
|
java.util.Enumeration |
getVariableNames()
|
java.lang.String |
toString()
Returns a string listing the name-value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Solution()
Method Detail |
---|
public void addSolution(java.lang.String name, java.lang.Object value)
public java.util.Enumeration getVariableNames()
public java.util.Enumeration getValues()
public java.lang.Object getValue(java.lang.String name)
name
- The name of the variable.
name,
nullif the variable does not exist.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o, double tolFactor)
o
- The object to be compared to.tolFactor
- The tolerance factor, which is used according to
v_other*(1-tolFactor) < v_this < v_other*(1+tolFactor)
where v_other is the value of a variable from
o, and v_this is the value of the same variable from this object.
public void append(Solution sol) throws java.lang.IllegalArgumentException
solto this solution.
sol
- the solution to be appended.
java.lang.IllegalArgumentException
- if a variable name to be appended already exists
in this solution.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |