Skip to main content

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

Hi,

1) I don’t see any other way to describe this goal in the query language.

2) This is a long-running issue with IncQuery (https://bugs.eclipse.org/bugs/show_bug.cgi?id=398769); it is currently unsupported. It is highly unlikely that this will change for 1.2; on the other hand, it is still planned for 1.3.

Cheers,
Zoli
-- Zoltán Ujhelyi

Eclipse Technologies Expert
IncQueryLabs Ltd.

> On 25 Mar 2016, at 14:09, András Szabolcs Nagy <nasz013@xxxxxxxxx> wrote:
> 
> 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
> _______________________________________________
> viatra-dev mailing list
> viatra-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/viatra-dev


Back to the top