[GiNaC-list] indexed object

Gilson Dallabona gilson.dallabona at gmail.com
Fri Nov 2 13:04:46 CET 2007


Thanks for your suggestion.
That also works for indices of class varidx.

Gilson.

2007/10/27, Richard B. Kreckel <kreckel at 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 at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-list
>


More information about the GiNaC-list mailing list