Search:
Type: Posts; User: razzle
Search:
Search took 0.04 seconds.

March 25th, 2015, 09:50 AM
1. First find all paths between u and v.
2. Then identify all pairs of paths with no common edges.
3. Finally pick the pair with the shortest total length.

March 25th, 2015, 01:37 AM
Perfect hashing comes at a cost and it will show up somewhere eventually. There is no free lunch.
But by all means, if you have revolutionized hashing then I suggest you write a scientific...

March 24th, 2015, 03:49 AM
http://en.wikipedia.org/wiki/Rowmajor_order

March 20th, 2015, 06:00 PM
I don't quite follow your argumentation but I know what I mean so I concentrate on that.
With a regular sequence I mean a sequence that has low Komogorov complexity. The man in the street...

March 18th, 2015, 11:18 AM
It looks overly complicated since you only need to check whether the vector dotproduct is 0 like this,
bool isrightangle(int xa, int xb, int xc, int ya, int yb, int yc) {
return...

March 18th, 2015, 04:26 AM
Note that equality shouldn't be tested using == when floating point variables are involved. It's because of the rounding properties of floating points that will introduce small errors so an equality...

March 17th, 2015, 01:55 AM
You can use the Pythagorean theorem.
First calculate the length of all sides of the triangle, say they are a,b and c. Then identify the longest, say it's c. Now the Pythagorean theorem states that...

March 16th, 2015, 07:30 AM
And there's a reason for this as I explained in my post #31.
When presented with a sequence and asked to assess how random it is the man in the street will evaluate it in the Kolmogorov...

March 16th, 2015, 05:39 AM
I don't agree with this. The man in the street is almost always on the spot. For example when asked which of 1,2,3,4,5,6 or 3,5,1,2,2,4 is the least random he will almost always pick the former with...

March 15th, 2015, 05:21 AM
The discussion was pertaining to the properties of the random generation itself, not to changes in the probilistic experiment (the simulation).
It's a big difference if a game simulation is...

March 13th, 2015, 05:59 PM
You're missing the point.
If the simulated situation doesn't fit the real situation then there will be a difference. It isn't harder than that.

March 13th, 2015, 05:40 PM
You forgot to supply the references.

March 13th, 2015, 05:28 PM
If you're just in a hurry, buy a faster computer. I'm sure you can afford it.
Otherwise drop the lingo. Explain your problem mathematically.

March 13th, 2015, 05:10 PM
Well in the OP's case there is a guaranteed limit to the calling depth indeed. It cannot be bigger than the length of the list.
That's what I call blind hatred. You hate recursion so much that you...

March 13th, 2015, 04:58 PM
My (failed) approach was to first clear the N by M board above the two bottom rows and then solve the remaining 2 by M board by just toggling the bottom line.
For an N by 3 board this didn't work...

March 13th, 2015, 12:34 AM
I wouldn't use recursion unless the list was guaranteed to be very small. There's a special form of recursion called tail recursion where the stack doesn't grow thanks to optimization but it doesn't...

March 13th, 2015, 12:18 AM
Well, it didn't work. Too bad. :)

March 12th, 2015, 06:07 AM
I'll try to understand your strategy but I'm investigating a strategy that builds on the board reduction I mentioned.
From what I can see it's possible to clear the board down to the last two rows...

March 12th, 2015, 01:22 AM
What do you man by guessing the first row?
You can clear a row by toggling the row immediately underneath it. This means the whole top of a board can be very cheaply cleared leaving 3 rows at the...

March 10th, 2015, 05:05 PM
It certainly has. Try it out and you'll understand.
I know and that's what I told the OP when I saw your irrelevant "mindlist" reply.

March 10th, 2015, 12:30 PM
Are you sure. I think it could look quite impressive. :)
inline unsigned seeder() {
static unsigned seed = std::random_device{}();
return seed++;
}

March 10th, 2015, 07:03 AM
And that corresponds very well with the number of collisions you can expect when you draw 1.000.000 numbers at random from the unsigned int range (0 through 4.294.967.295). I modified a section of...

March 10th, 2015, 05:28 AM
You could have a Singleton with a seed function. The first time it's called it returns a seed number based on the system clock. All subsequent calls return the previous seed number + 1.

March 10th, 2015, 12:57 AM
Yes that's what I intuitively expect. All virtually inherited Bases are merged into one copy in the derived object, whereas all nonvirtually inherited Bases show up as one copy each.
In my case...

March 9th, 2015, 12:50 PM
Well, as I said nVidia is working on it with their Unified Memory concept,
http://devblogs.nvidia.com/parallelforall/unifiedmemoryincuda6/
And Khronos is playing catchup with SYCL it...

Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.
Featured
