Comparing partitions

### Comparing partitions

There are several orders on sets of partitions. The standard routine comp() uses the lexicographic order, which means: you compare the first entries of the partition sequences in question first, then you compare the second entries, and so on. There is another order, the so-called dominance order, it is checked by the following routine
• NAME: dom_comp_part
• SYNOPSIS: INT dom_comp_part(OP parta, partb)
• DESCRIPTION: compares two partitions according to the dominance order. At the moment only for the VECTOR representation.
• RETURN: 0 if the partitions in question are equal, and 1 if parta is bigger then partb, and -1 if parta is smaller then partb, any other other value means that parta and partb are incompatible.
Look at the following example:
Example:
```...
scan(INTEGER,a);
makevectorofpart(a,b); println(b);
m_ilih_m(S_V_LI(b),S_V_LI(b),c);
for (i=0L;i<S_V_LI(b);i++)
for (j=0L;j<S_V_LI(b);j++)
m_i_i(dom_comp_part(S_V_I(b,i),S_V_I(b,j)),S_M_IJ(c,i,j));
println(c);
...
```
It prints the matrix c of the results of the comparison of all partitions of the weight a.
harald.fripertinger@kfunigraz.ac.at,
last changed: November 19, 2001

 Comparing partitions