[GiNaC-list] Re: Question regarding using C-XSC and GiNaC together

Alexei Sheplyakov varg at theor.jinr.ru
Thu Jan 31 06:49:48 CET 2008


On Thu, Jan 31, 2008 at 08:47:42AM +0300, Alexei Sheplyakov wrote:

> struct ff 
> {
> 	const ex f0, f1, f2; // should depend on 3 variables
> 	const lst sym;
> 	ff(const ex& f0_, const ex& f1_, const ex& f2_, const lst& sym_) :
> 		 	f0(f0_), f1(f1_), f2(f2_), sym(sym_)
> 	{ }
> 
> 	void operator()(GTvector& res, const GTvector& x) const
> 	{
> 		lst args;
> 		args = x[0], x[1], x[2];
> 		res[0] = f0.subs(sym, args) /* may be .evalf() ? */;
> 		res[1] = f1.subs(sym, args) /* may be .evalf() ? */;
> 		res[2] = f2.subs(sym, args) /* may be .evalf() ? */;
> 		return res;
      ^^^^^^^^^^^

The return statement is not necessary here and is obviously wrong.

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20080131/a67f7101/attachment.pgp


More information about the GiNaC-list mailing list