I am using the "set([])" function, and is a set of vectors, I want to convert it to a set because I want to use the methods for sets
On Sep 25, 9:09 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > cesarnda wrote: > > is there a function that can convert a list to a set without verifying > > if there are equal elements?, i.e., I am creating a large set > > (cardinality = 9^5) of vectors, so the constructions takes too long > > ( around 25 seconds), but I know all the vectors are distinct, so is > > there a way to add an element into a set without verifying if the > > element is already in the set? or > > What sort of sets are you using? The python sets use a dictionary, so > it is generally very fast to see if an element already exists in the set. > > If you know everything is distinct, why don't you just keep it as a list? > > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
