in reply to How many triangles does your perl script "see"?

35 triangles found when I quit ignoring some lines in a misguided optimization. Thanks again to Perl Mouse for posting something which showed that I was missing some results.

27 triangles found when I accounted for lines that don't actually exist. This corrects the problem that Perl Mouse found.

46 triangles found when I stopped to remove lines. Again, this takes no time worth reporting.

51 triangles found, no runtime worth reporting. Except that drat, I didn't notice that some "triangles" are actually just line segments.

Replies are listed 'Best First'.
Re^2: How many triangles does your perl script "see"?
by Perl Mouse (Chaplain) on Oct 27, 2005 at 16:20 UTC
    If I run your program, it tells me that 'A - B - H' is a triangle - however, there's no line between A and H.
    Perl --((8:>*