X4ti2¶
4ti2.spad line 150 [edit on github]
X4ti2
provides an interface to the program zsolve from the 4ti2 software package (http://4ti2
.de, https://4ti2
.github.io/).
- clearDenominators: Record(qmat: Matrix Fraction Integer, zrels: Vector Integer, qrhs: Vector Fraction Integer) -> Record(zmat: Matrix Integer, zrels: Vector Integer, zrhs: Vector Integer)
clearDenominators(q)
computes (for each rowi
separately) the common denominator of the entries of row(q
.qmat,i
) andq
.qrhx.i
and multiplies the entries by this denominator.
- setExecutable: String -> String
setExecutable(path)
sets apath
for an executable that is called during the zsolve function call. It returns the oldpath
. The defaultpath
is"/usr/bin/4ti2
-zsolve”.
- setOptions: String -> String
setOptions(options)
sets aoptions
for an executable that is called during the zsolve function call. It returns the oldoptions
. 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
anm
-dimensional vector with entries from {-1
, 0, 1},b
anm
-dimensional vector, then zsolve(A,r
,b
) returns 3 listsI
,H
,F
such that for any vectori
in inhom and anyNN
-linear combinationh
of vectors from homH
and anyZZ
-linear combinationf
of vectors fromF
, the vector x=i+h+f solves the given system Axr
b
where here the vectorr
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.