Hi, I'm a new user of Ginac and I have found a problem. I need to define an indexed object with six indices or more. However, for an indexed object with more than four indices the compilation returns an error. A simple example is: symbol Delta("Delta"); varidx mu(symbol("mu"),4), nu(symbol("nu"),4), alpha(symbol("alpha"),4), beta(symbol("beta"),4), sigma(symbol("sigma"),4), lambda(symbol("lambda"),4); ex e = indexed(Delta,mu,nu,alpha,beta,alpha,beta); cout << e << endl; returns a compilation error like this "error: no matching function for call to 'GiNaC::indexed::indexed(GiNaC::symbol&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&)" Is there a way to define an indexed object with more than four indices in Ginac? Thanks, Gilson.
Gilson Dallabona wrote:
I'm a new user of Ginac and I have found a problem. I need to define an indexed object with six indices or more. However, for an indexed object with more than four indices the compilation returns an error. A simple example is:
symbol Delta("Delta"); varidx mu(symbol("mu"),4), nu(symbol("nu"),4), alpha(symbol("alpha"),4), beta(symbol("beta"),4), sigma(symbol("sigma"),4), lambda(symbol("lambda"),4);
ex e = indexed(Delta,mu,nu,alpha,beta,alpha,beta); cout << e << endl;
returns a compilation error like this
"error: no matching function for call to 'GiNaC::indexed::indexed(GiNaC::symbol&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&)"
Is there a way to define an indexed object with more than four indices in Ginac?
Just use this indexed constructor signature: indexed::indexed(const ex & b, const exvector & iv). It constructs an indexed object with a specified vector of indices. The indices must be of class idx. -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Thanks for your suggestion. That also works for indices of class varidx. Gilson. 2007/10/27, Richard B. Kreckel <kreckel@ginac.de>:
Gilson Dallabona wrote:
I'm a new user of Ginac and I have found a problem. I need to define an indexed object with six indices or more. However, for an indexed object with more than four indices the compilation returns an error. A simple example is:
symbol Delta("Delta"); varidx mu(symbol("mu"),4), nu(symbol("nu"),4), alpha(symbol("alpha"),4), beta(symbol("beta"),4), sigma(symbol("sigma"),4), lambda(symbol("lambda"),4);
ex e = indexed(Delta,mu,nu,alpha,beta,alpha,beta); cout << e << endl;
returns a compilation error like this
"error: no matching function for call to 'GiNaC::indexed::indexed(GiNaC::symbol&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&, GiNaC::varidx&)"
Is there a way to define an indexed object with more than four indices in Ginac?
Just use this indexed constructor signature: indexed::indexed(const ex & b, const exvector & iv). It constructs an indexed object with a specified vector of indices. The indices must be of class idx.
-richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/> _______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de https://www.cebix.net/mailman/listinfo/ginac-list
participants (2)
-
Gilson Dallabona
-
Richard B. Kreckel