Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[viatra-dev] sum "function" in pattern language

Hi,

I have some questions about the pattern language and query based features.

1) Can I calculate the sum of given numbers (integers, floats, etc.) using only the pattern language?

My best idea is only working for integers in a given range, e.g.:

N1 = count find classWithInteger(_,1);
N2 = count find classWithInteger(_,2);
...
SUM = eval(N1+2*N2...);

2) My second question is that currently query based features with the kind "SUM" only supports integers. Is there a plan to make it work with other primitive types such as long and float?

Thanks in advance!

Cheers,
András

Back to the top