X4ti2

4ti2.spad line 145 [edit on github]

X4ti2 provides an interface to the program zsolve from the 4ti2 software package (http://4ti2.de, https://4ti2.github.io/).

setExecutable: String -> String

setExecutable(path) sets a path for an executable that is called during the zsolve function call. It returns the old path. The default path is "/usr/bin/4ti2-zsolve”.

setOptions: String -> String

setOptions(options) sets a options for an executable that is called during the zsolve function call. It returns the old options. The default option is “-q".

zsolve: (Matrix Integer, Vector Integer, Vector Integer) -> Record(zinhom: List Vector Integer, zhom: List Vector Integer, zfree: List Vector Integer)

If A is a (m,n)-matrix, r an m-dimensional vector with entries from {-1, 0, 1}, b an m-dimensional vector, then zsolve(A, r, b) returns 3 lists I, H, F such that for any vector i in inhom and any N-linear combination h of vectors from hom H and any Z-linear combination f of vectors from F, the vector x=i+h+f solves the given system Ax r b where here the vector r has to be interpreted rowwise, such that -1 means <=, 0 means =, and 1 means >=. The function creates some random files to transmit data to and from 4ti2. These files will be written to the current directory and start with the prefix "4ti2-” followed by a random number. They will be removed after the computation.