Free cookie consent management tool by TermsFeed Policy Generator

Changeset 371


Ignore:
Timestamp:
07/08/08 17:53:00 (16 years ago)
Author:
mkofler
Message:

Added methods to retrieve the first and last node of the tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Scheduling.JSSP/ScheduleTree.cs

    r361 r371  
    177177    }
    178178
     179    public ScheduleTreeNode GetFirstSlot() { // left-most slot
     180      ScheduleTreeNode node = root;
     181      while (node.Left != null) {
     182        node = node.Left;
     183      }
     184      return node;
     185    }
     186
     187    public ScheduleTreeNode GetLastSlot() { // right-most slot
     188      ScheduleTreeNode node = root;
     189      while (node.Right != null) {
     190        node = node.Right;
     191      }
     192      return node;
     193    }
     194
    179195    public override string ToString() {
    180196      StringBuilder builder = new StringBuilder();
Note: See TracChangeset for help on using the changeset viewer.