Base class for mutable polyhedra.

Just like vectors and matrices they can be set immutable. The constructor does this by default.

class sage.geometry.polyhedron.base_mutable.Polyhedron_mutable(parent, Vrep, Hrep, Vrep_minimal=None, Hrep_minimal=None, pref_rep=None, mutable=False, **kwds)[source]

Bases: Polyhedron_base

Base class for polyhedra that allow mutability.

This should not be used directly.

Hrepresentation()[source]

A derived class must overwrite such that it restores Hrepresentation after clearing it.

Vrepresentation()[source]

A derived class must overwrite such that it restores Vrepresentation after clearing it.

is_immutable()[source]

Return True if the polyhedron is immutable, i.e. it cannot be modified in place.

EXAMPLES:

sage: p = Polyhedron([[1, 1]], mutable=True)
sage: p.is_immutable()
False
sage: p = Polyhedron([[1, 1]], mutable=False)
sage: p.is_immutable()
True
>>> from sage.all import *
>>> p = Polyhedron([[Integer(1), Integer(1)]], mutable=True)
>>> p.is_immutable()
False
>>> p = Polyhedron([[Integer(1), Integer(1)]], mutable=False)
>>> p.is_immutable()
True
p = Polyhedron([[1, 1]], mutable=True)
p.is_immutable()
p = Polyhedron([[1, 1]], mutable=False)
p.is_immutable()
is_mutable()[source]

Return True if the polyhedron is mutable, i.e. it can be modified in place.

EXAMPLES:

sage: p = Polyhedron([[1, 1]], mutable=True)
sage: p.is_mutable()
True
sage: p = Polyhedron([[1, 1]], mutable=False)
sage: p.is_mutable()
False
>>> from sage.all import *
>>> p = Polyhedron([[Integer(1), Integer(1)]], mutable=True)
>>> p.is_mutable()
True
>>> p = Polyhedron([[Integer(1), Integer(1)]], mutable=False)
>>> p.is_mutable()
False
p = Polyhedron([[1, 1]], mutable=True)
p.is_mutable()
p = Polyhedron([[1, 1]], mutable=False)
p.is_mutable()
set_immutable()[source]

Make this polyhedron immutable. This operation cannot be undone.