....: for L in K.positive_operators_gens() ]) # long time
True
+ Technically we could test this, but for now only closed convex cones
+ are supported as our ``K`` argument::
+
+ sage: L = identity_matrix(3)
+ sage: K = [ vector([1,2,3]), vector([5,-1,7]) ]
+ sage: is_positive_on(L,K)
+ Traceback (most recent call last):
+ ...
+ TypeError: K must be a Cone.
+
"""
if not is_Cone(K):
- raise TypeError('K must be a Cone')
+ raise TypeError('K must be a Cone.')
if not L.base_ring().is_exact() and not L.base_ring() is SR:
- raise ValueError('base ring of operator L is neither SR nor exact')
+ raise ValueError('The base ring of L is neither SR nor exact.')
if L.base_ring().is_exact():
# This should be way faster than computing the dual and
....: for L in K.cross_positive_operators_gens() ]) # long time
True
+ Technically we could test this, but for now only closed convex cones
+ are supported as our ``K`` argument::
+
+ sage: L = identity_matrix(3)
+ sage: K = [ vector([8,2,-8]), vector([5,-5,7]) ]
+ sage: is_cross_positive_on(L,K)
+ Traceback (most recent call last):
+ ...
+ TypeError: K must be a Cone.
+
"""
if not is_Cone(K):
- raise TypeError('K must be a Cone')
+ raise TypeError('K must be a Cone.')
if not L.base_ring().is_exact() and not L.base_ring() is SR:
- raise ValueError('base ring of operator L is neither SR nor exact')
+ raise ValueError('The base ring of L is neither SR nor exact.')
return all([ s*(L*x) >= 0
for (x,s) in K.discrete_complementarity_set() ])
....: for L in K.Z_operators_gens() ]) # long time
True
+ Technically we could test this, but for now only closed convex cones
+ are supported as our ``K`` argument::
+
+ sage: L = identity_matrix(3)
+ sage: K = [ vector([-4,20,3]), vector([1,-5,2]) ]
+ sage: is_Z_on(L,K)
+ Traceback (most recent call last):
+ ...
+ TypeError: K must be a Cone.
+
"""
return is_cross_positive_on(-L,K)
....: for L in K.lyapunov_like_basis() ]) # long time
True
+ Technically we could test this, but for now only closed convex cones
+ are supported as our ``K`` argument::
+
+ sage: L = identity_matrix(3)
+ sage: K = [ vector([2,2,-1]), vector([5,4,-3]) ]
+ sage: is_lyapunov_like_on(L,K)
+ Traceback (most recent call last):
+ ...
+ TypeError: K must be a Cone.
+
"""
if not is_Cone(K):
- raise TypeError('K must be a Cone')
+ raise TypeError('K must be a Cone.')
if not L.base_ring().is_exact() and not L.base_ring() is SR:
- raise ValueError('base ring of operator L is neither SR nor exact')
+ raise ValueError('The base ring of L is neither SR nor exact.')
return all([ s*(L*x) == 0
for (x,s) in K.discrete_complementarity_set() ])