November 24th, 2009, 12:08 PM
Thanks for the tip on nth_element. That clearly involves less work. That will at best be O(n) I see.
November 24th, 2009, 12:01 PM
Head-smacker. Of course. You mean just write a comparison that really compares the x value, right? I hate not seeing the obvious ones. :)
November 24th, 2009, 11:52 AM
If I wanted to use partial_sort() to find the first k of n values (because of the O(n log k) complexity), is there any way to retrieve the original indices of the sorted vector? I need them to access...
March 12th, 2009, 11:39 AM
The functions are fairly singular in task. The problem is that logically, inTetr is part of the description of a node. It's a piece of information that's actually needed by a multitude of...
March 12th, 2009, 10:24 AM
Ah, okay. That's a head-slapper. I was using the reference operator, but I wasn't placing the parentheses. Though it makes perfect sense why that would be necessary.
I knew about the swap trick,...
March 11th, 2009, 03:42 PM
I have a rather large, memory intensive program that I'm trying to slim down. Within this program are class instances parts of which have to persist to the end of the run and parts of which...