diff options
Diffstat (limited to 'examples/lie.hs')
-rw-r--r-- | examples/lie.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/lie.hs b/examples/lie.hs index db21ea8..4933df6 100644 --- a/examples/lie.hs +++ b/examples/lie.hs | |||
@@ -1,8 +1,8 @@ | |||
1 | -- The magic of Lie Algebra | 1 | -- The magic of Lie Algebra |
2 | 2 | ||
3 | import Numeric.LinearAlgebra | 3 | {-# LANGUAGE FlexibleContexts #-} |
4 | 4 | ||
5 | disp = putStrLn . dispf 5 | 5 | import Numeric.LinearAlgebra |
6 | 6 | ||
7 | rot1 :: Double -> Matrix Double | 7 | rot1 :: Double -> Matrix Double |
8 | rot1 a = (3><3) | 8 | rot1 a = (3><3) |
@@ -58,8 +58,8 @@ main = do | |||
58 | exact = rot3 a <> rot1 b <> rot2 c | 58 | exact = rot3 a <> rot1 b <> rot2 c |
59 | lie = scalar a * g3 |+| scalar b * g1 |+| scalar c * g2 | 59 | lie = scalar a * g3 |+| scalar b * g1 |+| scalar c * g2 |
60 | putStrLn "position in the tangent space:" | 60 | putStrLn "position in the tangent space:" |
61 | disp lie | 61 | disp 5 lie |
62 | putStrLn "exponential map back to the group (2 terms):" | 62 | putStrLn "exponential map back to the group (2 terms):" |
63 | disp (expm lie) | 63 | disp 5 (expm lie) |
64 | putStrLn "exact position:" | 64 | putStrLn "exact position:" |
65 | disp exact | 65 | disp 5 exact |