- Aggregate pattern
An Aggregate pattern can refer to concepts in either statistics or computer programming. Both uses deal with considering a large case as composed of smaller, simpler, pieces.
Statistics
An aggregate pattern is an important statistical concept in many fields that rely on
statistics to predict the behavior of large groups, based on the tendencies of subgroups to consistently behave in a certain way. It is particularly useful insociology ,economics ,psychology , andcriminology .Computer programming
In
Design Patterns , an aggregate is not a design pattern but rather refers to an object such as a list, vector, or generator which provides an interface for creatingiterator s. The following example code is in Python.Python hides essentially all of the details using the [http://www.python.org/doc/lib/typeiter.html iterator protocol] . Confusingly,Design Patterns uses "aggregate" to refer to the blank in the codefor x in ___:
which is unrelated to the term "aggregation" [Design Patterns , p. 22: "Aggregation implies that one object owns or is responsible for another object. ... Aggregation implies that an aggregate object and its owner have identical lifetimes."] . Neither of these terms refer to the statistical aggregation of data such as the act of adding up the Fibonacci sequence or taking the average of a list of numbers.See also
*
Visitor pattern
*Template class
*Facade pattern
*Type safety
*Functional programming References
Wikimedia Foundation. 2010.