Interface IncrementalEvaluation<T extends Copyable<T>>
- Type Parameters:
T- The type of Partial object that this IncrementalEvaluation evaluates, which is assumed to be an object that is a sequence of integers (e.g., vector of integers, permutation, or some other indexable type that stores integers).
extendExtends an incremental evaluation, to account for extending a Partial by the addition of one element.
This method assumes that this IncrementalEvaluation object is consistent and up to date with the Partial p passed as a parameter.
This extension is problem-dependent and this IncrementalEvaluation includes maintenance of any data for which incremental updates as the Partial is gradually transformed into a full T is beneficial to performance. For example, for a scheduling problem, the IncrementalEvaluation might keep track of current time in the schedule, accounting for all of the jobs already scheduled, to avoid having to recompute it with each extension (if the heuristic uses that to evaluate a job).
p- The current state of the Partial (assumed to be the Partial that is the subject of the IncrementalEvaluation).
element- The element that will be added to the Partial. This method should not actually add element to p. Rather, it should update the IncrementalEvaluation to coincide with the addition of element to p.