Macaulay2
»
Documentation
Packages
»
Macaulay2Doc
::
sum
next
|
previous
|
forward
|
backward
| up |
index
|
toc
sum -- compute the sum
Description
sum
provides the sum of the members of a list, set, or chain complex, optionally with a function applied to each one.
Ways to use
sum
:
sum(ChainComplex)
-- direct sum of the components of a chain complex
sum(ChainComplexMap)
-- direct sum of the components of a chain map
sum(List)
-- sum the elements of a list
sum(Set)
-- sum of elements
sum(VirtualTally)
-- sum of elements
sum(VisibleList,Function)
-- sum results of applying a function
sum(VisibleList,VisibleList,Function)
-- sum results of applying a function pairwise
sum(ZZ,Function)
-- sum consecutive values of a function
For the programmer
The object
sum
is
a
method function
.