-
Notifications
You must be signed in to change notification settings - Fork 0
Extended Iterator Semantics
Two Iterator based interfaces, with extended semantics are included with AIC-Util, these are:
A functional sequence, is the sequence formed by an (optional) initial arbitrary value, followed by the results of applying a function to a set of arguments, when these arguments are updated, one at a time. Each argument is intended to be updated from a specific sequence itself, and when that sequence reaches its end, that argument is no longer updated. The main sequence stops being generated when all arguments have no longer values to be updated with. These values are enumerated using the standard Iterator interface.
A limitation of functional sequences, as they are currently defined, is that they do not allow for sharing of functional sequences within a hierarchy (i.e. a hierarchy of functional sequences must form a tree).
Refiners are meant to lazily compute successively better versions of something concurrently used by potentially many subscribers. It only refines its value if explicitly asked to do so.
This allows nested Refiners, unlike functional sequences which are limited to tree structures, to be used in a cyclic graph structure. They may also be treated as standard iterators by using the RefinerIterator wrapper class.