From: Michael Orlitzky Date: Fri, 2 Nov 2018 00:19:01 +0000 (-0400) Subject: cone/faces.py: add a relative interior test for face_generated_by(). X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=3a995e3f5231424718cd268c7504ad65d48cdd53;p=sage.d.git cone/faces.py: add a relative interior test for face_generated_by(). --- diff --git a/mjo/cone/faces.py b/mjo/cone/faces.py index 9c6cfd4..cd15695 100644 --- a/mjo/cone/faces.py +++ b/mjo/cone/faces.py @@ -77,6 +77,20 @@ def face_generated_by(K,S): sage: all([face_generated_by(K, [r]) == Cone([r]) for r in K]) True + For any point ``x`` in ``K`` and any face ``F`` of ``K``, we have + that ``x`` is in the relative interior of ``F`` if and only if + ``F`` is the face generated by ``x`` [Tam]_:: + + sage: set_random_seed() + sage: K = random_cone(max_ambient_dim=8, max_rays=10) + sage: x = K.random_element() + sage: S = [x] + sage: F = K.face_lattice().random_element() + sage: expected = F.relative_interior_contains(x) + sage: actual = (F == face_generated_by(K, S)) + sage: actual == expected + True + """ face_lattice = K.face_lattice() candidates = [F for F in face_lattice if all([F.contains(x) for x in S])]