]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
Add examples for the is_lyapunov_like() function.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 20 Sep 2015 02:34:52 +0000 (22:34 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 20 Sep 2015 02:34:52 +0000 (22:34 -0400)
mjo/cone/cone.py

index f3543a147ad8da3c5000015f3c53e837781180e5..1d04084fe2f971978af0ff42e75a03f265fa6690 100644 (file)
@@ -725,11 +725,27 @@ def is_lyapunov_like(L,K):
 
     EXAMPLES:
 
-    todo.
+    The identity is always Lyapunov-like in a nontrivial space::
 
-    TESTS:
+        sage: set_random_seed()
+        sage: K = random_cone(min_ambient_dim = 1, max_rays = 8)
+        sage: L = identity_matrix(K.lattice_dim())
+        sage: is_lyapunov_like(L,K)
+        True
+
+    As is the "zero" transformation::
 
-    todo.
+        sage: K = random_cone(min_ambient_dim = 1, max_rays = 5)
+        sage: R = K.lattice().vector_space().base_ring()
+        sage: L = zero_matrix(R, K.lattice_dim())
+        sage: is_lyapunov_like(L,K)
+        True
+
+    Everything in ``LL(K)`` should be Lyapunov-like on ``K``::
+
+        sage: K = random_cone(min_ambient_dim = 1, max_rays = 5)
+        sage: all([is_lyapunov_like(L,K) for L in LL(K)])
+        True
 
     """
     return all([(L*x).inner_product(s) == 0