def __init__(self, parent, x, check=DEBUG):
        r"""
        Initialize ``self``

        EXAMPLES::

            sage: from sage.modules.torsion_quadratic_module import TorsionQuadraticModule
            sage: V = span([[1/2,1,1], [3/2,2,1], [0,0,1]], ZZ)
            sage: b = V.basis()
            sage: W = V.span([2*b[0]+4*b[1], 9*b[0]+12*b[1], 4*b[2]])
            sage: Q = TorsionQuadraticModule(V, W)
            sage: x = Q(b[0] - b[1])
            sage: TestSuite(x).run()
        """
        FGP_Element.__init__(self, parent=parent, x=x, check=check)
Esempio n. 2
0
    def __init__(self, parent, x, check=DEBUG):
        r"""
        Initialize ``self``

        EXAMPLES::

            sage: from sage.modules.torsion_quadratic_module import TorsionQuadraticModule
            sage: V = span([[1/2,1,1], [3/2,2,1], [0,0,1]], ZZ)
            sage: b = V.basis()
            sage: W = V.span([2*b[0]+4*b[1], 9*b[0]+12*b[1], 4*b[2]])
            sage: Q = TorsionQuadraticModule(V, W)
            sage: x = Q(b[0] - b[1])
            sage: TestSuite(x).run()
        """
        FGP_Element.__init__(self, parent=parent, x=x, check=check)
Esempio n. 3
0
    def __init__(self, parent, v, check=True):
        r"""
        Construct a :class:`ChowCycle`.

        INPUT:

        - ``parent`` -- a :class:`ChowGroup_class`.

        - ``v`` -- a vector in the covering module, that is, with one
          entry for each cone of the toric variety.

        - ``check`` -- boolean (default: ``True``). Verify that ``v``
          is in the covering module. Set to ``False`` if you want to
          initialize from a coordinate vector.

        TESTS::

            sage: P2 = toric_varieties.P2()
            sage: A = P2.Chow_group()
            sage: from sage.schemes.toric.chow_group import ChowCycle
            sage: ChowCycle(A, (0,1,2,3,11,12,13), check=False)
            ( 36 | 6 | 0 )
        """
        FGP_Element.__init__(self, parent, v, check)