[Cmpl] Rank of iteration tupel doesn't match

Mike Steglich mike.steglich at stegger.net
Fri Apr 15 09:19:21 EDT 2016


Hi Maria,

I try to find a workaround. Which operating system do you use?


Thanks,

Mike
> Am 14.04.2016 um 10:36 schrieb Maria Giatsoglou <maria.giatsoglou at gmail.com>:
> 
> 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 <https://gr.linkedin.com/in/mariagiatsoglou>
> On Thu, Apr 14, 2016 at 11:32 AM, Maria Giatsoglou <maria.giatsoglou at gmail.com <mailto: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 <tel:%2B306932241224>
> Skype: maria.giatsoglou
> LinkedIn: https://gr.linkedin.com/in/mariagiatsoglou <https://gr.linkedin.com/in/mariagiatsoglou>
> _______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20160415/9eb9c50e/attachment.html>


More information about the Cmpl mailing list