ppi runs 4ti2's ppi program to compute the primitive partition identities, that is, the Graver basis of 1:N.

ppi(N, dir = tempdir(), quiet = TRUE, shell = FALSE, ...)

Arguments

N

A postive integer > 2

dir

Directory to place the files in, without an ending /

quiet

If FALSE, messages the 4ti2 output

shell

Messages the shell code used to do the computation

...

Additional arguments to pass to the function

Value

A matrix containing the basis as its columns (for easy addition to tables)

See also

Examples

if (has_4ti2()) { ppi(3) t(ppi(3)) %*% 1:3 plot_matrix(ppi(3)) graver(t(1:3)) plot_matrix(graver(t(1:3))) ppi(5, quiet = FALSE, shell = TRUE) }
#> /Applications/latte/bin/ppi /var/folders/r3/126_d6t55f5d32tplbg5mk1d0c48s9/T//RtmpugrA1n/2020_03_17_23_45_41_eVyvCzqTiZ/system > ppi_out 2> ppi_err
#>
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] -4 -2 0 -1 -3 1 0 0 0 2 1 -1 0 -2 #> [2,] 0 -1 -2 -1 0 -2 0 -3 1 0 0 0 -1 1 #> [3,] 0 0 0 1 1 1 -4 2 -2 -2 -3 -1 -2 0 #> [4,] 1 1 1 0 0 0 3 0 1 1 2 1 2 0 #> [5,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] #> [1,] 1 0 1 0 0 0 0 0 0 -1 2 1 #> [2,] -1 0 0 0 0 0 -1 -3 -5 0 0 0 #> [3,] -1 0 0 -5 -1 -2 0 0 0 -3 0 -1 #> [4,] 1 -5 -4 0 -3 -1 -2 -1 0 0 -3 -2 #> [5,] 0 4 3 3 3 2 2 2 2 2 2 2 #> [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] #> [1,] 0 0 0 0 0 0 -1 -1 -1 -2 -3 -5 #> [2,] 1 1 0 -1 -2 -4 1 0 -2 0 -1 0 #> [3,] 0 -4 -3 -1 1 1 -2 0 0 -1 0 0 #> [4,] -3 0 1 0 -1 0 0 -1 0 0 0 0 #> [5,] 2 2 1 1 1 1 1 1 1 1 1 1 #> [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] #> [1,] 3 2 1 1 1 1 0 0 0 #> [2,] 0 0 1 0 -1 -3 2 1 0 #> [3,] 0 -1 0 -2 0 0 -3 -1 1 #> [4,] -2 -1 -2 0 -1 0 0 -1 -2 #> [5,] 1 1 1 1 1 1 1 1 1