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

D.4.8.9 permute

Procedure from library ellipticcovers.lib (see ellipticcovers_lib).

Usage:
permute(N); N list

Assume:
N is a list

Return:
list with all permutations of N.

Theory:
Computes all permutations of N.

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

Example:
 
LIB "ellipticcovers.lib";
ring R=(0,x1,x2,x3,x4),(q),dp;
permute(list(x1,x2,x3,x4));
==> [1]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x3)
==>    [3]:
==> (x2)
==>    [4]:
==> (x1)
==> [2]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x4)
==>    [3]:
==> (x2)
==>    [4]:
==> (x1)
==> [3]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x2)
==>    [3]:
==> (x3)
==>    [4]:
==> (x1)
==> [4]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x4)
==>    [3]:
==> (x3)
==>    [4]:
==> (x1)
==> [5]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x2)
==>    [3]:
==> (x4)
==>    [4]:
==> (x1)
==> [6]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x3)
==>    [3]:
==> (x4)
==>    [4]:
==> (x1)
==> [7]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x3)
==>    [3]:
==> (x1)
==>    [4]:
==> (x2)
==> [8]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x4)
==>    [3]:
==> (x1)
==>    [4]:
==> (x2)
==> [9]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x1)
==>    [3]:
==> (x3)
==>    [4]:
==> (x2)
==> [10]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x4)
==>    [3]:
==> (x3)
==>    [4]:
==> (x2)
==> [11]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x1)
==>    [3]:
==> (x4)
==>    [4]:
==> (x2)
==> [12]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x3)
==>    [3]:
==> (x4)
==>    [4]:
==> (x2)
==> [13]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x2)
==>    [3]:
==> (x1)
==>    [4]:
==> (x3)
==> [14]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x4)
==>    [3]:
==> (x1)
==>    [4]:
==> (x3)
==> [15]:
==>    [1]:
==> (x4)
==>    [2]:
==> (x1)
==>    [3]:
==> (x2)
==>    [4]:
==> (x3)
==> [16]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x4)
==>    [3]:
==> (x2)
==>    [4]:
==> (x3)
==> [17]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x1)
==>    [3]:
==> (x4)
==>    [4]:
==> (x3)
==> [18]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x2)
==>    [3]:
==> (x4)
==>    [4]:
==> (x3)
==> [19]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x2)
==>    [3]:
==> (x1)
==>    [4]:
==> (x4)
==> [20]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x3)
==>    [3]:
==> (x1)
==>    [4]:
==> (x4)
==> [21]:
==>    [1]:
==> (x3)
==>    [2]:
==> (x1)
==>    [3]:
==> (x2)
==>    [4]:
==> (x4)
==> [22]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x3)
==>    [3]:
==> (x2)
==>    [4]:
==> (x4)
==> [23]:
==>    [1]:
==> (x2)
==>    [2]:
==> (x1)
==>    [3]:
==> (x3)
==>    [4]:
==> (x4)
==> [24]:
==>    [1]:
==> (x1)
==>    [2]:
==> (x2)
==>    [3]:
==> (x3)
==>    [4]:
==> (x4)


Top Back: partitions Forward: lsum 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.