Package sage :: Package rings :: Package polynomial :: Module groebner_fan :: Class PolyhedralFan
[hide private]
[frames] | no frames]

Class PolyhedralFan

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  PolyhedralFan

Instance Methods [hide private]
 
__init__(self, gfan_polyhedral_fan)
Converts polymake/gfan data on a polyhedral fan into a sage class.
source code
 
_repr_(self)
Returns a basic description of the polyhedral fan.
source code
 
_str_(self)
Returns the raw output of gfan as a string.
source code
 
ambient_dim(self)
Returns the ambient dimension of the Groebner fan.
source code
 
dim(self)
Returns the dimension of the Groebner fan.
source code
 
lineality_dim(self)
Returns the lineality dimension of the Groebner fan.
source code
 
rays(self)
Returns a list of rays of the polyhedral fan.
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, gfan_polyhedral_fan)
(Constructor)

source code 

Converts polymake/gfan data on a polyhedral fan into a sage
class.  Currently (18-03-2008) needs a lot of work.

INPUT:
    gfan_polyhedral_fan -- output from gfan of a polyhedral fan.

EXAMPLES:
    sage: R.<x,y,z> = PolynomialRing(QQ,3)
    sage: i2 = ideal(x*z + 6*y*z - z^2, x*y + 6*x*z + y*z - z^2, y^2 + x*z + y*z)
    sage: gf2 = i2.groebner_fan(verbose = False)
    sage: pf = gf2.polyhedralfan()
    sage: pf.rays()
    [[1, 0, 0], [-2, -1, 0], [1, 1, 0], [0, -1, 0], [-1, 1, 0]]

Overrides: object.__init__

_repr_(self)

source code 

Returns a basic description of the polyhedral fan.

EXAMPLES:
    sage: R3.<x,y,z> = PolynomialRing(QQ,3)
    sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-2]).groebner_fan()
    sage: pf = gf.polyhedralfan()
    sage: pf # indirect doctest
    Polyhedral fan in 3 dimensions of dimension 3

_str_(self)

source code 

Returns the raw output of gfan as a string.  This should only
be needed internally as all relevant output is converted to
sage objects.

EXAMPLES:
    sage: R3.<x,y,z> = PolynomialRing(QQ,3)
    sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-2]).groebner_fan()
    sage: pf = gf.polyhedralfan()
    sage: pf._str_()
    '_application PolyhedralFan\n_version 2.2\n_type PolyhedralFan\n\nAMBIENT_DIM\n3\n\nDIM\n3\n\nLINEALITY_DIM\n0\n\nRAYS\n1 0 0\t# 0\n0 1 0\t# 1\n0 0 1\t# 2\n\nN_RAYS\n3\n\nLINEALITY_SPACE\n\nORTH_LINEALITY_SPACE\n0 0 1\n0 1 0\n1 0 0\n\nF_VECTOR\n1 3 3 1\n\nCONES\n{}\t# Dimension 0\n{0}\t# Dimension 1\n{1}\n{2}\n{0 1}\t# Dimension 2\n{0 2}\n{1 2}\n{0 1 2}\t# Dimension 3\n\nMAXIMAL_CONES\n{0 1 2}\t# Dimension 3\n\nPURE\n1\n'

ambient_dim(self)

source code 

Returns the ambient dimension of the Groebner fan.

EXAMPLES:
    sage: R3.<x,y,z> = PolynomialRing(QQ,3)
    sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-2]).groebner_fan()
    sage: a = gf.polyhedralfan()
    sage: a.ambient_dim()
    3

dim(self)

source code 

Returns the dimension of the Groebner fan.

EXAMPLES:
    sage: R3.<x,y,z> = PolynomialRing(QQ,3)
    sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-2]).groebner_fan()
    sage: a = gf.polyhedralfan()
    sage: a.dim()
    3

lineality_dim(self)

source code 

Returns the lineality dimension of the Groebner fan.
This is the just the difference between the ambient dimension
and the dimension of the cone.

EXAMPLES:
    sage: R3.<x,y,z> = PolynomialRing(QQ,3)
    sage: gf = R3.ideal([x^8-y^4,y^4-z^2,z^2-2]).groebner_fan()
    sage: a = gf.polyhedralfan()
    sage: a.lineality_dim()
    0

rays(self)

source code 

Returns a list of rays of the polyhedral fan.

EXAMPLES:
    sage: R.<x,y,z> = PolynomialRing(QQ,3)
    sage: i2 = ideal(x*z + 6*y*z - z^2, x*y + 6*x*z + y*z - z^2, y^2 + x*z + y*z)
    sage: gf2 = i2.groebner_fan(verbose = False)
    sage: pf = gf2.polyhedralfan()
    sage: pf.rays()
    [[1, 0, 0], [-2, -1, 0], [1, 1, 0], [0, -1, 0], [-1, 1, 0]]