public class ThetaTree extends Object
Constructor and Description |
---|
ThetaTree(int size)
Creates a theta-tree able to store
the specified number of activities, each identified
as a number between 0 and size-1.
|
Modifier and Type | Method and Description |
---|---|
int |
getECT()
The earliest completion time of the activities present in the theta-tree
|
void |
insert(int pos,
int ect,
int dur)
Insert activity in leaf nodes at given position
such that it is taken into account for the
getECT()
computation. |
void |
remove(int pos)
Remove activity at given position that it has no impact
on the earliest completion time computation
|
void |
reset()
Remove all the activities from this theta-tree
|
public ThetaTree(int size)
size
- the number of activities that can possibly be inserted in the treepublic void reset()
public void insert(int pos, int ect, int dur)
getECT()
computation.pos
- the index of the leaf node (assumed to start at 0 from left to right)ect
- earliest completion timedur
- durationpublic void remove(int pos)
pos
- the index of the leaf nodes, assumed to start at 0 from left to rightpublic int getECT()
Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.