Accumulation, Assignments and Index Operators

Learn how to overload accumulation and indexing operators for the Matrix class.

Introduction to the accumulation operators

An accumulation operator is a mathematical function that takes a sequence of values and produces a running total of those values. It’s also sometimes called a summation operator or cumulative sum.

The most common symbol used to represent the accumulation operator is the Greek capital letter Sigma (ΣΣ), which indicates a sum. For example, if we have a sequence of numbers: a1,a2,a3,...,an{a_1, a_2, a_3, ..., a_n}, the accumulation operator can be used to produce the sum:

Get hands-on with 1200+ tech skills courses.