[GiNaC-devel] Re: Clifford base names WAS: Re: [GiNaC-list] How can I get a GiNaC::ex's name

Vladimir Kisil kisilv at maths.leeds.ac.uk
Fri May 25 14:50:17 CEST 2007


		Dear Javier,

>>>>> "JRG" == Javier Ros Ganuza <jros at unavarra.es> writes:
    JRG> It woul be interesting to have this posibility, tough elements
    JRG> of diferent basis are right now plotted in the same way.

	Indeed it may be worth to see a difference in the output for
  Clifford units with different representation labels. I include a
  patch which give this in the way which is shown by such an example:

#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;

int main() {
	try {
		varidx mu(symbol("nu", "\\nu"), 3);
		ex     basis1 = clifford_unit(mu, diag_matrix(lst(1, 1, 1)),0),
		     basis2 = clifford_unit(mu, diag_matrix(lst(1, 1, 1)),1);
		
		ex e00 = basis1.subs(mu == 0),
			e10 = basis2.subs(mu == 0);

		cout << e00 << endl; 
		// <-- e~0
		cout << e10 << endl; 
		// <-- e[1]~0

	} catch  (exception &p) {
			cerr << "Got problem: " <<  p.what() << endl;
	}
}

	Best wishes,
	Vladimir
-- 
Vladimir V. Kisil     email: kisilv at maths.leeds.ac.uk
--                      www: http://maths.leeds.ac.uk/~kisilv/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-c++
Size: 1011 bytes
Desc: Patch for clifford.cpp
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20070525/b1228f2f/attachment.bin


More information about the GiNaC-devel mailing list