nenok.constr.vvll
Class VariableContainerHeap
java.lang.Object
nenok.constr.vvll.VariableContainer
nenok.constr.vvll.VariableContainerHeap
- All Implemented Interfaces:
- Comparable
public class VariableContainerHeap
- extends VariableContainer
- implements Comparable
Objects of this extension of the VariableContainer
class
will be stored within a heap. Therefore, the Comparable
interface
is implemented additionally. The compareTo(Object o)
is based
on a cost value representing the costs to eliminate the variable of this
container.
- Version:
- $LastChangedRevision: 554 $
$LastChangedDate: 2008-03-26 14:19:57 +0100 (Mi, 26 Mrz 2008) $
- Author:
- Marc Pouly
VariableContainerHeap
public VariableContainerHeap(Variable var)
- Constructor:
Calls super constructor and initializes costs to 0.
- Parameters:
var
- The variable of this container.
setCost
public void setCost(int value)
- Sets the variable containers's cost value.
- Parameters:
value
- The new cost of the variable.
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
- See Also:
Comparable.compareTo(java.lang.Object)