Thank you David,
this is exactly what I was looking for. I can even skip the denominator
part, as I'm starting with a ZZ-matrix.
Jonathan
David Roe schrieb am Mittwoch, 11. November 2020 um 20:18:50 UTC+1:
> I think this should do what you need:
>
> sage: A = matrix([
> : (1, 0, 0, 0, 1/1
I think this should do what you need:
sage: A = matrix([
: (1, 0, 0, 0, 1/10),
: (0, 1, 0, 0, 1/10),
: (0, 0, 1, 0, 1/10),
: (0, 0, 0, 1, 1/10)
: ])
sage: A = (A * A.denominator()).change_ring(ZZ)
sage: A.saturation()
[10 0 0 0 1]
[-1 1 0 0 0]
[-1 0 1 0 0]
Given rational vectors and consider their linear span.
How do I obtain a basis of the ZZ^d-submodule (a basis for the contained
lattice points).
E.g. given
[
(1, 0, 0, 0, 1/10),
(0, 1, 0, 0, 1/10),
(0, 0, 1, 0, 1/10),
(0, 0, 0, 1, 1/10)
]
How do I obtain this or something equivalent:
[[1, 0,