summaryrefslogtreecommitdiffstats
path: root/2.py
diff options
context:
space:
mode:
authortanyaionova <isaqtm@gmail.com>2019-11-21 20:57:52 +0300
committertanyaionova <isaqtm@gmail.com>2019-11-21 20:57:52 +0300
commit275a6f805ecd7263bb4a8e0d495a19d237ee2f4d (patch)
treedacdba5d345a6bbc974f2a57261ce88158a72529 /2.py
parentea43333d6af8f30c63ff49baaa9911011c3b695b (diff)
downloadalg2-275a6f805ecd7263bb4a8e0d495a19d237ee2f4d.tar.gz
Add script
Diffstat (limited to '2.py')
-rw-r--r--2.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/2.py b/2.py
new file mode 100644
index 0000000..2e50ff3
--- /dev/null
+++ b/2.py
@@ -0,0 +1,33 @@
+from libsolve import *
+
+m = Matrix([
+ [1, 1, -1, 1],
+ [-1, -2, 2, -2],
+ [1, 2, -1, 3],
+ [-1, -2, 1, -2]
+])
+
+i = Matrix([
+ [1, 0, 0, 0],
+ [0, 1, 0, 0],
+ [0, 0, 1, 0],
+ [0, 0, 0, 1]
+])
+
+
+for mat in [m, i]:
+ mat.make_S(1, 0, 2)
+ mat.make_S(2, 3, 1)
+ mat.make_U(0, 1)
+ mat.make_U(2, 3)
+ mat.make_S(2, 1, 1)
+ mat.make_S(1, 2, 1)
+ mat.make_S(2, 3, 1)
+ mat.make_S(1, 0, -1)
+ mat.make_U(1, 2)
+ mat.make_D(1, -1)
+ mat.make_D(2, -1)
+
+
+print(m)
+print(i)