[Cmpl] Rank of iteration tupel doesn't match

Maria Giatsoglou maria.giatsoglou at gmail.com
Thu Apr 14 04:36:40 EDT 2016


I am sorry: the previous email was accidentally sent incomplete!
The situation is as follows:

I stumbled upon the following behavior when experimenting with set pattern
matching in Cmpl:

(part of my 'parameters' section)

        A := set(
[1,1,2],[1,2,2],[1,4,8],[2,2,5],[2,3,1],[2,4,9],[3,1,1],[3,3,3] );
B := set( A *> [*,*,/] );
{ i in B: echo i; }
        { [i,j] in B: echo i + "," + j; }

The first loop prints
[1, 1]
[1, 2]
[1, 4]
[2, 2]
[2, 3]
[2, 4]
[3, 1]
[3, 3]

However the second one produces an error with the message "rank of
iteration tupel doesn't match".
Is there any way to access the first and second elements of the resulting
2-tuples (in B) individually?

Best regards,

--
Dr. Maria Giatsoglou
Tel: +306932241224
Skype: maria.giatsoglou
LinkedIn: https://gr.linkedin.com/in/mariagiatsoglou


On Thu, Apr 14, 2016 at 11:32 AM, Maria Giatsoglou <
maria.giatsoglou at gmail.com> wrote:

> Hello,
>
> I stumbled upon the following behavior when experimenting with set pattern
> matching in Cmpl:
>
> (*part of my 'parameters' section*)
>
>         A := set(
> [1,1,2],[1,2,2],[1,4,8],[2,2,5],[2,3,1],[2,4,9],[3,1,1],[3,3,3] );
> B := set( A *> [*,*,/] );
> { i in B: echo i; }
>         { [i,j] in B: echo i + "," + j; }
>
> The first loop prints
>
>
>  rank of iteration tupel doesn't match
>
> --
> Dr. Maria Giatsoglou
> Tel: +306932241224
> Skype: maria.giatsoglou
> LinkedIn: https://gr.linkedin.com/in/mariagiatsoglou
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20160414/bcef4f46/attachment.html>


More information about the Cmpl mailing list