- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
15 Posted Topics
So, I just did a fresh install of ubuntu 11.10, and am in the process of reinstalling gsl. For some reason, my old make file seems not to work, and am trying to figure out how to change it. Last time I had a similar problem, people in here were … | |
(I hope this is not already covered in another post, a quick search didn't turn up anything in the archive) So, I have recently made a lot of changes to a program, and want to quantify what those changes have done to the speed. Let us call the old version … | |
Am, with baby steps, becoming acquainted with the boost library. So far I'm compiling examples. From the tutorial, there is a very short regex-example, mostly there to test that the library is linked correctly: [CODE]#include <boost/regex.hpp> #include <iostream> #include <string> int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: … | |
Re: so, first of all (this seems like a very large program for at pretty small calculation?) you have misunderstood how input/output works in C++. You need to define your functions along the line: [CODE] ouputType funcName(inputs){ return outputVal; } [/CODE] So, for instance, you second one, "getSelection" should be [CODE] … | |
So, in the course of a numerical simulation I have noticed that if I save and load the state of my system (a large number of doubles), the following behavior of the system will be slightly different from if I just kept the info "inside the program" and didn't bother … | |
So, this is probably a bit abstract, and I apologize if the title was imprecise: I have a simulation class, which contains a vector of objects of class A, the member functions of which depend on parameters a,b,c: [CODE] class SIMULATION { vector<A> array; }; class A { A(a,b,c); } … | |
Job: my class "network" contains a vector "taus". I wish "network" to be able to find the indexes of the n smallest elements. My first idea was along the lines (this is mostly meant as pseudo-code): [CODE] #include<algorithm> #include<vector> #include<cstdlib> class network { vector <double> taus; vector <int> nsmallest; vector … | |
Re: suppose in your date example that you wanted to make a calendar for all your arrangements the coming year. Let's say you have 200 arrangements already. You're not going to make 200 individual variables, each with different names. Instead, you would allocate room for one big variable containing 200 arrangements, … | |
So, in the course of a simulation of a neural network I have two classes: neurons and synapses (which are basically the coupling between neurons). Synapses mediate information between neurons, so a neuron has to be able to speak to a synapse, and that synapse has to be able to … | |
So, I am sure everybody has been here, but just to describe it properly, a short story: I am writing a (to me) somewhat complicated program. By changing the input parameters I suddenly start getting a run-time error. After several hours of placing more or less meaningful printing-commands around the … | |
So, due to my last question, [url]http://www.daniweb.com/forums/thread303487.html[/url], I am becoming acquainted with the vector template. However, I clearly am not using the commands correctly. Below is a section of code which, eventually, leads to a segmentation fault later in the program. First an introduction of the variables: [CODE] using namespace … | |
So, in advance, I have to admit that this is not quite as "good" a question as what is otherwise found here. It's not about a weird error, or something I can't figure out to do. I just get weird output. I've spent around 2 days simplifying the code, trying … | |
So, in the course of a bigger project, I need to generate normally distributed random numbers. I've decided to try to use the GSL rng library. From [URL="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Generator-Examples.html"] the gsl webpage[/URL] I got an example code, just to get an idea of how the interface works. The program looks like: … | |
So, I'm still working on my matrix class (in case anyone reading this also read my thread from the other day). I really like the array-feature that I can initialize an array with a list of numbers, such as [CODE]double array[2]={1,2};[/CODE] and would like to implement that in my matrix … | |
So, in the course of trying to write my own matrix-class (as an exercise, if nothing else), I ran across the following problem, exemplified in a dummy class: [CODE]class dummy { public: int a; int b; dummy(int a, int b): a(a), b(b) {}; dummy& operator=(dummy &rhs) { a=rhs.a; b=rhs.b; return … |
The End.