Question: Convert list with vectors to set

When converting a list which includes lists to a set, duplicate entries are dropped.

However converting a list with vectors to a set, no duplicate entries are dropped.

Any explanation to that behaviour?

a := {Vector(2, [1, 0]), Vector(2, [2, 0])}

{Vector[column](%id = 36893490347685388884), Vector[column](%id = 36893490347685389004)}

(1)

b := [Vector(2, [1, 0]), Vector(2, [2, 0]), Vector(2, [1, 0])]

[Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)]

(2)

c := convert(b, set)

{Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)}

(3)

d := [[1, 0], [2, 0], [1, 0]]``

[[1, 0], [2, 0], [1, 0]]

(4)

e := convert(d, set)

{[1, 0], [2, 0]}

(5)

``

Download DuplicateEntries.mw

Please Wait...