REFERENCES:
.. [Stoer-Witzgall] J. Stoer and C. Witzgall. Convexity and
- Optimization in Finite Dimensions I. Springer-Verlag, New
+ Optimization in Finite Dimensions I. Springer-Verlag, New
York, 1970.
EXAMPLES:
sage: S.is_equivalent(expected_S)
True
"""
- linspace_gens = [ copy(b) for b in K.linear_subspace().basis() ]
- linspace_gens += [ -b for b in linspace_gens ]
+ # The lines() method only gives us one generator for each line,
+ # so we negate the result and combine everything for the full set.
+ S = Cone([p*l for p in [1,-1] for l in K.lines()], K.lattice())
- S = Cone(linspace_gens, K.lattice())
-
- # Since ``S`` is a subspace, its dual is its orthogonal complement
- # (albeit in the wrong lattice).
- S_perp = Cone(S.dual(), K.lattice())
- P = K.intersection(S_perp)
+ # Since ``S`` is a subspace, the rays of its dual generate its
+ # orthogonal complement.
+ P = K.intersection( Cone(S.dual(), K.lattice()) )
return (P,S)
+
def positive_operator_gens(K):
r"""
Compute generators of the cone of positive operators on this cone.