Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Public Member Functions | Protected Member Functions | List of all members
Loyc.Collections.AListStatisticTracker< K, T > Class Template Reference

This class incrementally updates a Statistic object based on changes to AList{T} and its variants (BList, BDictionary, and BMultiMap). More...


Source file:
Inheritance diagram for Loyc.Collections.AListStatisticTracker< K, T >:
Loyc.Collections.AListStatisticTrackerBase< K, T, TSummary > Loyc.Collections.Impl.IAListTreeObserver< K, T > Loyc.Collections.AListStatisticTracker< T >

Remarks

This class incrementally updates a Statistic object based on changes to AList{T} and its variants (BList, BDictionary, and BMultiMap).

Public fields

AListStatisticTracker(Func< T,
double > selector, AListBase
< K, T > list) Statistic 
Statistic => Summary
 
- Public fields inherited from Loyc.Collections.AListStatisticTrackerBase< K, T, TSummary >
IEnumerable< AListBase< K, T > > AttachedLists => _roots.Keys
 
int TotalCountInAttachedLists => _roots.Sum(pair => pair.Key.Count)
 
TSummary Summary => GetSummary()
 

Public Member Functions

 AListStatisticTracker (Func< T, double > selector)
 
- Public Member Functions inherited from Loyc.Collections.AListStatisticTrackerBase< K, T, TSummary >
TSummary GetSummary ()
 
- Public Member Functions inherited from Loyc.Collections.Impl.IAListTreeObserver< K, T >
void Detach (AListBase< K, T > list, AListNode< K, T >?root)
 Called when the observer is being detached from an AList. Detach(), unlike Attach(), is not paired with a call to RootChanged. More...
 
void RootChanged (AListBase< K, T > list, AListNode< K, T >?root, bool clear)
 Called when the root of the tree changes, or when the list is cleared. Also called after Attach(), but not after Detach(). More...
 

Protected Member Functions

override Statistic Aggregate (Statistic[] data)
 
override Statistic Summarize (AListLeafBase< K, T > data)
 
- Protected Member Functions inherited from Loyc.Collections.AListStatisticTrackerBase< K, T, TSummary >
abstract TSummary Aggregate (TSummary[] data)
 
TSummary GetSummary (AListNode< K, T > node)
 

Additional Inherited Members

- Protected fields inherited from Loyc.Collections.AListStatisticTrackerBase< K, T, TSummary >
virtual TSummary EmptyResult => Aggregate(Empty<TSummary>.Array)