From 3a995e3f5231424718cd268c7504ad65d48cdd53 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Nov 2018 20:19:01 -0400 Subject: [PATCH] cone/faces.py: add a relative interior test for face_generated_by(). --- mjo/cone/faces.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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])] -- 2.44.2