| | | **How to change a PERMUTATIONobject** |

### How to change a PERMUTATIONobject

The first routine and also the corresponding macro *changes the kind:*
- NAME:
* c_p_k, C_P_K*
- SYNOPSIS:
* c_p_k(OP p, OBJECTKIND k)*
- DESCRIPTION: It changes the value, which indicates the kind of the
PERMUTATION object
*p.* Up to now there are only two kinds,
which are allowed, VECTOR and ZYKEL. If you use
the macro, there will be no checks on the correct input
parameters.

Here is a concrete example program:
...
scan(PERMUTATION,a);
println(a);
c_p_k(a,ZYKEL);
println(a);
...

You see that the data part of the object remains unchanged, but is
now interpreted as a
permutation in cycle notation. If you enter, for example,
the permutation (in list notation, which is the default)
*[3,5,4,1,2],* then
the second *println* will output
*(3,5,4)(1,2).*

harald.fripertinger@kfunigraz.ac.at,

last changed: November 19, 2001

| | | **How to change a PERMUTATIONobject** |