Search:

Type: Posts; User: SevenThunders

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    3,719

    That's totally the wrong approach for higher...

    That's totally the wrong approach for higher dimensional integration. The complexity becomes prohibitive, since it's the cube of your grid size. Try monte carlo integration instead. Heck it's...
  2. Replies
    6
    Views
    1,623

    Even your matrix test for compatibility is...

    Even your matrix test for compatibility is backwards I'm afraid. If C = A * B then, rC = rA, cC = cB and cA = rB, where the prefix r means number of rows and c number of columns.

    The formula...
  3. laserlight is correct as usual. The epsilon...

    laserlight is correct as usual. The epsilon determines when you want your program to stop and the accuracy of your solution. Your solution is accurate down to 10^5 in the x^2 space, but probably...
  4. Replies
    42
    Views
    5,068

    The basic idea with the linear congruential...

    The basic idea with the linear congruential number generators that are the core of rand() is to create a sequence of numbers with a very large period. That is the sequence doesn't repeat itself...
  5. Replies
    42
    Views
    5,068

    Well let me help you with some fiendishly clever...

    Well let me help you with some fiendishly clever random number generators, from some obsessed hardware hackers with good performance.



    #include <stdint.h>

    /* These state variables must be...
  6. Replies
    4
    Views
    5,253

    Remember those old HP calculators back in the day...

    Remember those old HP calculators back in the day when HP was an innovative company? If you can believe this, back in the 1980s HP had a series of programmable calculators that used reverse polish...
  7. OK that's interesting. So C++11 allows for...

    OK that's interesting. So C++11 allows for arbitrary operator declarations? It's late so maybe I'm reading that wrong.

    What I'm trying to do is to facilitate the calling of a compiled array of...
  8. Replies
    42
    Views
    5,068

    Well the first thing you need to know, is that...

    Well the first thing you need to know, is that rand() is not random. It's deterministic. It only superficially behaves like a random number, hopefully having good correlation properties among it's...
  9. Yup I know this. My little problem is that the...

    Yup I know this. My little problem is that the type of function pointer I'm trying to declare returns a pointer of the same type. Actually it also has an argument of the same type. The type is...
  10. Replies
    5
    Views
    960

    But this problem can be solved in closed form on...

    But this problem can be solved in closed form on a piece of paper and the result can be calculated in seconds using an engineering calculator. I suspect the teacher wants you to essentially mimic...
  11. This is a math problem actually. If the...

    This is a math problem actually. If the numerator and denominator are mutually prime (coprime) then it is already in it's simplest form. The best algorithm to figure out if they are mutually prime...
  12. Function Pointer Typedef with Same Type Arguments

    I need to create the following brain damaging abomination:
    I need a function pointer type to a function that has an argument of the same function pointer type and returns the same function pointer...
  13. Replies
    7
    Views
    2,015

    Interesting point actually. Unless I declared it...

    Interesting point actually. Unless I declared it twice (scrambling to double check), I did have the same declaration in both definition and implementation (I did). I suppose it would be too much...
  14. Replies
    7
    Views
    2,015

    Overly Strict Const Overloading

    I've run into some strange linkage problems with gcc (and MSVC) with regards to finding an overloaded stream operator in a C++ library I created. The gist of it is very simple, I have a class...
  15. Replies
    5
    Views
    1,321

    OK I used some inlining and was able to extract a...

    OK I used some inlining and was able to extract a 'declaration' only version of my header in about an hour or so of work. I then just copied the original header into my .cpp source file.

    Not too...
  16. Replies
    5
    Views
    1,321

    Yes I have guards or perhaps it's a #pragma once...

    Yes I have guards or perhaps it's a #pragma once for my compiler. My problem is this: If you have an implementation of a method or function inside of a header, you end up with multiple copies of...
  17. Replies
    5
    Views
    1,321

    Template Header Shot my foot

    OK I've built up this complex set of classes initially using a lot of template meta programming. I did this to make the compiler do a lot of work beforehand for performance reasons.

    Well over...
  18. I've been asked about abstract classes, virtual...

    I've been asked about abstract classes, virtual functions, inheritance and even a little template programming. All this and I'm not even a computer science major, I'm an EE.

    They just want to...
  19. Replies
    13
    Views
    6,491

    OK I can see the logic of that. My only problem...

    OK I can see the logic of that. My only problem is that when I adhere by this I seem to get a lot errors from MS Visual studio with regards to passing non constant parameters into the arguments. I...
  20. Replies
    13
    Views
    6,491

    Thanks a bunch guys. You saved me some hours of...

    Thanks a bunch guys. You saved me some hours of grief here. How do you keep track of these wretched details?



    grumpy is that specified by the standard or is there some logic to this? I...
  21. Replies
    13
    Views
    6,491

    Gcc can't find obvious copy constructor

    Here is another lovely example of some code that MS vis studio compiles and runs correctly but that gcc can't compile and just chokes.




    /* templated matrix class */
    template<typename ftype>...
  22. OK the only way I can get this to work is to...

    OK the only way I can get this to work is to throw out function templates all together for template recursion and go strictly with function overloading.

    The overloaded function is a member of a...
  23. More explicit template member function hell

    For some reason with gcc 4.3 I can not solve the problem of explicit template member function instantiation. C++ restrictions and some compiler quirks have thwarted my efforts.

    Here is my code...
  24. I cant seem to get that to happen via MS VC which...

    I cant seem to get that to happen via MS VC which does compile with references to the parent class variables.

    Maybe I did something wrong.



    #include <iostream>


    template<int i>
  25. Why not simply check the available possible...

    Why not simply check the available possible resolutions for f, and only report the error if such an ambiguity arises? That would be a more liberal compiler protocol and give us perfectly reasonable...
Results 1 to 25 of 141
Page 1 of 6 1 2 3 4