Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
ConvexRationalPolyhedralCone: Add method is_empty and aliases is_full…
Browse files Browse the repository at this point in the history
…_dimensional, is_universe
  • Loading branch information
Matthias Koeppe committed Jun 7, 2021
1 parent 669a161 commit e67f753
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/sage/geometry/cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3191,6 +3191,14 @@ def is_smooth(self):
return False
return self.rays().matrix().elementary_divisors() == [1] * self.nrays()

def is_empty(self):
"""
Return whether ``self`` is the empty set.
Because a cone always contains the origin, this method returns ``False``.
"""
return False

def is_trivial(self):
"""
Checks if the cone has no rays.
Expand Down Expand Up @@ -4448,6 +4456,8 @@ def is_solid(self):
A cone is said to be solid if it has nonempty interior. That
is, if its extreme rays span the entire ambient space.
An alias is :meth:`is_full_dimensional`.
OUTPUT:
``True`` if this cone is solid, and ``False`` otherwise.
Expand Down Expand Up @@ -4487,6 +4497,8 @@ def is_solid(self):
"""
return (self.dim() == self.lattice_dim())

is_full_dimensional = is_solid

def is_proper(self):
r"""
Check if this cone is proper.
Expand Down Expand Up @@ -4537,6 +4549,8 @@ def is_full_space(self):
r"""
Check if this cone is equal to its ambient vector space.
An alias is :meth:`is_universe`.
OUTPUT:
``True`` if this cone equals its entire ambient vector
Expand Down Expand Up @@ -4574,6 +4588,8 @@ def is_full_space(self):
"""
return self.linear_subspace() == self.lattice().vector_space()

is_universe = is_full_space

def lineality(self):
r"""
Return the lineality of this cone.
Expand Down

0 comments on commit e67f753

Please sign in to comment.