// removeFromForest()
~ETNode() {
delete RightmostOcc;
+ delete ParentOcc;
}
void removeFromForest() {
return this->Below(other);
}
- void assignDFSNumber(int &num) {
- DFSNumIn = num++;
-
- if (Son) {
- Son->assignDFSNumber(num);
- for (ETNode *son = Son->Right; son != Son; son = son->Right)
- son->assignDFSNumber(num);
- }
- DFSNumOut = num++;
- }
+ void assignDFSNumber (int);
bool hasFather() const {
return Father != NULL;
return DFSNumOut;
}
+ const ETNode *getSon() const {
+ return Son;
+ }
+
+ const ETNode *getBrother() const {
+ return Left;
+ }
+
private:
// Data represented by the node
void *data;