]> www.ginac.de Git - ginac.git/blobdiff - check/exam_indexed.cpp
synced to 1.2 (typos, better ncmul::degree() and ::coeff())
[ginac.git] / check / exam_indexed.cpp
index 69816a74bcf81c34160d69fddf6a8b9344163340..3d9b307db4f26fdcc33f8a6d245bb97fa41a973c 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test manipulations on GiNaC's indexed objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2004 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
@@ -241,19 +241,17 @@ static unsigned edyn_check()
 
        // Lorentz transformation matrix (boost along x axis)
        matrix L(4, 4);
-       L(0, 0) = gamma;
-       L(0, 1) = -beta*gamma;
-       L(1, 0) = -beta*gamma;
-       L(1, 1) = gamma;
-       L(2, 2) = 1; L(3, 3) = 1;
+       L =       gamma, -beta*gamma, 0, 0,
+           -beta*gamma,       gamma, 0, 0,
+                     0,           0, 1, 0,
+                     0,           0, 0, 1;
 
        // Electromagnetic field tensor
-       matrix F(4, 4, lst(
-                0, -Ex, -Ey, -Ez,
+       matrix F(4, 4);
+       F =  0, -Ex, -Ey, -Ez,
                Ex,   0, -Bz,  By,
                Ey,  Bz,   0, -Bx,
-               Ez, -By,  Bx,   0
-       ));
+               Ez, -By,  Bx,   0;
 
        // Indices
        symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma");