In order to test whether we have a PARTITION of rectangle shape the
following routine helps:
NAME: rectanglep
SYNOPSIS: INT rectanglep(OP part)
DESCRIPTION: returns TRUE if of rectangle shape FALSE in the
else case. Works for VECTOR type and EXPONENT type.
Sometimes it is useful to sort an INTEGER vector, so that the
result is a PARTITIONobject. This is done in the routine:
NAME: m_v_pa means make_vector_partition
SYNOPSIS:
INT m_v_pa(OP vec, result)
DESCRIPTION: The vec must be a VECTORobject with nonnegative
INTEGERobjects. This vector will be sorted and it becomes the self
part of the result which becomes a PARTITIONobject. As the name
make_ .. says the vec will be copied. So you can still use the
unsorted INTEGER vector vec. In the case b_v_pa the sorted vector
becomes part of the PARTITION result. in the case of m_v_pa vec and
result may be equal.
RETURN: ERROR if negative entries, ERROR if not INTEGER
entries, else OK.
harald.fripertinger "at" uni-graz.at, May 26,
2011