Sign in to follow this  

Python Comparing instances?

Recommended Posts

I hope this makes sense I have an Array of instances representing particles, and i want to compare the distance between each particle pair for example say i have an array [a, b, c] representing 3 particles a, b, c how do i compare/ code it so that i get the difference between pairs a,b a,c b,c only rather that comparing the distances multiple times (getting repetive comparisons)between particles ie a,a a,b a,c b,a b,b b,c c,a c,b c,c

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this