|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--Opus5.AbstractObject
|
+--Opus5.ScalesBalancingProblem.Node
A node in the solution space of a scales balancing problem.
| Field Summary | |
protected int |
diff
The current weight difference between the pans. |
protected int |
numberPlaced
The number of weights placed into pans. |
protected int[] |
pan
The pans in which the weights have been placed. |
protected int |
unplacedTotal
The current total weight of all unplaced weights. |
| Fields inherited from interface Opus5.Solution |
copyright |
| Constructor Summary | |
ScalesBalancingProblem.Node()
Constructs the root node in the solution space of a this scales balancing problem. |
|
ScalesBalancingProblem.Node(ScalesBalancingProblem.Node node)
Copy constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
Clones this object. |
protected int |
compareTo(Comparable arg)
Compares this node in the solution space with the specified comparable object. |
int |
getBound()
Returns a lower bound on the objective function for this node and all possible descendants of this node in the solution space. |
int |
getObjective()
Returns the value of the objective function for this node. |
Enumeration |
getSuccessors()
Returns a enumeration that enumerates all the successors of this node in the solution space. |
boolean |
isComplete()
Tests if this node is a complete solution. |
boolean |
isFeasible()
Tests if this node is a feasible solution. |
void |
placeNext(int p)
Places the next unplaced weight in the specified pan. |
java.lang.String |
toString()
Returns a string representation of this node. |
| Methods inherited from class Opus5.AbstractObject |
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Opus5.Comparable |
compare, isEQ, isGE, isGT, isLE, isLT, isNE |
| Field Detail |
protected int diff
protected int unplacedTotal
protected int numberPlaced
protected int[] pan
| Constructor Detail |
public ScalesBalancingProblem.Node()
public ScalesBalancingProblem.Node(ScalesBalancingProblem.Node node)
node - The given node.| Method Detail |
public java.lang.Object clone()
clone in class java.lang.Objectpublic int getObjective()
getObjective in interface Solutionpublic int getBound()
getBound in interface Solutionpublic boolean isFeasible()
isFeasible in interface Solutionpublic boolean isComplete()
isComplete in interface Solutionpublic void placeNext(int p)
p - The pan into which the next weight is placed.public java.lang.String toString()
toString in class java.lang.Objectpublic Enumeration getSuccessors()
getSuccessors in interface SolutionEnumerationprotected int compareTo(Comparable arg)
compareTo in class AbstractObjectMethodNotImplemented - Always.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||