Path: blob/master/sage/schemes/hyperelliptic_curves/jacobian_constructor.py
4128 views
"""1Constructor for Jacobian of a hyperelliptic curve2"""34#*****************************************************************************5# Copyright (C) 2006 David Kohel <[email protected]>6# Distributed under the terms of the GNU General Public License (GPL)7# http://www.gnu.org/licenses/8#*****************************************************************************910from hyperelliptic_generic import is_HyperellipticCurve11import jacobian_g212import jacobian_generic1314def Jacobian(C):15if not is_HyperellipticCurve(C):16raise TypeError, "Argument C (= %s) must be a hyperelliptic curve."17if C.genus() == 2:18return jacobian_g2.HyperellipticJacobian_g2(C)19else:20return jacobian_generic.HyperellipticJacobian_generic(C)212223