Top
Back: computeGromovWitten
Forward: permute
FastBack:
FastForward:
Up: ellipticcovers_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.4.8.8 partitions

Procedure from library ellipticcovers.lib (see ellipticcovers_lib).

Usage:
partitions(n,a); n int, a int

Assume:
n and a are positive integers

Return:
list of all partitions of a into n summands.

Theory:
Computes all partitions of a into n summands.

This may eventually be deleted and become a more efficient kernel function.

Example:
 
LIB "ellipticcovers.lib";
partitions(3,7);
==> [1]:
==>    0,0,7
==> [2]:
==>    0,1,6
==> [3]:
==>    0,2,5
==> [4]:
==>    0,3,4
==> [5]:
==>    0,4,3
==> [6]:
==>    0,5,2
==> [7]:
==>    0,6,1
==> [8]:
==>    0,7,0
==> [9]:
==>    1,0,6
==> [10]:
==>    1,1,5
==> [11]:
==>    1,2,4
==> [12]:
==>    1,3,3
==> [13]:
==>    1,4,2
==> [14]:
==>    1,5,1
==> [15]:
==>    1,6,0
==> [16]:
==>    2,0,5
==> [17]:
==>    2,1,4
==> [18]:
==>    2,2,3
==> [19]:
==>    2,3,2
==> [20]:
==>    2,4,1
==> [21]:
==>    2,5,0
==> [22]:
==>    3,0,4
==> [23]:
==>    3,1,3
==> [24]:
==>    3,2,2
==> [25]:
==>    3,3,1
==> [26]:
==>    3,4,0
==> [27]:
==>    4,0,3
==> [28]:
==>    4,1,2
==> [29]:
==>    4,2,1
==> [30]:
==>    4,3,0
==> [31]:
==>    5,0,2
==> [32]:
==>    5,1,1
==> [33]:
==>    5,2,0
==> [34]:
==>    6,0,1
==> [35]:
==>    6,1,0
==> [36]:
==>    7,0,0


Top Back: computeGromovWitten Forward: permute FastBack: FastForward: Up: ellipticcovers_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.