Thanks for your response Elysia. Would also like some advice on the problem I am trying to solve.
I am trying to solve differential equations involving matrices like y=A*x+B*u. Here y, x, u are...
Type: Posts; User: circuitbreaker
Thanks for your response Elysia. Would also like some advice on the problem I am trying to solve.
I am trying to solve differential equations involving matrices like y=A*x+B*u. Here y, x, u are...
After reading on expression templates particularly the link below, I have a few basic questions:
AngelikaLanger.com - Expression Templates - Angelika Langer Training/Consulting
The above...
Thank you very much for your responses Phantomotap and Elysia. I'll do some more reading before I write some more code and then I'll post again.
Hello all,
I am trying to use expression templates/template metaprogramming to solve matrix systems at compile time. Since I am just starting, I need some help to make sure I am on the right...
tabstop:
Will try it out and let you know.
Thanks.
Thanks laserlight and grumpy for your responses.
For now I need to improve on the solver I am using and decouple the static part of the circuit from the dynamic part.
But a question for you...
Hello all,
I am trying to build an electrical simulator in C++. This will involve matrix manipulations to a great deal and so I created in my own class Matrix. I have overloaded all operators such...
Thanks Laserlight, Elysia and Grumpy.
Matrix(unsigned int x = 0, unsigned int y = 0) : rows(x), columns(y) {
Would the above code be equivalent to
Matrix(unsigned int x = 0, unsigned int y = 0) {
rows=x;
columns=y;
Thanks for the responses. I included the copy constructor and a destructor in my class declaration. The program works fine. One more question:
I have the following constructors in my class...
I am trying to write my own class Matrix that dynamically allocates two dimensional arrays and contains functions to perform addition, subtraction etc on objects of class Matrix. I have a few...
Using the -ON optimization options reduces run times to 9.6s. I used all various levels but couldn't get run times lesser than that. Guess I'll use gcc 4.1.2 on all my computers.
Thanks.
Thanks for the responses.
I am attaching the program.
Hi all,
In my home computer I've got Slackware 12 with gcc 4.1.2. I wrote a C++ program (could attach the code if you want) and I got a run time of around 2.2s. I transferred the same C++ program to...
Thanks anon, Elysia and cpjust. I'll read up more on this assert().
Thanks CornedBee. I'll give up on this one.
I am writing a class for matrices by the name of Matrix. I have an empty constructor Matrix() where I initialize the dimensions (rows and columns) of the matrix to zero. This is because I would like...
Thanks vart.
In C I used functions where the return array and the arrays to be operated on were passed as references. That code though working under many different conditions is a little hard to...
I added a copy constructor to both programs and I get the same problem.
My question is why does dynamic_array_trial.cpp compile and run without any error while runge_kutta1.cpp gives a seg fault?...
I had written a C++ program to manipulate two dimensional matrices using classes. Initially all the arrays within the class matrix were of fixed dimensions. I am trying out dynamic memory allocation...
Thanks Elysia, Laserlight and CornedBee.
Sorry if I sound like a dumbass but I just started coding in C++ and am taking time figuring out some stuff.
Suppose I make a change in the code:
matrix matrix::operator=(const matrix...
Thanks Elysia.
I also found this very interesting link about the use of const:
http://www.parashift.com/c++-faq-lite/const-correctness.html
Hello all,
I had posted a code regarding operations of matrices leading to a function using these matrix operations iteratively. Here's the post for reference,...
Thanks for the lightning fast responses. The reason why I return objects of the the class matrix is so as to make the main code similar to MATLAB code in case someone else in my lab wants to use it....