in reply to Re^8: Data visualisation.
in thread Data visualisation.
We're only picking three points for each triangle, and the point order doesn't matter, so the number of calls to chk_triangle_inequality during the exhaustive check for your dataset is n!/((n-3)!*3!). For your dataset, it's 680 calls, and 2024 for Dirk80's dataset. If it were trillions of checks, I'd've pressed ^C long before it ended. ;^D
Currently the check is pointless busywork, but since TSP problem is interesting to me, and printing interesting clues might spur ideas, so I threw it in for fun. I frequently litter my programs with print statements showing intermediate steps, or call functions whose results may be interesting. I delete it when it proves valueless to me, and then clean it up when I'm through. But I can't always predict beforehand which functions I'll find to be junk.
For example, when I was playing with your Bloom filter example, I put various print statements in my program, and noticed that one of the values was approaching an "interesting" value, allowing me to figure out the distributions.
Update: As AM said, wrong formula! Fixed.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Data visualisation.
by Anonymous Monk on Jan 05, 2014 at 18:36 UTC | |
|
Re^10: Data visualisation.
by BrowserUk (Patriarch) on Jan 05, 2014 at 18:54 UTC |