Toric lattice elements¶
This module was designed as a part of the framework for toric varieties
(variety,
fano_variety).
AUTHORS:
Andrey Novoseltsev (2010-05-27): initial version.
- class sage.geometry.toric_lattice_element.ToricLatticeElement[source]¶
Bases:
Vector_integer_denseCreate an element of a toric lattice.
Warning
You probably should not construct such elements explicitly.
INPUT:
same as for
Vector_integer_dense.
OUTPUT: element of a toric lattice
- plot(**options)[source]¶
Plot
self.INPUT:
any options for toric plots (see
toric_plotter.options), none are mandatory.
OUTPUT: a plot
EXAMPLES:
sage: N = ToricLattice(3) sage: n = N(1,2,3) sage: n.plot() # needs sage.plot Graphics3d Object
>>> from sage.all import * >>> N = ToricLattice(Integer(3)) >>> n = N(Integer(1),Integer(2),Integer(3)) >>> n.plot() # needs sage.plot Graphics3d Object
N = ToricLattice(3) n = N(1,2,3) n.plot() # needs sage.plot
- sage.geometry.toric_lattice_element.unpickle_v1(parent, entries, degree, immutable)[source]¶
Unpickle a
ToricLatticeElement.INPUT:
parent– the parent toric latticeentries– list; the coordinates of the lattice pointdegree– integer; the dimension of the toric latticeimmutable– boolean; whether the lattice element is immutable
OUTPUT: the
ToricLatticeElementdetermined by the input dataEXAMPLES:
sage: N = ToricLattice(3, "lattice") sage: loads(dumps(N(1,2,3))) # indirect test lattice(1, 2, 3) sage: from sage.geometry.toric_lattice_element import unpickle_v1 sage: unpickle_v1(N,[1,2,3],3,True) lattice(1, 2, 3)
>>> from sage.all import * >>> N = ToricLattice(Integer(3), "lattice") >>> loads(dumps(N(Integer(1),Integer(2),Integer(3)))) # indirect test lattice(1, 2, 3) >>> from sage.geometry.toric_lattice_element import unpickle_v1 >>> unpickle_v1(N,[Integer(1),Integer(2),Integer(3)],Integer(3),True) lattice(1, 2, 3)
N = ToricLattice(3, "lattice") loads(dumps(N(1,2,3))) # indirect test from sage.geometry.toric_lattice_element import unpickle_v1 unpickle_v1(N,[1,2,3],3,True)