zsolve runs 4ti2's zsolve program to compute the configuration matrix A corresponding to graphical statistical models given by a simplicial complex and levels on the nodes.

zsolve(
  mat,
  rel,
  rhs,
  sign,
  lat,
  lb,
  ub,
  dir = tempdir(),
  quiet = TRUE,
  shell = FALSE,
  ...
)

Arguments

mat

The A matrix (see the 4ti2 documentation or examples)

rel

A vector of "<" or ">" relations

rhs

The right hand side b

sign

The signs of the individual

lat

A lattice basis (instead of a matrix)

lb

Lower bounds on columns

ub

Upper bounds on columns

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

The configuration matrix of the model provided

Examples

if (has_4ti2()) { mat <- rbind( c( 1, -1), c(-3, 1), c( 1, 1) ) rel <- c("<", "<", ">") rhs <- c(2, 1, 1) sign <- c(0, 1) zsolve(mat, rel, rhs, sign) zsolve(mat, rel, rhs, sign, quiet = FALSE) zsolve(mat, rel, rhs, sign, shell = TRUE) zsolve(mat, rel, rhs, sign, p = "gmp", quiet = FALSE) }
#> ------------------------------------------------- #> 4ti2 version 1.6.7 #> Copyright 1998, 2002, 2006, 2015 4ti2 team. #> 4ti2 comes with ABSOLUTELY NO WARRANTY. #> This is free software, and you are welcome #> to redistribute it under certain conditions. #> For details, see the file COPYING. #> ------------------------------------------------- #> #> Using 32 bit integers. #> #> Linear system to solve: #> #> + + #> - 0 #> F H #> #> 1 -1 <= 2 #> -3 1 <= 1 #> 1 1 >= 1 #> #> Linear system of homogeneous equalities to solve: #> #> + + + + + 1 #> - 0 0 0 0 0 #> F H H H H B #> #> 1 -1 1 0 0 -2 = 0 #> -3 1 0 1 0 -1 = 0 #> 1 1 0 0 -1 -1 = 0 #> #> Lattice: #> #> + + + + + 1 #> - 0 0 0 0 0 #> F H H H H B #> #> 1 0 -1 3 1 0 #> 0 1 1 -1 1 0 #> 0 0 2 1 -1 1 #> #> #> Final basis has 4 inhomogeneous, 3 homogeneous and 0 free elements. Time: 0.00s
#> /Applications/latte/bin/zsolve /var/folders/r3/126_d6t55f5d32tplbg5mk1d0c48s9/T//RtmpugrA1n/2020_03_17_23_45_42_zH3QNthByr/system > zsolve_out 2> zsolve_err
#> ------------------------------------------------- #> 4ti2 version 1.6.7 #> Copyright 1998, 2002, 2006, 2015 4ti2 team. #> 4ti2 comes with ABSOLUTELY NO WARRANTY. #> This is free software, and you are welcome #> to redistribute it under certain conditions. #> For details, see the file COPYING. #> ------------------------------------------------- #> #> Using arbitrary precision integers. #> #> Linear system to solve: #> #> + + #> - 0 #> F H #> #> 1 -1 <= 2 #> -3 1 <= 1 #> 1 1 >= 1 #> #> Linear system of homogeneous equalities to solve: #> #> + + + + + 1 #> - 0 0 0 0 0 #> F H H H H B #> #> 1 -1 1 0 0 -2 = 0 #> -3 1 0 1 0 -1 = 0 #> 1 1 0 0 -1 -1 = 0 #> #> Lattice: #> #> + + + + + 1 #> - 0 0 0 0 0 #> F H H H H B #> #> 1 0 -1 3 1 0 #> 0 1 1 -1 1 0 #> 0 0 2 1 -1 1 #> #> #> Final basis has 4 inhomogeneous, 3 homogeneous and 0 free elements. Time: 0.00s
#> $zinhom #> [,1] [,2] #> [1,] 2 0 #> [2,] 0 1 #> [3,] 1 0 #> [4,] 1 1 #> #> $zhom #> [,1] [,2] #> [1,] 1 3 #> [2,] 1 1 #> [3,] 1 2 #>