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 24 1 2 3 4

Search: Search took 0.02 seconds.

  1. Re: A question regarding the size of a class with virtual functions

    It's implementation dependent so it's not part of the C++ language and nothing of great concern in everyday programming unless you're writing a C++ compiler or studying compiler technology.

    But...
  2. Replies
    7
    Views
    343

    Re: An interesting multithreading question

    I would use a thread-safe producer-consumer queue. The producer threads push integers on the queue at any time. The consumer thread pops the integers one by one as they arrive and prints them on the...
  3. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    You can contact the author(s) directly. They may be prohibited to send you the article but maybe they can provide other valuable information like discussing your problem, give hints, suggest other...
  4. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    This is the article title,

    "Thermochemical Analysis of Biomass Gasification by Gibbs Free Energy Minimization Model—Part: I (Optimization of Pressure and Temperature)".

    It's in "International...
  5. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    One big advantage with simulated annealing (over other more mathematically involved optimization methods) is that it's so simple. Here's a very hands-on tutorial I found. It should be easily adapted...
  6. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    Well, simulated annealing uses the notion of "temperature" even though physical temperature may not be a simulation parameter. But in your case temperature variation seems to play a natural role so...
  7. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    Well it's impossible to tell whether a screwdriver or a hammer is the solution unless you know whether the problem is a screw or a nail.

    The first step is to come up with a problem formulation.
  8. Replies
    12
    Views
    311

    Re: Minimization gibbs free energy using MatLab

    You can use simulated annealing,

    http://en.wikipedia.org/wiki/Simulated_annealing
  9. Replies
    6
    Views
    263

    Re: Resetting an array

    You could "unroll" the loop like,



    myarray[0]=0;
    myarray[1]=0;
    myarray[2]=0;
    ...
    myarray[99]=0;
  10. Thread: awesome

    by razzle
    Replies
    3
    Views
    241

    Re: awesome

    Yes that's truely awesome. :)
  11. Re: Can't find a C++ cast to work for this conversion

    Well I see now it was added to the standard in 2003 already. I remove the claim from my post.
  12. Re: [RESOLVED] Can't find a C++ cast to work for this conversion

    Regardless of style, casting is never good for code safety. Casting only means you take full responsibility for any dire consequences of going against the compiler.

    In this case if func() modifies...
  13. Re: Can't find a C++ cast to work for this conversion

    If func() is expecting a C-string you need to add on a terminating null, like



    std::vector<unsigned char> data(temp.begin(), temp.end());
    data.push_back('\0'); // add on null
    func(&data[0]);
  14. Re: Is it possible to switch from release- to debug-mode ...

    I would modify my simulation program so it can be stopped and restarted again from a certain point. This means you need to be able to save the simulation state on file after a certain number of...
  15. Replies
    12
    Views
    454

    Re: Basic operator overloading

    I'm using the slightly different "friend" approach. I've found it to be very simple, safe and straightforward. Not all operators can be friends but most can. I'm using it for small primitive-like...
  16. Replies
    36
    Views
    1,483

    Re: Seeding a C++11 random

    Then please explain why not. Why isn't it an important result of Kolmogorov theory that most sequences are close to random and the more regular the fewer they are? It's not only another example of...
  17. Re: The core of the core of the big data solutions -- Map

    Too bad because this is an English language forum.

    And generally, if you don't know (written) English it's very hard to communicate with an international computer science audience.

    Anyway good...
  18. 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.
  19. 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...
  20. Thread: Data strucures

    by razzle
    Replies
    4
    Views
    313

    Re: Data strucures

    http://en.wikipedia.org/wiki/Row-major_order
  21. Replies
    36
    Views
    1,483

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

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

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

    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...
  25. Replies
    36
    Views
    1,483

    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...
Results 1 to 25 of 588
Page 1 of 24 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