Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: razzle

Page 1 of 23 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: Problem: Analysis and evaluation algorithms

    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.
  2. Re: The core of the core of the big data solutions -- Map

    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...
  3. Thread: Data strucures

    by razzle
    Replies
    4
    Views
    221

    Re: Data strucures

    http://en.wikipedia.org/wiki/Row-major_order
  4. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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...
  5. Replies
    8
    Views
    347

    Re: project on c++ programming

    It looks overly complicated since you only need to check whether the vector dot-product is 0 like this,



    bool isrightangle(int xa, int xb, int xc, int ya, int yb, int yc) {
    return...
  6. Replies
    8
    Views
    347

    Re: project on c++ programming

    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...
  7. Replies
    8
    Views
    347

    Re: project on c++ programming

    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...
  8. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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...
  9. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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...
  10. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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...
  11. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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.
  12. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    You forgot to supply the references.
  13. Replies
    2
    Views
    176

    Re: Outlier Detection Algorithm

    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.
  14. Replies
    10
    Views
    383

    Re: A question regarding stack size

    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...
  15. Re: What is the optimal solution for the game "Puzzle+"?

    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...
  16. Replies
    10
    Views
    383

    Re: A question regarding stack size

    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...
  17. Re: What is the optimal solution for the game "Puzzle+"?

    Well, it didn't work. Too bad. :)
  18. Re: What is the optimal solution for the game "Puzzle+"?

    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...
  19. Re: What is the optimal solution for the game "Puzzle+"?

    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...
  20. Re: Well-written parallelised code using C++11 features?

    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 "mind-list" reply.
  21. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    Are you sure. I think it could look quite impressive. :)



    inline unsigned seeder() {
    static unsigned seed = std::random_device{}();
    return seed++;
    }
  22. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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...
  23. Replies
    35
    Views
    1,066

    Re: Seeding a C++11 random

    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.
  24. Replies
    6
    Views
    334

    Re: A question regarding multiple inheritance

    Yes that's what I intuitively expect. All virtually inherited Bases are merged into one copy in the derived object, whereas all non-virtually inherited Bases show up as one copy each.

    In my case...
  25. Re: Well-written parallelised code using C++11 features?

    Well, as I said nVidia is working on it with their Unified Memory concept,

    http://devblogs.nvidia.com/parallelforall/unified-memory-in-cuda-6/

    And Khronos is playing catch-up with SYCL it...
Results 1 to 25 of 569
Page 1 of 23 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center