7 Dec
2013
7 Dec
'13
12:03 a.m.
Am Fri, 06 Dec 2013 10:47:19 +0200 schrieb Alexei Sheplyakov <alexei.sheplyakov@gmail.com>:
while using GiNaC, I came across a strange behaviour with pattern matching in products having more than one wildcard. The match succeeded in a probablistic fashion.
Could you please give some examples so I can make a proper test case?
Try this: exmap repl_lst; cout << (t*t*exp(t*A)).match(pow(t, wild(0))*exp(wild(1))*A, repl_lst) << repl_lst << endl; It turns out, my repl_lst was actually prefilled by a failed match before. It didn't fail on its own. But it must somehow be possible to create a Situation where a single match triggers this problem on its own. Kind regards, Matthias