Toggle navigation
Egison
Documentations
Try It Out
Online Tools
Online Egison Interpreter
Online Egison Tutorial
Online Demonstrations
Poker Hands
Mahjong
Prime Numbers
Trees
Graph (Bellman-Ford Algorithm)
Randomized 3-SAT
Time-Series Data
Math
Blog
Community
Wedge Product
Nov 20 2017
-- -- Wedge Product -- declare symbol x, y, z: MathExpr def N : Integer := 3 def params : Vector MathExpr := [|x, y, z|] def g : Matrix Integer := [|[|1, 0, 0|], [|0, 1, 0|], [|0, 0, 1|]|] def dx : DiffForm Integer := [|1, 0, 0|] def dy : DiffForm Integer := [|0, 1, 0|] def dz : DiffForm Integer := [|0, 0, 1|] assertEqual "dx ∧ dy" (dx ∧ dy) [| [| 0, 1, 0 |], [| 0, 0, 0 |], [| 0, 0, 0 |] |] assertEqual "dx ∧ dy (normalized)" (dfNormalize (dx ∧ dy)) [| [| 0, 1 / 2, 0 |], [| -1 / 2, 0, 0 |], [| 0, 0, 0 |] |] assertEqual "dz ∧ dz" (dz ∧ dz) [| [| 0, 0, 0 |], [| 0, 0, 0 |], [| 0, 0, 1 |] |] assertEqual "dz ∧ dz (normalized) = 0" (dfNormalize (dz ∧ dz)) [| [| 0, 0, 0 |], [| 0, 0, 0 |], [| 0, 0, 0 |] |]
Links
Back to the Table of Contents
This website in other langauge:
English
,
日本語