Either use arrays, or you could check out OrderedSet from DataStructures.jl.

On Wed, Sep 16, 2015 at 4:52 PM, Michela Di Lullo <
[email protected]> wrote:

> Hello everyone,
>
> does someone know why when I create a set, (sometimes) it automatically
> re-orders the elements in it?
> in example, if I have:
>
> *vector1=[1,2]*
> *vector2=[3,4]*
> *vector3=[5,6]*
> *vector4=[7,8]*
>
> *vector=Set({vector1, vector2, vector3, vector4})*
>
> Set{Any}({[7,8],[1,2],[3,4],[5,6]})
>
> *for i in vector*
>
> *       @show i      *
>
> * end*
>
> i => [7,8]
>
> i => [1,2]
>
> i => [3,4]
>
> i => [5,6]
>
>
> How could I force it not to re-order the elements in the set?
>
>
> Thank you in advance for any information,
>
>
> Michela
>

Reply via email to