C++ Reference: class TaskSet
Note: This documentation is automatically generated.
Helper class to compute the end-min of a set of tasks given their start-min and size-min. In Petr Vilim's PhD "Global Constraints in Scheduling", this corresponds to his Theta-tree except that we use a O(n) implementation for most of the function here, not a O(log(n)) one.Method | |
---|---|
AddEntry | Return type: Arguments: |
AddShiftedStartMinEntry | Return type: Arguments: Same as AddEntry({t, helper->ShiftedStartMin(t), helper->SizeMin(t)}). This is a minor optimization to not call SizeMin(t) twice. |
AddUnsortedEntry | Return type: Arguments: Advanced usage. Instead of calling many AddEntry(), it is more efficient to call AddUnsortedEntry() instead, but then Sort() MUST be called just after the insertions. Nothing is checked here, so it is up to the client to do that properly. |
Clear | Return type: Insertion and modification. These leave sorted_tasks_ sorted. |
ComputeEndMin | Return type: Arguments: Returns the end-min for the task in the set. The time profile of the tasks packed to the left will always be a set of contiguous tasks separated by empty space: [Bunch of tasks] ... [Bunch of tasks] ... [critical tasks]. We call "critical tasks" the last group. These tasks will be solely responsible for the end-min of the whole set. The returned critical_index will be the index of the first critical task in SortedTasks(). A reason for the min end is: - The size-min of all the critical tasks. - The fact that all critical tasks have a start-min greater or equal to the first of them, that is SortedTasks()[critical_index].start_min. It is possible to behave like if one task was not in the set by setting task_to_ignore to the id of this task. This returns 0 if the set is empty in which case critical_index will be left unchanged. |
ComputeEndMin | Return type: |
GetCriticalIndex | Return type: Warning, this is only valid if ComputeEndMin() was just called. It is the same index as if one called ComputeEndMin(-1, &critical_index), but saves another unneeded loop. |
NotifyEntryIsNowLastIfPresent | Return type: Arguments: Advanced usage, if the entry is present, this assumes that its start_min is >= the end min without it, and update the datastructure accordingly. |
RemoveEntryWithIndex | Return type: Arguments: |
Sort | Return type: |
SortedTasks | Return type: |
TaskSet | Return type: Arguments: |