[GiNaC-list] comparing symbols
Jens Vollinga
jensv at nikhef.nl
Thu Jul 24 17:46:50 CEST 2008
Hi,
Chris Bouchard schrieb:
> I'd like to discern when arguments of a pre-defined function
> (from another library, xloops) attain a certain value. One
> of the arguments is type:
>
> lst x(symbol("a"), symbol("b"));
>
> cout << x yields {0,1} and these are the values I'm looking
> for. I'm unable to define a relational that accurately
> tests the values attained by a & b. I tried:
Is it this what you want:
symbol x;
ex e1 = beta(x, lst(0,1));
ex e2 = beta(x, lst(4,1));
if ( e1 == beta(x, lst(0,1)) ) cout << "e1 BINGO" << endl;
if ( e2 == beta(x, lst(0,1)) ) cout << "e2 BINGO" << endl;
Otherwise I do not completely understand your problem yet. Could you
clarify it more, then?
> with no success. How does one set up a conditional for
> symbols that have been assigned numeric values? Any ideas?
That is what confuses me. One cannot assign numerical values to symbols
in GiNaC. One can replace symbols by numbers, of course.
Regards,
Jens
More information about the GiNaC-list
mailing list