Top
Back: sort
Forward: watchdog
FastBack: compregb_lib
FastForward: grobcov_lib
Up: general_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.3.15 sum

Procedure from library general.lib (see general_lib).

Usage:
sum(id[,v]); id ideal/vector/module/matrix/intvec/intmat/list, v intvec (default: v=1..number of entries of id)

Assume:
list members can be added.

Return:
The sum of all entries of id [with index given by v] of type depending on the entries of id.

Note:
If id is not a list, id is treated as a list of polys resp. integers. A module m is identified with the corresponding matrix M (columns of M generate m).
If v is outside the range of id, we have the empty sum and the result will be 0 (of type int).

Example:
 


Top Back: sort Forward: watchdog FastBack: compregb_lib FastForward: grobcov_lib Up: general_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.