Module net.automatalib.common.util
Interface WorksetMappingAlgorithm<T,E,R>
public interface WorksetMappingAlgorithm<T,E,R>
-
Method Summary
Modifier and TypeMethodDescriptionintProvides a hint to initialize containers appropriately.initialize(Map<T, E> mapping) Provide the initial elements that should be processed byupdate.result()Provides the result of this algorithm's internal action.Process the given element and perform its corresponding actions.
-
Method Details
-
expectedElementCount
int expectedElementCount()Provides a hint to initialize containers appropriately.- Returns:
- expected number of elements visited
-
initialize
Provide the initial elements that should be processed byupdate. Also performs any required action on the initial elements (e.g. update mapping).- Parameters:
mapping- the calculated mapping (should be updated appropriately)- Returns:
- initial elements
-
update
Process the given element and perform its corresponding actions. If during this process the need arises to update other elements as well, return them.- Parameters:
mapping- the calculated mapping (should be updated appropriately)currentT- the current element that should be processed by this method- Returns:
- a collection of elements that need to be processed
-
result
R result()Provides the result of this algorithm's internal action. More precise, this function returns the accumulated object E after the successful application of allupdatecalls.- Returns:
- the resulting object
-