Macaulay2 » Documentation
Packages » PALPInterface :: toPalp
next | previous | forward | backward | up | index | toc

toPalp -- the PALP input format for a matrix or a weight system

Description

A matrix becomes its number of rows and columns followed by its entries. PALP reads that as a set of points, taking the smaller of the two numbers to be the dimension.

i1 : M = matrix{{1,1,1,1},{0,1,2,3}}

o1 = | 1 1 1 1 |
     | 0 1 2 3 |

              2       4
o1 : Matrix ZZ  <-- ZZ
i2 : print toPalp M
2 4
1 1 1 1
0 1 2 3

A list of integers is passed through as a single line, which is how PALP recognises a weight system. The first entry is the degree and the rest are the weights; several such blocks in a row make a combined weight system.

i3 : print toPalp {10, 1, 2, 3, 4}
10 1 2 3 4
i4 : print toPalp {3,1,1,1,0,0,0, 3,0,0,0,1,1,1}
3 1 1 1 0 0 0 3 0 0 0 1 1 1

See also

Ways to use toPalp:

  • toPalp(List)
  • toPalp(Matrix)
  • toPalp(WeightSystem)

For the programmer

The object toPalp is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/PALPInterface.m2:1446:0.