-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List.Shuffle shuffles nested lists incorrectly #54
Comments
@dimven yep yep! check out the implementation: the new random should be moved to the class level for the behavior you are expecting as it's set to a seed based on the clock. When called all at once we get the same random numbers. @ke-yu what do you think? |
Sounds good to me. Alternatively, we can follow this SO: and give it a unique seed every time. Seems to work well: As a side note, since lists are the backbone of every Dynamo graph and you'd usually use at least a few list methods in every graph, has the team considered replacing some of those LINQ calls for the sake of memory efficiency? |
Not sure if this is a good example, but the below seems to be about twice as fast:
Unless I'm just pushing the burden off to somewhere else, like the marshaller... |
@mjkkirschner we'll still get then same shuffled list each time open dynamo (will we?) if yes then using guid's hashcode or system tick count as see would be more "random" |
This has now been fixed in Dynamo 2.10: https://dynamobim.org/dynamo-core-2-10-release/ |
Dynamo version
ever since 0.82:
http://dynamobim.org/forums/topic/random-list-of-lists/
Operating system
Windows 7
What did you do?
Ran some nested lists through a list-shuffle node
What did you expect to see?
Uniquely shuffled sub-lists
What did you see instead?
Identically shuffled lists:
This was reported previously and ignored:
DynamoDS/Dynamo#5977
The text was updated successfully, but these errors were encountered: