]> www.ginac.de Git - ginac.git/blobdiff - check/exam_clifford.cpp
info_flags::expanded added [A.Sheplyakov]
[ginac.git] / check / exam_clifford.cpp
index 6f3f4efdca98c68efb66d9b4e5db99bf3c6a1037..006c07694a6595dcc634faddaaee7f9210833d14 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test GiNaC's Clifford algebra objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -410,13 +410,23 @@ template <typename IDX> unsigned clifford_check6(const matrix &A)
        result += check_equal(canonicalize_clifford(e), 0);
 
 /* lst_to_clifford() and clifford_inverse()  check*/
-       realsymbol x("x"), y("y"), t("t"), z("z");
+       realsymbol s("s"), t("t"), x("x"), y("y"), z("z");
 
        ex c = clifford_unit(nu, A, 1);
        e = lst_to_clifford(lst(t, x, y, z), mu, A, 1) * lst_to_clifford(lst(1, 2, 3, 4), c);
        e1 = clifford_inverse(e);
        result += check_equal_simplify_term2((e*e1).simplify_indexed(), dirac_ONE(1));
 
+/* lst_to_clifford() and clifford_to_lst()  check for vectors*/
+       e = lst(t, x, y, z);
+       result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, false), e);
+       result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, true), e);
+
+/* lst_to_clifford() and clifford_to_lst()  check for pseudovectors*/
+       e = lst(s, t, x, y, z);
+       result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, false), e);
+       result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, true), e);
+
 /* Moebius map (both forms) checks for symmetric metrics only */
        matrix M1(2, 2),  M2(2, 2);
        c = clifford_unit(nu, A);