Beispiel #1
0
def _gp_for_simon():
    r"""
    Start a GP interpreter for the use of Denis Simon's Qfsolve and Qfparam
    if it is not started already.

    EXAMPLE ::

        sage: from sage.quadratic_forms.qfsolve import _gp_for_simon
        sage: _gp_for_simon()
        PARI/GP interpreter
    """
    global _gp_for_simon_interpreter
    if _gp_for_simon_interpreter is None:
        _gp_for_simon_interpreter = Gp(script_subdirectory='simon')
        _gp_for_simon_interpreter.read("qfsolve.gp")
    return _gp_for_simon_interpreter
Beispiel #2
0
def _gp_for_simon():
    r"""
    Start a GP interpreter for the use of Denis Simon's programs
    ``qfsolve`` and ``qfparam``, if it is not started already.

    EXAMPLE ::

        sage: from sage.quadratic_forms.qfsolve import _gp_for_simon
        sage: _gp_for_simon()
        PARI/GP interpreter
    """
    global _gp_for_simon_interpreter
    if _gp_for_simon_interpreter is None:
        _gp_for_simon_interpreter = Gp(script_subdirectory='simon')
        _gp_for_simon_interpreter.read("qfsolve.gp")
    return _gp_for_simon_interpreter
Beispiel #3
0
def gp():
    r"""
    Return a copy of the GP interpreter with the appropriate files loaded.

    EXAMPLES::

        sage: sage.modular.buzzard.gp()
        PARI/GP interpreter
    """

    global _gp
    if _gp is None:
        _gp = Gp(script_subdirectory='buzzard')
        _gp.read("DimensionSk.g")
        _gp.read("genusn.g")
        _gp.read("Tpprog.g")
    return _gp
Beispiel #4
0
def gp():
    r"""
    Return a copy of the GP interpreter with the appropriate files loaded.

    EXAMPLES::

        sage: sage.modular.buzzard.gp()
        PARI/GP interpreter
    """

    global _gp
    if _gp is None:
        _gp = Gp(script_subdirectory='buzzard')
        _gp.read("DimensionSk.g")
        _gp.read("genusn.g")
        _gp.read("Tpprog.g")
    return _gp
Beispiel #5
0
def init():
    """
    Function to initialize the gp process
    """
    global gp
    if gp is None:
        gp = Gp(script_subdirectory='simon')
        gp.read("ell.gp")
        gp.read("ellQ.gp")
        gp.read("qfsolve.gp")
        gp.read("resultant3.gp")
Beispiel #6
0
def init():
    """
    Function to initialize the gp process
    """
    global gp
    if gp is None:
        import os
        from sage.env import DOT_SAGE
        logfile = os.path.join(DOT_SAGE, 'gp-simon.log')
        gp = Gp(script_subdirectory='simon', logfile=logfile)
        gp.read("ell.gp")
        gp.read("ellQ.gp")
        gp.read("qfsolve.gp")
        gp.read("resultant3.gp")
Beispiel #7
0
def init():
    """
    Function to initialize the gp process
    """
    global gp
    if gp is None:
        import os
        from sage.env import DOT_SAGE
        logfile = os.path.join(DOT_SAGE, 'gp-simon.log')
        gp = Gp(script_subdirectory='simon', logfile=logfile)
        gp.read("ellQ.gp")
        gp.read("ell.gp")
        gp.read("qfsolve.gp")
        gp.read("resultant3.gp")