Package sage :: Package geometry :: Module polytope :: Class Polytope
[hide private]
[frames] | no frames]

Class Polytope

source code

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


Create a polytope.

EXAMPLES:
    sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])   # optional: needs polymake

NOTE: If you have trouble with this module do
        sage: !polymake --reconfigure   # not tested
at the command line.        



Instance Methods [hide private]
 
__init__(self, datafile, desc)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_repr_(self) source code
 
__add__(self, other) source code
 
data(self) source code
 
write(self, filename) source code
 
cmd(self, cmd) source code
 
facets(self)
EXAMPLES:...
source code
 
vertices(self)
EXAMPLES:...
source code
 
visual(self) source code
 
graph(self) source code
 
is_simple(self)
Return True if this polytope is simple.
source code
 
n_facets(self)
EXAMPLES:...
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, datafile, desc)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

facets(self)

source code 

EXAMPLES:
    sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])   # optional: needs polymake
    sage: P.facets()                            # optional
    [(0, 0, 0, 1), (0, 1, 0, 0), (0, 0, 1, 0), (1, 0, 0, -1), (1, 0, -1, 0), (1, -1, 0, 0)]

vertices(self)

source code 

EXAMPLES:
    sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])     # optional: needs polymake
    sage: P.vertices()                            # optional
    [(1, 0, 0, 0), (1, 0, 0, 1), (1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 0, 0), (1, 1, 0, 1), (1, 1, 1, 0), (1, 1, 1, 1)]

is_simple(self)

source code 

Return True if this polytope is simple.

A polytope is \emph{simple} if the degree of each
vertex equals the dimension of the polytope.

EXAMPLES:
    sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])        # optional: needs polymake
    sage: P.is_simple()                              # optional
    True

AUTHORS:
    -- Edwin O'Shea (2006-05-02): Definition of simple.

n_facets(self)

source code 

EXAMPLES:
    sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])     # optional: needs polymake
    sage: P.n_facets()                            # optional
    6