![How to handle PERMUTATIONobjects](http://www.uni-graz.at/~fripert/icons/next.png) |
![Permutations](http://www.uni-graz.at/~fripert/icons/up.png) |
![How to change a PERMUTATIONobject](http://www.uni-graz.at/~fripert/icons/previous.png) |
How to build a
PERMUTATIONobject |
How to build a PERMUTATIONobject
Here comes the routine that allows to build a
PERMUTATIONobject:
- NAME: m_il_p
- SYNOPSIS: INT m_il_p(INT l; OP p)
- DESCRIPTION: builds a PERMUTATIONobject with empty entries of
the specified length l. The kind of p becomes VECTOR.
We provide an example which reads with the standard C-function
scanf an INT variable from stdin, and generates a permutation of
the entered length, the entries of the list, representing the
permutation are empty objects ( =# ):
#include "def.h"
#include "macro.h"
main()
{
OP a;
INT l;
anfang();
a = callocobject();
scanf("% ld",& l);
m_il_p(l,a);
println(a);
freeall(a);
ende();
}
harald.fripertinger "at" uni-graz.at, May 26,
2011
![How to handle PERMUTATIONobjects](http://www.uni-graz.at/~fripert/icons/next.png) |
![Permutations](http://www.uni-graz.at/~fripert/icons/up.png) |
![How to change a PERMUTATIONobject](http://www.uni-graz.at/~fripert/icons/previous.png) |
![Uni-Graz](http://www.uni-graz.at/~fripert/icons/kfug_klkl.gif) |
![Mathematik](http://www.uni-graz.at/~fripert/icons/mathlogokl.gif) |
How to build a
PERMUTATIONobject |
![Valid HTML 4.0 Transitional](http://www.w3.org/Icons/valid-html40-blue) |
![Valid CSS!](http://jigsaw.w3.org/css-validator/images/vcss-blue) |