Nothing, really. It just mentions them.... I'll still calculate the intersection point where the lines *would* meet, were they long enough.
Oh, okay.
Though I have to say that it sounds like you are now performing 3 "triangle inequality" checks for every possible triangle (for my 17 node dataset that is 3*15! or nearly 4 Trillion additions and 4 Trillion comparisons) for no real purpose. Ie pure make-work....
For Dirk80's 24 node dataset, that rises to 1.8 trillion trillion redundant calculations.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
BrowserUk:
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.
| [reply] |
Strange ... wrong formula but correct values???
s/2/3/ ;-)
| [reply] |
| [reply] |
| [reply] |