SpanningTreesMatsuiCollector - manudubinsky/tinygarden GitHub Wiki
The Collector hierarchy is used to collect global information of the set of spanning trees. The instances are invoked by SpanningTreesMatsui.
The interface is simple, two methods must implemented:
processSpanningTree()
: this method is called once for every spanning tree generated by SpanningTreesMatsui. The spanning tree should be analysed at this point and the aggregated information collected in the instance variables.postProcess()
: this method is called after processing all the spanning trees to expose the collected information.
Use case: find the subset of spanning trees with some maximum/minimum property. For example: find the spanning trees with maximum number of leaves.
See also: Processor